Messages in this thread | | | Date | Thu, 26 May 2011 12:11:02 +0200 | From | Tejun Heo <> | Subject | Re: [PATCH 03/10] ptrace: implement PTRACE_SEIZE |
| |
Hello, Pedro.
On Thu, May 26, 2011 at 11:01:42AM +0100, Pedro Alves wrote: > SYSGOOD makes sense, it just enables a means to distinguish syscall > SIGTRAPs from regular SIGTRAPs -- it doesn't cause child stops itself. > TRACE_EXEC, I'm not so sure. (and it appears to have been proposed > on the premise that SEIZE would still report the SIGTRAP). > Why would that make sense, and not TRACE_FORK, for example? I can imagine > a tracer only caring for syscall entry/exit, and not needing a special > event on exec. IMO, any kind of event that forces a child stop that > would't happen if the child wasn't traced should have to be enabled > explicitly.
The problem with exec is that very weird things happen during exec. Tasks change their ids, tracees get silently pruned and so on, so there might not be a transparent way for a ptracer to deal with it. It needs to be notified and handle the situation whether it wants or not.
What I was saying was there won't be SIGTRAP. In general, we're trying to move away from kernel implicitly sending actual signals. If we enable it by default, it will be a proper ptrace trap.
Thanks.
-- tejun
| |