Skip to content

ptrace: x86: stepping in a signal handler leaks X86_EFLAGS_TF

Oleg Nesterov lkml 1 version New

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest1 patch 0 repliesNew

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/1ptrace: x86: stepping in a signal handler leaks X86_EFLAGS_TFarch/x86/kernel/signal.c+1 -10 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH 0/1] ptrace: x86: stepping in a signal handler leaks X86_EFLAGS_TF
Quoted 13 lines · Oleg Nesterov

I am starting to think we should fix this per arch. As for x86, perhaps we should start with this one-liner

		spin_unlock_irq(&current->sighand->siglock);

		tracehook_signal_handler(sig, info, ka, regs,
	-				 test_thread_flag(TIF_SINGLESTEP));
	+				 test_and_clear_thread_flag(TIF_SINGLESTEP));

		return 0;
	 }
Quoted 1 line

then do other changes.

I am sending this patch. It is still not clear to me what is the "right" fix, we need more discussion. Let's fix the bug first.

Oleg.