diff options
Diffstat (limited to 'include/linux/compiler-gcc.h')
-rw-r--r-- | include/linux/compiler-gcc.h | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/include/linux/compiler-gcc.h b/include/linux/compiler-gcc.h index dfaa7b3e9ae9..8efb40e61d6e 100644 --- a/include/linux/compiler-gcc.h +++ b/include/linux/compiler-gcc.h | |||
@@ -237,12 +237,25 @@ | |||
237 | #define KASAN_ABI_VERSION 3 | 237 | #define KASAN_ABI_VERSION 3 |
238 | #endif | 238 | #endif |
239 | 239 | ||
240 | #if GCC_VERSION >= 40902 | ||
241 | /* | ||
242 | * Tell the compiler that address safety instrumentation (KASAN) | ||
243 | * should not be applied to that function. | ||
244 | * Conflicts with inlining: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67368 | ||
245 | */ | ||
246 | #define __no_sanitize_address __attribute__((no_sanitize_address)) | ||
247 | #endif | ||
248 | |||
240 | #endif /* gcc version >= 40000 specific checks */ | 249 | #endif /* gcc version >= 40000 specific checks */ |
241 | 250 | ||
242 | #if !defined(__noclone) | 251 | #if !defined(__noclone) |
243 | #define __noclone /* not needed */ | 252 | #define __noclone /* not needed */ |
244 | #endif | 253 | #endif |
245 | 254 | ||
255 | #if !defined(__no_sanitize_address) | ||
256 | #define __no_sanitize_address | ||
257 | #endif | ||
258 | |||
246 | /* | 259 | /* |
247 | * A trick to suppress uninitialized variable warning without generating any | 260 | * A trick to suppress uninitialized variable warning without generating any |
248 | * code | 261 | * code |