[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20110214090356.GA21979@host1.dyn.jankratochvil.net>
Date: Mon, 14 Feb 2011 10:03:56 +0100
From: Jan Kratochvil <jan.kratochvil@...hat.com>
To: Denys Vlasenko <vda.linux@...glemail.com>
Cc: Oleg Nesterov <oleg@...hat.com>, Tejun Heo <tj@...nel.org>,
Roland McGrath <roland@...hat.com>,
linux-kernel@...r.kernel.org, torvalds@...ux-foundation.org,
akpm@...ux-foundation.org
Subject: Re: [PATCH 1/1] ptrace: make sure do_wait() won't hang after
PTRACE_ATTACH
On Mon, 14 Feb 2011 00:01:47 +0100, Denys Vlasenko wrote:
> * sleep runs in nanosleep
> * SIGSTOP arrives, strace sees it
> * strace logs it and allows it via ptrace(PTRACE_SYSCALL, ..., SIGSTOP)
> * sleep process enters group-stop
The last point breaks the documented behavior of ptrace:
If data is nonzero and not SIGSTOP, it is interpreted as a signal to
be delivered to the child; otherwise, no signal is delivered.
I do not see it would affect gdb. strace will change its behavior when
SIGSTOP is sent to its tracee although the new behavior may be OK.
It is more a subject of apps compatibility testing with such a kernel change.
> * nothing happens until some other signal arrives
> * say, SIGCONT arrives
What if other signal arrives? The tracer probably should not be notified as
the tracee is in a group-stop.
> * strace logs it and allows it via ptrace(PTRACE_SYSCALL, ..., SIGCONT)
Thanks,
Jan
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists