[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

	- 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...


To unsubscribe from this list: send the line "unsubscribe linux-arch" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Linux Kernel]     [Kernel Newbies]     [x86 Platform Driver]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Linux FS]     [Photo]     [Yosemite]     [Yosemite Discussion]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]     [Linux Resources]

  Powered by Linux