diff --git a/include/linux/compiler-gcc.h b/include/linux/compiler-gcc.h index 36c1cdbeaa79..13adad32eb67 100644 --- a/include/linux/compiler-gcc.h +++ b/include/linux/compiler-gcc.h @@ -183,21 +183,6 @@ #define KASAN_ABI_VERSION 3 #endif -#if GCC_VERSION >= 40902 -/* - * Tell the compiler that address safety instrumentation (KASAN) - * should not be applied to that function. - * Conflicts with inlining: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67368 - */ -#define __no_sanitize_address __attribute__((no_sanitize_address)) -#ifdef CONFIG_KASAN -#define __no_sanitize_address_or_inline \ - __no_sanitize_address __maybe_unused notrace -#else -#define __no_sanitize_address_or_inline inline -#endif -#endif - #if GCC_VERSION >= 50100 /* * Mark structures as requiring designated initializers. @@ -217,7 +202,6 @@ #if !defined(__no_sanitize_address) #define __no_sanitize_address -#define __no_sanitize_address_or_inline inline #endif /* diff --git a/include/linux/compiler.h b/include/linux/compiler.h index bb22908c79e8..c9fd57ba4417 100644 --- a/include/linux/compiler.h +++ b/include/linux/compiler.h @@ -200,7 +200,7 @@ void __read_once_size(const volatile void *p, void *res, int size) * https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67368 * '__maybe_unused' allows us to avoid defined-but-not-used warnings. */ -# define __no_kasan_or_inline __no_sanitize_address __maybe_unused +# define __no_kasan_or_inline __no_sanitize_address notrace __maybe_unused #else # define __no_kasan_or_inline __always_inline #endif