summaryrefslogtreecommitdiff
path: root/arch/x86/include/asm/traps.h
diff options
context:
space:
mode:
authorPeter Zijlstra <peterz@infradead.org>2020-02-19 09:46:43 +0100
committerThomas Gleixner <tglx@linutronix.de>2020-05-19 15:51:20 +0200
commit0d00449c7a28a1514595630735df383dec606812 (patch)
tree2983e126ef290b53793ddf46b6df670ad2f7d8a9 /arch/x86/include/asm/traps.h
parent5567d11c21a1d508a91a8cb64a819783a0835d9f (diff)
x86: Replace ist_enter() with nmi_enter()
A few exceptions (like #DB and #BP) can happen at any location in the code, this then means that tracers should treat events from these exceptions as NMI-like. The interrupted context could be holding locks with interrupts disabled for instance. Similarly, #MC is an actual NMI-like exception. All of them use ist_enter() which only concerns itself with RCU, but does not do any of the other setup that NMIs need. This means things like: printk() raw_spin_lock_irq(&logbuf_lock); <#DB/#BP/#MC> printk() raw_spin_lock_irq(&logbuf_lock); are entirely possible (well, not really since printk tries hard to play nice, but the concept stands). So replace ist_enter() with nmi_enter(). Also observe that any nmi_enter() caller must be both notrace and NOKPROBE, or in the noinstr text section. Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org> Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Reviewed-by: Alexandre Chartre <alexandre.chartre@oracle.com> Link: https://lkml.kernel.org/r/20200505134101.525508608@linutronix.de
Diffstat (limited to 'arch/x86/include/asm/traps.h')
-rw-r--r--arch/x86/include/asm/traps.h3
1 files changed, 0 insertions, 3 deletions
diff --git a/arch/x86/include/asm/traps.h b/arch/x86/include/asm/traps.h
index fe109fc9a1d2..6f6c417e1e46 100644
--- a/arch/x86/include/asm/traps.h
+++ b/arch/x86/include/asm/traps.h
@@ -118,9 +118,6 @@ void smp_spurious_interrupt(struct pt_regs *regs);
void smp_error_interrupt(struct pt_regs *regs);
asmlinkage void smp_irq_move_cleanup_interrupt(void);
-extern void ist_enter(struct pt_regs *regs);
-extern void ist_exit(struct pt_regs *regs);
-
#ifdef CONFIG_VMAP_STACK
void __noreturn handle_stack_overflow(const char *message,
struct pt_regs *regs,