Commit-ID: 24cda10996f5420ab962f91cd03c15869a3a94b1 Gitweb: http://git.kernel.org/tip/24cda10996f5420ab962f91cd03c15869a3a94b1 Author: Jiri Olsa <[email protected]> AuthorDate: Wed, 1 May 2013 17:25:42 +0200 Committer: Ingo Molnar <[email protected]> CommitDate: Tue, 28 May 2013 08:46:52 +0200
x86/signals: Clear RF EFLAGS bit for signal handler Clearing RF EFLAGS bit for signal handler. The reason is that this flag is set by debug exception code to prevent the recursive exception entry. Leaving it set for signal handler might prevent debug exception of the signal handler itself. Signed-off-by: Jiri Olsa <[email protected]> Tested-by: Oleg Nesterov <[email protected]> Reviewed-by: Frederic Weisbecker <[email protected]> Originally-Reported-by: Vince Weaver <[email protected]> Cc: H. Peter Anvin <[email protected]> Cc: Andi Kleen <[email protected]> Cc: Oleg Nesterov <[email protected]> Cc: Arnaldo Carvalho de Melo <[email protected]> Cc: Ingo Molnar <[email protected]> Cc: Paul Mackerras <[email protected]> Cc: Corey Ashford <[email protected]> Cc: Frederic Weisbecker <[email protected]> Cc: Vince Weaver <[email protected]> Cc: Stephane Eranian <[email protected]> Cc: Linus Torvalds <[email protected]> Cc: Andrew Morton <[email protected]> Cc: Peter Zijlstra <[email protected]> Cc: Thomas Gleixner <[email protected]> Signed-off-by: Peter Zijlstra <[email protected]> Link: http://lkml.kernel.org/r/[email protected] Signed-off-by: Ingo Molnar <[email protected]> --- arch/x86/kernel/signal.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/arch/x86/kernel/signal.c b/arch/x86/kernel/signal.c index 9df4c0b..cb12fc9 100644 --- a/arch/x86/kernel/signal.c +++ b/arch/x86/kernel/signal.c @@ -665,6 +665,12 @@ handle_signal(struct ksignal *ksig, struct pt_regs *regs) */ regs->flags &= ~X86_EFLAGS_DF; /* + * Clear RF when entering the signal handler, because + * it might disable possible debug exception from the + * signal handler. + */ + regs->flags &= ~X86_EFLAGS_RF; + /* * Clear TF when entering the signal handler, but * notify any tracer that was single-stepping it. * The tracer may want to single-step inside the -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/

