From: Vegard Nossum <vegard.nossum@gmail.com>
To: Ingo Molnar <mingo@elte.hu>
Cc: Pekka Enberg <penberg@cs.helsinki.fi>, linux-kernel@vger.kernel.org
Subject: [PATCH] x86: fix debug handler for kmemcheck
Date: Thu, 8 May 2008 20:51:07 +0200 [thread overview]
Message-ID: <20080508185107.GA3102@damson.getinternet.no> (raw)
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
reply other threads:[~2008-05-08 18:51 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20080508185107.GA3102@damson.getinternet.no \
--to=vegard.nossum@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=penberg@cs.helsinki.fi \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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®