[<prev] [next>] [day] [month] [year] [list]
Message-ID: <20080508185107.GA3102@damson.getinternet.no>
Date: Thu, 8 May 2008 20:51:07 +0200
From: Vegard Nossum <vegard.nossum@...il.com>
To: Ingo Molnar <mingo@...e.hu>
Cc: Pekka Enberg <penberg@...helsinki.fi>, linux-kernel@...r.kernel.org
Subject: [PATCH] x86: fix debug handler for kmemcheck
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@...il.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@...il.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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists