On 12/14, Roland McGrath wrote: > > > > In the stopped cases, there are lots of locks and barriers and things > > > after resuming. (Oleg?) > > > > Every time the tracee resumes after TASK_TRACED it uses utrace->lock > > to synchronize with utrace_control/etc, it must see any changes. > > And TASK_STOPPED?
SIGCONT can wake up the TASK_STOPPED tracee. I don't think the tracer should ever rely on TASK_STOPPED (utrace never does). If the tracer needs the "really stopped" tracee we have UTRACE_STOP, and this means TASK_TRACED. But I am not sure I understand this part of discussion... In any case the tracee should see any changes which were done before the wakeup. But TASK_STOPPED can't guarantee the tracee won't be resumed until the tracer wakes it up. Of course, TASK_TRACED can't prevent SIGKILL, but in this case we should only care about "the tracee can't resume until we drop utrace->lock" case. Oleg.