tree aafe15bc30b95307bcde77a54bafd478c1c27225
parent 18dcefe89f299b73085c3777a7dc112e8c4f5f77
author Andi Kleen <[EMAIL PROTECTED]> Tue Apr 12 08:25:32 2005
committer Linus Torvalds <[EMAIL PROTECTED]> Tue Apr 12 08:25:32 2005
[PATCH] x86_64: Fix interaction of single stepping with debuggers
Ported from i386/Linus
Fix another TF corner case. Need to do the special TF handling for all
signals to make debuggers happy
Signed-off-by: Andi Kleen <[EMAIL PROTECTED]>
Signed-off-by: Andrew Morton <[EMAIL PROTECTED]>
Signed-off-by: Linus Torvalds <[EMAIL PROTECTED]>
signal.c | 12 ++++++++++++
1 files changed, 12 insertions(+)
Index: arch/x86_64/kernel/signal.c
===================================================================
--- 495fa8e9c1ddaba3c354ed6064114b75ffe95c86/arch/x86_64/kernel/signal.c
(mode:100644 sha1:fd201ec29bf1d61b9e54e18e67b31269021efc0e)
+++ aafe15bc30b95307bcde77a54bafd478c1c27225/arch/x86_64/kernel/signal.c
(mode:100644 sha1:d24c718372ef6d528eb6255b29a850e6c27dd877)
@@ -368,6 +368,18 @@
}
}
+ /*
+ * If TF is set due to a debugger (PT_DTRACE), clear the TF
+ * flag so that register information in the sigcontext is
+ * correct.
+ */
+ if (unlikely(regs->eflags & TF_MASK)) {
+ if (likely(current->ptrace & PT_DTRACE)) {
+ current->ptrace &= ~PT_DTRACE;
+ regs->eflags &= ~TF_MASK;
+ }
+ }
+
#ifdef CONFIG_IA32_EMULATION
if (test_thread_flag(TIF_IA32)) {
if (ka->sa.sa_flags & SA_SIGINFO)
-
To unsubscribe from this list: send the line "unsubscribe bk-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at http://vger.kernel.org/majordomo-info.html