* [PATCH] x86: fix debug handler for kmemcheck
@ 2008-05-08 18:51 Vegard Nossum
0 siblings, 0 replies; only message in thread
From: Vegard Nossum @ 2008-05-08 18:51 UTC (permalink / raw)
To: Ingo Molnar; +Cc: Pekka Enberg, linux-kernel
Hi Ingo,
Patch description says everything :-)
This actually comes from my kmemcheck git repository at
git://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
>From 68400903a6348769152f9a2ed102bad0a4774912 Mon Sep 17 00:00:00 2001
From: Vegard Nossum <vegard.nossum@gmail.com>
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 <vegard.nossum@gmail.com>
---
arch/x86/kernel/traps_64.c | 7 +------
1 files changed, 1 insertions(+), 6 deletions(-)
diff --git a/arch/x86/kernel/traps_64.c b/arch/x86/kernel/traps_64.c
index 8069073..72923ba 100644
--- a/arch/x86/kernel/traps_64.c
+++ b/arch/x86/kernel/traps_64.c
@@ -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.
--
1.5.4.1
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2008-05-08 18:51 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-05-08 18:51 [PATCH] x86: fix debug handler for kmemcheck Vegard Nossum
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®