Re: [PATCH 1/1] ptrace: make sure do_wait() won't hang afterPTRACE_ATTACH

From: Tejun Heo
Date: Fri Feb 25 2011 - 10:51:51 EST


Hello,

On Thu, Feb 24, 2011 at 09:29:41PM +0100, Oleg Nesterov wrote:
> Damn. Today is 02/24 ;) sorry.

No need. I've been pretty lazy with this thread too. :-)

> > On Fri, Feb 18, 2011 at 08:37:09PM +0100, Oleg Nesterov wrote:
> >
> > > > As it currently stands, SIGSTOP/CONT while ptraced doesn't work
> > >
> > > And this is probably where we disagree the most. I think this is bug,
> > > and this should be fixed.
> >
> > I don't think we disagree that it is a bug. I want to fix it too but
> > we definitely seem to disagree on how.
>
> Yes, but I also think that the running tracee in the SIGNAL_STOP_STOPPED
> process is bug by itself. IIUC, you think this is fine.

Yeap, I actually think that's the better way.

> > * ptrace, sans the odd SIGSTOP on attach which we should remove, is
> > per-task. Sending out SIGCONT on PTRACE_CONT would break that. I
> > really don't think that's a good idea.
>
> Hmm. But why do you think we should always send SIGCONT after attach?

Hmmm... my sentences were confusing. I was trying to say,

* ptrace, as it currently stands, is largely per-task. One exception
is the implicit SIGSTOP which is sent on PTRACE_ATTACH but this
should be replaced with a more transparent attach request which
doesn't affect jctl states.

* Sending out SIGCONT on PTRACE_CONT on jctl stopped tracee adds
another exception to per-task behavior, which I don't think is a
good idea.

> > * PTRACE_CONT would be behaving completely differently depending on
> > whether it's resuming from group stop or other traps.
>
> Afaics, no. It does not matter from where the tracee resumes. See
> the [pseudo patch] I sent. Once again, it doesn't really work, it
> only tries to explain what I mean.

I see. I'll read the patch again.

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/