projects
/
linux.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
8c4e93c
)
printk: Disallow instrumenting print_nmi_enter()
author
Peter Zijlstra
<peterz@infradead.org>
Mon, 24 Feb 2020 21:25:03 +0000
(22:25 +0100)
committer
Thomas Gleixner
<tglx@linutronix.de>
Tue, 19 May 2020 13:51:16 +0000
(15:51 +0200)
It happens early in nmi_enter(), no tracing, probing or other funnies
allowed. Specifically as nmi_enter() will be used in do_debug(), which
would cause recursive exceptions when kprobed.
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.139720912@linutronix.de
kernel/printk/printk_safe.c
patch
|
blob
|
history
diff --git
a/kernel/printk/printk_safe.c
b/kernel/printk/printk_safe.c
index e8791f206417cd1b336028118f25dd96416685f5..4242403316bba12d0ec7691d48ece1d55be99a20 100644
(file)
--- a/
kernel/printk/printk_safe.c
+++ b/
kernel/printk/printk_safe.c
@@
-10,6
+10,7
@@
#include <linux/cpumask.h>
#include <linux/irq_work.h>
#include <linux/printk.h>
+#include <linux/kprobes.h>
#include "internal.h"
@@
-293,12
+294,12
@@
static __printf(1, 0) int vprintk_nmi(const char *fmt, va_list args)
return printk_safe_log_store(s, fmt, args);
}
-void no
trace
printk_nmi_enter(void)
+void no
instr
printk_nmi_enter(void)
{
this_cpu_add(printk_context, PRINTK_NMI_CONTEXT_OFFSET);
}
-void no
trace
printk_nmi_exit(void)
+void no
instr
printk_nmi_exit(void)
{
this_cpu_sub(printk_context, PRINTK_NMI_CONTEXT_OFFSET);
}