aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/kernel/traps.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/x86/kernel/traps.c')
-rw-r--r--arch/x86/kernel/traps.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/arch/x86/kernel/traps.c b/arch/x86/kernel/traps.c
index 02cfb9b8f5b1..7eaad4c5110a 100644
--- a/arch/x86/kernel/traps.c
+++ b/arch/x86/kernel/traps.c
@@ -15,6 +15,7 @@
15#include <linux/kprobes.h> 15#include <linux/kprobes.h>
16#include <linux/uaccess.h> 16#include <linux/uaccess.h>
17#include <linux/kdebug.h> 17#include <linux/kdebug.h>
18#include <linux/kgdb.h>
18#include <linux/kernel.h> 19#include <linux/kernel.h>
19#include <linux/module.h> 20#include <linux/module.h>
20#include <linux/ptrace.h> 21#include <linux/ptrace.h>
@@ -451,6 +452,11 @@ void restart_nmi(void)
451/* May run on IST stack. */ 452/* May run on IST stack. */
452dotraplinkage void __kprobes do_int3(struct pt_regs *regs, long error_code) 453dotraplinkage void __kprobes do_int3(struct pt_regs *regs, long error_code)
453{ 454{
455#ifdef CONFIG_KGDB_LOW_LEVEL_TRAP
456 if (kgdb_ll_trap(DIE_INT3, "int3", regs, error_code, 3, SIGTRAP)
457 == NOTIFY_STOP)
458 return;
459#endif /* CONFIG_KGDB_LOW_LEVEL_TRAP */
454#ifdef CONFIG_KPROBES 460#ifdef CONFIG_KPROBES
455 if (notify_die(DIE_INT3, "int3", regs, error_code, 3, SIGTRAP) 461 if (notify_die(DIE_INT3, "int3", regs, error_code, 3, SIGTRAP)
456 == NOTIFY_STOP) 462 == NOTIFY_STOP)