aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86_64/kernel/traps.c
diff options
context:
space:
mode:
authorAndi Kleen <ak@suse.de>2005-04-16 18:24:57 -0400
committerLinus Torvalds <torvalds@ppc970.osdl.org>2005-04-16 18:24:57 -0400
commitbe61bff789fe44bfb6d9282d8f7eccc860bdcfb6 (patch)
tree6c11d1fe32e7811c923ca5c7c21b89a78b5dd52f /arch/x86_64/kernel/traps.c
parentaa85b9af5bdae1f8b84d80367324e4410c3f0674 (diff)
[PATCH] x86_64: Some fixes for single step handling
Ported from i386/Linus Be more careful with TF handling to fix some copy protection codes in Wine Signed-off-by: Andi Kleen <ak@suse.de> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'arch/x86_64/kernel/traps.c')
-rw-r--r--arch/x86_64/kernel/traps.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/arch/x86_64/kernel/traps.c b/arch/x86_64/kernel/traps.c
index 2707a27b81cd..09e4a6460e74 100644
--- a/arch/x86_64/kernel/traps.c
+++ b/arch/x86_64/kernel/traps.c
@@ -688,8 +688,14 @@ asmlinkage void *do_debug(struct pt_regs * regs, unsigned long error_code)
688 */ 688 */
689 if ((regs->cs & 3) == 0) 689 if ((regs->cs & 3) == 0)
690 goto clear_TF_reenable; 690 goto clear_TF_reenable;
691 if ((tsk->ptrace & (PT_DTRACE|PT_PTRACED)) == PT_DTRACE) 691 /*
692 goto clear_TF; 692 * Was the TF flag set by a debugger? If so, clear it now,
693 * so that register information is correct.
694 */
695 if (tsk->ptrace & PT_DTRACE) {
696 regs->eflags &= ~TF_MASK;
697 tsk->ptrace &= ~PT_DTRACE;
698 }
693 } 699 }
694 700
695 /* Ok, finally something we can handle */ 701 /* Ok, finally something we can handle */