aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/include/linux/compiler_types.h
diff options
context:
space:
mode:
authorPeter Zijlstra <peterz@infradead.org>2020-06-02 18:47:11 +0200
committerPeter Zijlstra <peterz@infradead.org>2020-06-15 14:10:08 +0200
commit5ddbc4082e1072eeeae52ff561a88620a05be08f (patch)
tree4f63655b80372b75dd21168d0ee8e754079bb1ef /include/linux/compiler_types.h
parentkcsan: Remove __no_kcsan_or_inline (diff)
downloadwireguard-linux-5ddbc4082e1072eeeae52ff561a88620a05be08f.tar.xz
wireguard-linux-5ddbc4082e1072eeeae52ff561a88620a05be08f.zip
x86, kcsan: Add __no_kcsan to noinstr
The 'noinstr' function attribute means no-instrumentation, this should very much include *SAN. Because lots of that is broken at present, only include KCSAN for now, as that is limited to clang11, which has sane function attribute behaviour. Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Diffstat (limited to 'include/linux/compiler_types.h')
-rw-r--r--include/linux/compiler_types.h8
1 files changed, 4 insertions, 4 deletions
diff --git a/include/linux/compiler_types.h b/include/linux/compiler_types.h
index 938249809511..a8b4266084a1 100644
--- a/include/linux/compiler_types.h
+++ b/include/linux/compiler_types.h
@@ -118,10 +118,6 @@ struct ftrace_likely_data {
#define notrace __attribute__((__no_instrument_function__))
#endif
-/* Section for code which can't be instrumented at all */
-#define noinstr \
- noinline notrace __attribute((__section__(".noinstr.text")))
-
/*
* it doesn't make sense on ARM (currently the only user of __naked)
* to trace naked functions because then mcount is called without
@@ -200,6 +196,10 @@ struct ftrace_likely_data {
#define __no_sanitize_or_inline __always_inline
#endif
+/* Section for code which can't be instrumented at all */
+#define noinstr \
+ noinline notrace __attribute((__section__(".noinstr.text"))) __no_kcsan
+
#endif /* __KERNEL__ */
#endif /* __ASSEMBLY__ */