Tue 01 Sep 2009 01:47:27 PM UTC, comment #7:
Yes, I sent the patch implementing the more complex solution. I sent it to the mailing list for review, but haven't get many feedbacks except the ones from antrik.
I wanted more feedbacks before posting it here.
I did very fundamental change in rpctrace and the patch is very large. I think it's much easier to give feedbacks in the mailing list.
|
Sat 16 May 2009 07:27:33 PM UTC, comment #1:
@@ -563,6 +566,37 @@ print_contents (mach_msg_header_t *inp,
ti = rewrite_right (&portnames[i], &newtypes[i]);
+ /* the reply message for thread_create or task_create */
+ if (inp->msgh_id == 2161 || inp->msgh_id == 2107)
+ {
+ err = mach_port_insert_right (mach_task_self (),
+ portnames[i], portnames[i],
+ MACH_MSG_TYPE_MAKE_SEND);
+ if (err)
+ error (0, err, "mach_port_insert_right");
+
+ if (inp->msgh_id == 2161)
+ {
Please put a comment just to make clear that this is the thread_create case.
+ err = thread_set_kernel_port (orig_port, portnames[i]);
+ if (err)
+ error (0, err, "thread_set_kernel_port");
+ asprintf (&ti->name, "thread(port %d)", (int) orig_port);
Aren't you leaking the previous ti->name's memory here?
Samuel
|