]> www.infradead.org Git - users/jedix/linux-maple.git/commitdiff
kcov: add __no_sanitize_coverage to fix noinstr for all architectures
authorMarco Elver <elver@google.com>
Wed, 2 Jun 2021 03:53:15 +0000 (13:53 +1000)
committerStephen Rothwell <sfr@canb.auug.org.au>
Wed, 2 Jun 2021 03:53:15 +0000 (13:53 +1000)
add comment explaining __has_feature() in Clang

Link: https://lkml.kernel.org/r/20210527194448.3470080-1-elver@google.com
Signed-off-by: Marco Elver <elver@google.com>
Acked-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Reviewed-by: Miguel Ojeda <ojeda@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
include/linux/compiler-clang.h

index e15eebfa8e5d4a6eb8ef72fa33a2f641e9061428..49b0ac8b6fd323b422c047043126951bd0c68531 100644 (file)
 /* all clang versions usable with the kernel support KASAN ABI version 5 */
 #define KASAN_ABI_VERSION 5
 
+/*
+ * Note: Checking __has_feature(*_sanitizer) is only true if the feature is
+ * enabled. Therefore it is not required to additionally check defined(CONFIG_*)
+ * to avoid adding redundant attributes in other configurations.
+ */
+
 #if __has_feature(address_sanitizer) || __has_feature(hwaddress_sanitizer)
 /* Emulate GCC's __SANITIZE_ADDRESS__ flag */
 #define __SANITIZE_ADDRESS__