lkml.org 
[lkml]   [2011]   [May]   [8]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [PATCH 11/11] ptrace: implement group stop notification for ptracer
Date
On Sunday 08 May 2011 17:49, Tejun Heo wrote:
> Currently there's no way for ptracer to find out whether group stop
> that tracee was in finished other than polling with PTRACE_GETSIGINFO.
> Also, tracer can't detect new group stop started by an untraced thread
> if tracee is already trapped. This patch implements group stop
> notification for ptracer using INTERRUPT traps.
>
> When group stop state of a seized tracee changes, JOBCTL_TRAP_NOTIFY
> is set, which triggers INTERRUPT trap but is sticky until the next
> PTRACE_GETSIGINFO. As GETSIGINFO exports the current group stop
> state, this guarantees that tracer checks the current group stop state
> at least once after group stop state change. Stickiness is necessary
> because notification trap may race with PTRACE_CONT for other traps
> and get lost.

To clarify on "sticky":

Does this mean that if tracer userspace won't query PTRACE_GETSIGINFO,
but will simply do:

waitid(P_PID, tracee, NULL, WSTOPPED);
ptrace(PTRACE_CONT, tracee, NULL, NULL);

then kernel will generate INTERRUPT trap again and again
(without letting tracee run) if job stop state of the tracee has changed?


--
vda


\
 
 \ /
  Last update: 2011-05-09 00:47    [from the cache]
©2003-2011 Jasper Spaans