Re: [RFC PATCH 3/3] ptrace: dont send SIGSTOP on auto-attach ifPT_SEIZED

From: Tejun Heo
Date: Wed Jul 13 2011 - 08:10:49 EST


Hello,

On Fri, Jul 08, 2011 at 07:14:17PM +0200, Oleg Nesterov wrote:
> The fake SIGSTOP during attach has numerous problems. PTRACE_SEIZE
> is already fine, but we have basically the same problems is SIGSTOP
> is sent on auto-attach, the tracer can't know if this signal signal
> should be cancelled or not.
>
> Change ptrace_event() to set JOBCTL_TRAP_STOP if the new child is
> PT_SEIZED, this triggers the PTRACE_EVENT_STOP report.
>
> Thereafter a PT_SEIZED task can never report the bogus SIGSTOP.
>
> Test-case:
...
> Signed-off-by: Oleg Nesterov <oleg@xxxxxxxxxx>

Looks good to me. For 2 and 3,

Acked-by: Tejun Heo <tj@xxxxxxxxxx>

So, yeah, with this change, we're almost there.

Thanks.

--
tejun
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/