Skip to contentSkip to conversation

kprobe cleanup for VM_MASK judgement

PATCH In review mao, bibo 3 participants 3 messages Apr 26, 2006

lore
Share & tools
lore

mao, bibo

author
#0 lore raw

PATCH 1/1 kprobe cleanup for VM_MASK judgement

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.

Thanks
bibo,mao

arch/i386/kernel/kprobes.c +0 -9
diff -Nruap 2.6.17-rc1-mm3.org/arch/i386/kernel/kprobes.c 2.6.17-rc1-mm3.new/arch/i386/kernel/kprobes.c
@@ -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