diff options
Diffstat (limited to 'include/linux/compiler-gcc.h')
-rw-r--r-- | include/linux/compiler-gcc.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/include/linux/compiler-gcc.h b/include/linux/compiler-gcc.h index 4d36b27214fd..90ddfefb6c2b 100644 --- a/include/linux/compiler-gcc.h +++ b/include/linux/compiler-gcc.h | |||
@@ -194,6 +194,12 @@ | |||
194 | * Conflicts with inlining: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67368 | 194 | * Conflicts with inlining: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67368 |
195 | */ | 195 | */ |
196 | #define __no_sanitize_address __attribute__((no_sanitize_address)) | 196 | #define __no_sanitize_address __attribute__((no_sanitize_address)) |
197 | #ifdef CONFIG_KASAN | ||
198 | #define __no_sanitize_address_or_inline \ | ||
199 | __no_sanitize_address __maybe_unused notrace | ||
200 | #else | ||
201 | #define __no_sanitize_address_or_inline inline | ||
202 | #endif | ||
197 | #endif | 203 | #endif |
198 | 204 | ||
199 | #if GCC_VERSION >= 50100 | 205 | #if GCC_VERSION >= 50100 |
@@ -211,6 +217,7 @@ | |||
211 | 217 | ||
212 | #if !defined(__no_sanitize_address) | 218 | #if !defined(__no_sanitize_address) |
213 | #define __no_sanitize_address | 219 | #define __no_sanitize_address |
220 | #define __no_sanitize_address_or_inline inline | ||
214 | #endif | 221 | #endif |
215 | 222 | ||
216 | /* | 223 | /* |