|
@@ -188,6 +188,19 @@ static int __kprobes kprobe_handler(struct pt_regs *regs)
|
|
|
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
|
|
|
+ * handling of this interrupt is appropriate
|
|
|
+ */
|
|
|
+ regs->eip -= sizeof(kprobe_opcode_t);
|
|
|
+ ret = 1;
|
|
|
+ goto no_kprobe;
|
|
|
+ }
|
|
|
p = __get_cpu_var(current_kprobe);
|
|
|
if (p->break_handler && p->break_handler(p, regs)) {
|
|
|
goto ss_probe;
|