diff options
-rw-r--r-- | arch/x86/kernel/traps.c | 7 | ||||
-rw-r--r-- | kernel/context_tracking.c | 3 |
2 files changed, 7 insertions, 3 deletions
diff --git a/arch/x86/kernel/traps.c b/arch/x86/kernel/traps.c index c6eb418c5627..0d0e922fafc1 100644 --- a/arch/x86/kernel/traps.c +++ b/arch/x86/kernel/traps.c | |||
@@ -343,6 +343,7 @@ dotraplinkage void notrace do_int3(struct pt_regs *regs, long error_code) | |||
343 | if (poke_int3_handler(regs)) | 343 | if (poke_int3_handler(regs)) |
344 | return; | 344 | return; |
345 | 345 | ||
346 | prev_state = exception_enter(); | ||
346 | #ifdef CONFIG_KGDB_LOW_LEVEL_TRAP | 347 | #ifdef CONFIG_KGDB_LOW_LEVEL_TRAP |
347 | if (kgdb_ll_trap(DIE_INT3, "int3", regs, error_code, X86_TRAP_BP, | 348 | if (kgdb_ll_trap(DIE_INT3, "int3", regs, error_code, X86_TRAP_BP, |
348 | SIGTRAP) == NOTIFY_STOP) | 349 | SIGTRAP) == NOTIFY_STOP) |
@@ -351,9 +352,8 @@ dotraplinkage void notrace do_int3(struct pt_regs *regs, long error_code) | |||
351 | 352 | ||
352 | #ifdef CONFIG_KPROBES | 353 | #ifdef CONFIG_KPROBES |
353 | if (kprobe_int3_handler(regs)) | 354 | if (kprobe_int3_handler(regs)) |
354 | return; | 355 | goto exit; |
355 | #endif | 356 | #endif |
356 | prev_state = exception_enter(); | ||
357 | 357 | ||
358 | if (notify_die(DIE_INT3, "int3", regs, error_code, X86_TRAP_BP, | 358 | if (notify_die(DIE_INT3, "int3", regs, error_code, X86_TRAP_BP, |
359 | SIGTRAP) == NOTIFY_STOP) | 359 | SIGTRAP) == NOTIFY_STOP) |
@@ -433,6 +433,8 @@ dotraplinkage void do_debug(struct pt_regs *regs, long error_code) | |||
433 | unsigned long dr6; | 433 | unsigned long dr6; |
434 | int si_code; | 434 | int si_code; |
435 | 435 | ||
436 | prev_state = exception_enter(); | ||
437 | |||
436 | get_debugreg(dr6, 6); | 438 | get_debugreg(dr6, 6); |
437 | 439 | ||
438 | /* Filter out all the reserved bits which are preset to 1 */ | 440 | /* Filter out all the reserved bits which are preset to 1 */ |
@@ -465,7 +467,6 @@ dotraplinkage void do_debug(struct pt_regs *regs, long error_code) | |||
465 | if (kprobe_debug_handler(regs)) | 467 | if (kprobe_debug_handler(regs)) |
466 | goto exit; | 468 | goto exit; |
467 | #endif | 469 | #endif |
468 | prev_state = exception_enter(); | ||
469 | 470 | ||
470 | if (notify_die(DIE_DEBUG, "debug", regs, (long)&dr6, error_code, | 471 | if (notify_die(DIE_DEBUG, "debug", regs, (long)&dr6, error_code, |
471 | SIGTRAP) == NOTIFY_STOP) | 472 | SIGTRAP) == NOTIFY_STOP) |
diff --git a/kernel/context_tracking.c b/kernel/context_tracking.c index 019d45008448..5664985c46a0 100644 --- a/kernel/context_tracking.c +++ b/kernel/context_tracking.c | |||
@@ -19,6 +19,7 @@ | |||
19 | #include <linux/sched.h> | 19 | #include <linux/sched.h> |
20 | #include <linux/hardirq.h> | 20 | #include <linux/hardirq.h> |
21 | #include <linux/export.h> | 21 | #include <linux/export.h> |
22 | #include <linux/kprobes.h> | ||
22 | 23 | ||
23 | #define CREATE_TRACE_POINTS | 24 | #define CREATE_TRACE_POINTS |
24 | #include <trace/events/context_tracking.h> | 25 | #include <trace/events/context_tracking.h> |
@@ -104,6 +105,7 @@ void context_tracking_user_enter(void) | |||
104 | } | 105 | } |
105 | local_irq_restore(flags); | 106 | local_irq_restore(flags); |
106 | } | 107 | } |
108 | NOKPROBE_SYMBOL(context_tracking_user_enter); | ||
107 | 109 | ||
108 | #ifdef CONFIG_PREEMPT | 110 | #ifdef CONFIG_PREEMPT |
109 | /** | 111 | /** |
@@ -181,6 +183,7 @@ void context_tracking_user_exit(void) | |||
181 | } | 183 | } |
182 | local_irq_restore(flags); | 184 | local_irq_restore(flags); |
183 | } | 185 | } |
186 | NOKPROBE_SYMBOL(context_tracking_user_exit); | ||
184 | 187 | ||
185 | /** | 188 | /** |
186 | * __context_tracking_task_switch - context switch the syscall callbacks | 189 | * __context_tracking_task_switch - context switch the syscall callbacks |