aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/include/asm/bug.h
diff options
context:
space:
mode:
authorPeter Zijlstra <peterz@infradead.org>2020-06-04 11:17:40 +0200
committerPeter Zijlstra <peterz@infradead.org>2020-06-15 14:10:10 +0200
commit8e8bb06d199a5aa7a534aa3b3fc0abbbc11ca438 (patch)
treed7517bb542de22449610b8ad7146ad364af7a900 /arch/x86/include/asm/bug.h
parentx86/entry, ubsan, objtool: Whitelist __ubsan_handle_*() (diff)
downloadlinux-dev-8e8bb06d199a5aa7a534aa3b3fc0abbbc11ca438.tar.xz
linux-dev-8e8bb06d199a5aa7a534aa3b3fc0abbbc11ca438.zip
x86/entry, bug: Comment the instrumentation_begin() usage for WARN()
Explain the rationale for annotating WARN(), even though, strictly speaking printk() and friends are very much not safe in many of the places we put them. Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Diffstat (limited to 'arch/x86/include/asm/bug.h')
-rw-r--r--arch/x86/include/asm/bug.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/arch/x86/include/asm/bug.h b/arch/x86/include/asm/bug.h
index fb34ff641e0a..028189575560 100644
--- a/arch/x86/include/asm/bug.h
+++ b/arch/x86/include/asm/bug.h
@@ -75,6 +75,12 @@ do { \
unreachable(); \
} while (0)
+/*
+ * This instrumentation_begin() is strictly speaking incorrect; but it
+ * suppresses the complaints from WARN()s in noinstr code. If such a WARN()
+ * were to trigger, we'd rather wreck the machine in an attempt to get the
+ * message out than not know about it.
+ */
#define __WARN_FLAGS(flags) \
do { \
instrumentation_begin(); \