This is the mail archive of the
systemtap@sourceware.org
mailing list for the systemtap project.
[PATCH] kprobe cleanup for VM_MASK judgement
- From: "mao, bibo" <bibo dot mao at intel dot com>
- To: Andrew Morton <akpm at osdl dot org>, Masami Hiramatsu <hiramatu at sdl dot hitachi dot co dot jp>, Jim Keniston <jkenisto at us dot ibm dot com>, "Keshavamurthy, Anil S" <anil dot s dot keshavamurthy at intel dot com>, Ananth N Mavinakayanahalli <ananth at in dot ibm dot com>, prasanna <prasanna at in dot ibm dot com>
- Cc: LKML <linux-kernel at vger dot kernel dot org>, "systemtap at sources dot redhat dot com" <systemtap at sources dot redhat dot com>
- Date: Wed, 26 Apr 2006 17:56:26 +0800
- Subject: [PATCH] kprobe cleanup for VM_MASK judgement
- Trustinternalsourcedmail: True
Hi,
When trap happens in user space, kprobe_exceptions_notify() funtion will skip it.
This patch deletes some unnecessary code for VM_MASK judgement in eflags.
Signed-off-by: bibo, mao <bibo.mao@intel.com>
Thanks
bibo,mao
diff -Nruap 2.6.17-rc1-mm3.org/arch/i386/kernel/kprobes.c 2.6.17-rc1-mm3.new/arch/i386/kernel/kprobes.c
--- 2.6.17-rc1-mm3.org/arch/i386/kernel/kprobes.c 2006-04-26 15:52:24.000000000 +0800
+++ 2.6.17-rc1-mm3.new/arch/i386/kernel/kprobes.c 2006-04-26 16:25:38.000000000 +0800
@@ -242,10 +242,6 @@ static int __kprobes kprobe_handler(stru
kcb->kprobe_status = KPROBE_REENTER;
return 1;
} else {
- if (regs->eflags & VM_MASK) {
- /* We are in virtual-8086 mode. Return 0 */
- goto no_kprobe;
- }
if (*addr != BREAKPOINT_INSTRUCTION) {
/* The breakpoint instruction was removed by
* another cpu right after we hit, no further
@@ -265,11 +261,6 @@ static int __kprobes kprobe_handler(stru
p = get_kprobe(addr);
if (!p) {
- if (regs->eflags & VM_MASK) {
- /* We are in virtual-8086 mode. Return 0 */
- goto no_kprobe;
- }
-
if (*addr != BREAKPOINT_INSTRUCTION) {
/*
* The breakpoint instruction was removed right