]> Git Repo - J-linux.git/blobdiff - include/linux/compiler_types.h
Merge tag 'lkmm.2024.05.10a' of git://git.kernel.org/pub/scm/linux/kernel/git/paulmck...
[J-linux.git] / include / linux / compiler_types.h
index 2abaa3a825a9ec3f86a69e6e9cf169ad9614b20c..8f8236317d5b15b97d059f3684e16d9ddb247317 100644 (file)
@@ -278,6 +278,17 @@ struct ftrace_likely_data {
 # define __no_kcsan
 #endif
 
+#ifdef __SANITIZE_MEMORY__
+/*
+ * Similarly to KASAN and KCSAN, KMSAN loses function attributes of inlined
+ * functions, therefore disabling KMSAN checks also requires disabling inlining.
+ *
+ * __no_sanitize_or_inline effectively prevents KMSAN from reporting errors
+ * within the function and marks all its outputs as initialized.
+ */
+# define __no_sanitize_or_inline __no_kmsan_checks notrace __maybe_unused
+#endif
+
 #ifndef __no_sanitize_or_inline
 #define __no_sanitize_or_inline __always_inline
 #endif
This page took 0.030705 seconds and 4 git commands to generate.