x86: fix debug handler for kmemcheck
PATCH 1/1 x86: fix debug handler for kmemcheck
Hi Ingo,
Patch description says everything :-)
This actually comes from my kmemcheck git repository atgit://git.kernel.org/pub/scm/linux/kernel/git/vegard/kmemcheck.git
but it's not in x86.git. CCing LKML in case anybody cares :-)
Vegard
Quoted 1 line
From
68400903a6348769152f9a2ed102bad0a4774912Mon Sep 17 00:00:00 2001
From: Vegard Nossum <[email protected]>
Date: Thu, 1 May 2008 19:10:07 +0200
Subject: [PATCH] x86: fix debug handler for kmemcheck
This changes the 64-bit debug exception handler to match the 32-bit version (which is also correct).
Signed-off-by Vegard Nossum <[email protected]>
--- arch/x86/kernel/traps_64.c | 7 +------ 1 files changed, 1 insertions(+), 6 deletions(-)
arch/x86/kernel/traps_64.c +1 -6
@@ -915,18 +915,13 @@ asmlinkage void __kprobes do_debug(struct pt_regs * regs,get_debugreg (condition,6 ); -#ifdef CONFIG_KMEMCHECK /* Catch kmemcheck conditions first of all! */ if (condition &DR_STEP ) { -if (!(regs->flags &X86_VM_MASK ) && !user_mode (regs) && - ((void *)regs->ip != system_call) && - ((void *)regs->ip != x86_debug) && - ((void *)regs->ip != ia32_sysenter_target)) { +if (kmemcheck_active (regs)) {kmemcheck_hide (regs);return ; } } -#endif /* * The processor cleared BTF, so don't mark that we need it set.
Signature · 1 line
1.5.4.1