diff options
Diffstat (limited to 'arch/i386/kernel/kprobes.c')
-rw-r--r-- | arch/i386/kernel/kprobes.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/arch/i386/kernel/kprobes.c b/arch/i386/kernel/kprobes.c index 2f372dbd34fd..6483eeb1a4e8 100644 --- a/arch/i386/kernel/kprobes.c +++ b/arch/i386/kernel/kprobes.c | |||
@@ -188,6 +188,19 @@ static int __kprobes kprobe_handler(struct pt_regs *regs) | |||
188 | kcb->kprobe_status = KPROBE_REENTER; | 188 | kcb->kprobe_status = KPROBE_REENTER; |
189 | return 1; | 189 | return 1; |
190 | } else { | 190 | } else { |
191 | if (regs->eflags & VM_MASK) { | ||
192 | /* We are in virtual-8086 mode. Return 0 */ | ||
193 | goto no_kprobe; | ||
194 | } | ||
195 | if (*addr != BREAKPOINT_INSTRUCTION) { | ||
196 | /* The breakpoint instruction was removed by | ||
197 | * another cpu right after we hit, no further | ||
198 | * handling of this interrupt is appropriate | ||
199 | */ | ||
200 | regs->eip -= sizeof(kprobe_opcode_t); | ||
201 | ret = 1; | ||
202 | goto no_kprobe; | ||
203 | } | ||
191 | p = __get_cpu_var(current_kprobe); | 204 | p = __get_cpu_var(current_kprobe); |
192 | if (p->break_handler && p->break_handler(p, regs)) { | 205 | if (p->break_handler && p->break_handler(p, regs)) { |
193 | goto ss_probe; | 206 | goto ss_probe; |