bug-hurd
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] fully enable rpctrace to trace multitask programs.


From: Da Zheng
Subject: Re: [PATCH] fully enable rpctrace to trace multitask programs.
Date: Tue, 07 Jul 2009 13:21:09 +0800
User-agent: Thunderbird 2.0.0.22 (Macintosh/20090605)

olafBuddenhagen@gmx.net wrote:
mach_reply_port() cannot be traced by the rpctrace at all since it's a
system trap.
I see... So there is no way to divert it? That seems strange :-(

Anyways, while this means that we won't see a port created by
mach_reply_port() immediately, we still can start fully tracking it as
soon as it is used in any way, can't we?...
yes, by using discover_receive_right(). Otherwise, I don't know how.

Well, AIUI, there are only two ways how a receive right could be used:
either mach_port_insert_right() (or mach_port_extract_right()) is
invoked, in which case we can look at the parameters, so we know exactly
where it is.

The other option is that it's sent to another task via an RPC. In this
case indeed we don't know what name it ends up as, so I guess we
actually have to search for it -- but at least we know in which task.

Unless I'm missing something essential, there is never any need to
search through all the tasks...
We can look at the parameters of mach_port_extract_right() to find the port name of the receive right, but it doesn't always work for mach_port_insert_right(). The parameter name of mach_port_insert_right() is the port name where we are going to insert the port right and isn't necessary to be the port name of the receive right (though in many cases they are).
But you are right, we can always know which task has the receive right.
I decide not to treat mach_port_insert_right() or mach_port_extract_right() specially, but search for the receive right in a specific task.

Zheng Da




reply via email to

[Prev in Thread] Current Thread [Next in Thread]