The patch titled Subject: kcov: add __no_sanitize_coverage to fix noinstr for all architectures has been added to the -mm tree. Its filename is kcov-add-__no_sanitize_coverage-to-fix-noinstr-for-all-architectures-v3.patch This patch should soon appear at https://ozlabs.org/~akpm/mmots/broken-out/kcov-add-__no_sanitize_coverage-to-fix-noinstr-for-all-architectures-v3.patch and later at https://ozlabs.org/~akpm/mmotm/broken-out/kcov-add-__no_sanitize_coverage-to-fix-noinstr-for-all-architectures-v3.patch Before you just go and hit "reply", please: a) Consider who else should be cc'ed b) Prefer to cc a suitable mailing list as well c) Ideally: find the original patch on the mailing list and do a reply-to-all to that, adding suitable additional cc's *** Remember to use Documentation/process/submit-checklist.rst when testing your code *** The -mm tree is included into linux-next and is updated there every 3-4 working days ------------------------------------------------------ From: Marco Elver <elver@xxxxxxxxxx> Subject: kcov: add __no_sanitize_coverage to fix noinstr for all architectures add comment explaining __has_feature() in Clang Link: https://lkml.kernel.org/r/20210527194448.3470080-1-elver@xxxxxxxxxx Signed-off-by: Marco Elver <elver@xxxxxxxxxx> Acked-by: Peter Zijlstra (Intel) <peterz@xxxxxxxxxxxxx> Reviewed-by: Miguel Ojeda <ojeda@xxxxxxxxxx> Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> --- include/linux/compiler-clang.h | 6 ++++++ 1 file changed, 6 insertions(+) --- a/include/linux/compiler-clang.h~kcov-add-__no_sanitize_coverage-to-fix-noinstr-for-all-architectures-v3 +++ a/include/linux/compiler-clang.h @@ -13,6 +13,12 @@ /* 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__ _ Patches currently in -mm which might be from elver@xxxxxxxxxx are kfence-use-task_idle-when-awaiting-allocation.patch mm-slub-change-run-time-assertion-in-kmalloc_index-to-compile-time-fix.patch printk-introduce-dump_stack_lvl-fix.patch kfence-unconditionally-use-unbound-work-queue.patch kcov-add-__no_sanitize_coverage-to-fix-noinstr-for-all-architectures.patch kcov-add-__no_sanitize_coverage-to-fix-noinstr-for-all-architectures-v2.patch kcov-add-__no_sanitize_coverage-to-fix-noinstr-for-all-architectures-v3.patch