summaryrefslogtreecommitdiffstats
path: root/kernel/ucount.c
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 /kernel/ucount.c
parentx86/mce: Send #MC singal from task work (diff)
downloadlinux-0d00449c7a28a1514595630735df383dec606812.tar.xz
linux-0d00449c7a28a1514595630735df383dec606812.zip
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 'kernel/ucount.c')
0 files changed, 0 insertions, 0 deletions