The patch titled Subject: kasan: add no_sanitize attribute for clang builds has been added to the -mm tree. Its filename is kasan-add-no_sanitize-attribute-for-clang-builds.patch This patch should soon appear at http://ozlabs.org/~akpm/mmots/broken-out/kasan-add-no_sanitize-attribute-for-clang-builds.patch and later at http://ozlabs.org/~akpm/mmotm/broken-out/kasan-add-no_sanitize-attribute-for-clang-builds.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: Andrey Konovalov <andreyknvl@xxxxxxxxxx> Subject: kasan: add no_sanitize attribute for clang builds KASAN uses the __no_sanitize_address macro to disable instrumentation of particular functions. Right now it's defined only for GCC build, which causes false positives when clang is used. This patch adds a definition for clang. Note, that clang's revision 329612 or higher is required. Link: http://lkml.kernel.org/r/4ad725cc903f8534f8c8a60f0daade5e3d674f8d.1523554166.git.andreyknvl@xxxxxxxxxx Signed-off-by: Andrey Konovalov <andreyknvl@xxxxxxxxxx> Cc: Andrey Ryabinin <aryabinin@xxxxxxxxxxxxx> Cc: Alexander Potapenko <glider@xxxxxxxxxx> Cc: Dmitry Vyukov <dvyukov@xxxxxxxxxx> Cc: David Rientjes <rientjes@xxxxxxxxxx> Cc: Thomas Gleixner <tglx@xxxxxxxxxxxxx> Cc: Ingo Molnar <mingo@xxxxxxxxxx> Cc: David Woodhouse <dwmw@xxxxxxxxxxxx> Cc: Andrey Konovalov <andreyknvl@xxxxxxxxxx> Cc: Will Deacon <will.deacon@xxxxxxx> Cc: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx> Cc: Paul Lawrence <paullawrence@xxxxxxxxxx> Cc: Sandipan Das <sandipan@xxxxxxxxxxxxxxxxxx> Cc: Kees Cook <keescook@xxxxxxxxxxxx> Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> --- include/linux/compiler-clang.h | 5 +++++ 1 file changed, 5 insertions(+) diff -puN include/linux/compiler-clang.h~kasan-add-no_sanitize-attribute-for-clang-builds include/linux/compiler-clang.h --- a/include/linux/compiler-clang.h~kasan-add-no_sanitize-attribute-for-clang-builds +++ a/include/linux/compiler-clang.h @@ -25,6 +25,11 @@ #define __SANITIZE_ADDRESS__ #endif +#ifdef CONFIG_KASAN +#undef __no_sanitize_address +#define __no_sanitize_address __attribute__((no_sanitize("address"))) +#endif + /* Clang doesn't have a way to turn it off per-function, yet. */ #ifdef __noretpoline #undef __noretpoline _ Patches currently in -mm which might be from andreyknvl@xxxxxxxxxx are kasan-add-no_sanitize-attribute-for-clang-builds.patch -- To unsubscribe from this list: send the line "unsubscribe mm-commits" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html