]> Pileus Git - ~andy/linux/blobdiff - arch/x86/kernel/traps.c
kprobes/x86: Call out into INT3 handler directly instead of using notifier
[~andy/linux] / arch / x86 / kernel / traps.c
index 1b23a1c9274696f108dcf2ad2482445523930de0..8c8093b146ca7cc565c48cb7ba66ca89deb06f9a 100644 (file)
@@ -58,6 +58,7 @@
 #include <asm/mce.h>
 #include <asm/fixmap.h>
 #include <asm/mach_traps.h>
+#include <asm/alternative.h>
 
 #ifdef CONFIG_X86_64
 #include <asm/x86_init.h>
@@ -327,6 +328,9 @@ dotraplinkage void __kprobes notrace do_int3(struct pt_regs *regs, long error_co
            ftrace_int3_handler(regs))
                return;
 #endif
+       if (poke_int3_handler(regs))
+               return;
+
        prev_state = exception_enter();
 #ifdef CONFIG_KGDB_LOW_LEVEL_TRAP
        if (kgdb_ll_trap(DIE_INT3, "int3", regs, error_code, X86_TRAP_BP,