[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20120429182510.GA23107@redhat.com>
Date: Sun, 29 Apr 2012 20:25:10 +0200
From: Oleg Nesterov <oleg@...hat.com>
To: Al Viro <viro@...IV.linux.org.uk>
Cc: Linus Torvalds <torvalds@...ux-foundation.org>,
linux-arch@...r.kernel.org, linux-kernel@...r.kernel.org,
Roland McGrath <roland@...k.frob.com>
Subject: Re: [RFC] TIF_NOTIFY_RESUME, arch/*/*/*signal*.c and all such
On 04/29, Al Viro wrote:
>
> On Sun, Apr 29, 2012 at 06:41:55PM +0200, Oleg Nesterov wrote:
> >
> > Besides, at least on x86 tracehook_signal_handler's logic is not exactly
> > right and should be fixed.
>
> Details, please...
See http://marc.info/?t=127550678000005 and
https://bugzilla.kernel.org/show_bug.cgi?id=16061
- the tracee reports a signal SIG
- the tracer does ptrace(SINGLESTEP, SIG), this approves the signal
and also sets TF
- the tracee dequeues the signal, changes its IP to sig_handler().
then it notices TIF_SINGLESTEP and notifies the tracer without
return to user-space _and_ without clearing TF or TIF_SINGLESTEP
- the tracer does ptrace(SINGLESTEP) again, but now enable_single_step()
looses TIF_FORCED_TF.
- the tracer does ptrace(CONT), but user_disable_single_step() doesn't
clear TF since TIF_FORCED_TF is not set
- the tracee returns to user-space with X86_EFLAGS_TF in eflags
Somehow we forgot about this bug...
Oleg.
--
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