Messages in this thread | | | Date | Mon, 14 Feb 2011 21:01:30 +0100 | From | Oleg Nesterov <> | Subject | Re: [PATCH 1/1] ptrace: make sure do_wait() won't hang after PTRACE_ATTACH |
| |
On 02/14, Denys Vlasenko wrote: > > Basically, we have TASK_RUNNING, TASK_STOPPED and TASK_TRACED > states, and after entering TASK_TRACED state we lose information > in which state we were before entering it. We need to remember > old state and restore it in order for this example to work.
Actually, we do not lose this info. So the kernel can change it back to TASK_STOPPED after ptrace(PTRACE_CONT), and this is what PTRACE_CONT-doesnt-resume-until-SIGCONT was supposed to do.
> Or we can avoid entering TASK_TRACED on ptrace(PTRACE_GETSIGINFO) et al. > Can we remain in TASK_STOPPED?
Oh, unlikely, I think.
Oleg.
| |