Commit f39556bc authored by Miguel Ojeda's avatar Miguel Ojeda Committed by Andrew Morton

compiler-gcc: document minimum version for `__no_sanitize_coverage__`

The attribute was added in GCC 12.1.

This will simplify future cleanups, and is closer to what we do
in `compiler_attributes.h`.

Link: https://godbolt.org/z/MGbT76j6G
Link: https://lkml.kernel.org/r/20221021115956.9947-5-ojeda@kernel.orgSigned-off-by: default avatarMiguel Ojeda <ojeda@kernel.org>
Acked-by: default avatarMarco Elver <elver@google.com>
Reviewed-by: default avatarNathan Chancellor <nathan@kernel.org>
Cc: Alexander Potapenko <glider@google.com>
Cc: Andrey Konovalov <andreyknvl@gmail.com>
Cc: Arnd Bergmann <arnd@arndb.de>
Cc: Dan Li <ashimida@linux.alibaba.com>
Cc: Kees Cook <keescook@chromium.org>
Cc: Kumar Kartikeya Dwivedi <memxor@gmail.com>
Cc: Nick Desaulniers <ndesaulniers@google.com>
Cc: Uros Bizjak <ubizjak@gmail.com>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
parent 689540cb
...@@ -92,6 +92,9 @@ ...@@ -92,6 +92,9 @@
#define __no_sanitize_undefined __attribute__((__no_sanitize_undefined__)) #define __no_sanitize_undefined __attribute__((__no_sanitize_undefined__))
/*
* Only supported since gcc >= 12
*/
#if defined(CONFIG_KCOV) && __has_attribute(__no_sanitize_coverage__) #if defined(CONFIG_KCOV) && __has_attribute(__no_sanitize_coverage__)
#define __no_sanitize_coverage __attribute__((__no_sanitize_coverage__)) #define __no_sanitize_coverage __attribute__((__no_sanitize_coverage__))
#else #else
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment