diff options
Diffstat (limited to 'include/linux/compiler-clang.h')
-rw-r--r-- | include/linux/compiler-clang.h | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/include/linux/compiler-clang.h b/include/linux/compiler-clang.h index 3e7dafb3ea80..39f668d5066b 100644 --- a/include/linux/compiler-clang.h +++ b/include/linux/compiler-clang.h | |||
@@ -16,9 +16,13 @@ | |||
16 | /* all clang versions usable with the kernel support KASAN ABI version 5 */ | 16 | /* all clang versions usable with the kernel support KASAN ABI version 5 */ |
17 | #define KASAN_ABI_VERSION 5 | 17 | #define KASAN_ABI_VERSION 5 |
18 | 18 | ||
19 | #if __has_feature(address_sanitizer) || __has_feature(hwaddress_sanitizer) | ||
19 | /* emulate gcc's __SANITIZE_ADDRESS__ flag */ | 20 | /* emulate gcc's __SANITIZE_ADDRESS__ flag */ |
20 | #if __has_feature(address_sanitizer) | ||
21 | #define __SANITIZE_ADDRESS__ | 21 | #define __SANITIZE_ADDRESS__ |
22 | #define __no_sanitize_address \ | ||
23 | __attribute__((no_sanitize("address", "hwaddress"))) | ||
24 | #else | ||
25 | #define __no_sanitize_address | ||
22 | #endif | 26 | #endif |
23 | 27 | ||
24 | /* | 28 | /* |