The patch titled Subject: kasan-fix-hwasan-build-for-gcc-fix has been added to the -mm tree. Its filename is kasan-fix-hwasan-build-for-gcc-fix.patch This patch should soon appear at https://ozlabs.org/~akpm/mmots/broken-out/kasan-fix-hwasan-build-for-gcc-fix.patch and later at https://ozlabs.org/~akpm/mmotm/broken-out/kasan-fix-hwasan-build-for-gcc-fix.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: kasan-fix-hwasan-build-for-gcc-fix fixup for "kasan: fix hwasan build for gcc" Link: https://lkml.kernel.org/r/YHQZVfVVLE/LDK2v@xxxxxxxxxxxxxxxx Signed-off-by: Marco Elver <elver@xxxxxxxxxx> Acked-byh: Andrey Konovalov <andreyknvl@xxxxxxxxx> Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> --- scripts/Makefile.kasan | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) --- a/scripts/Makefile.kasan~kasan-fix-hwasan-build-for-gcc-fix +++ a/scripts/Makefile.kasan @@ -2,6 +2,8 @@ CFLAGS_KASAN_NOSANITIZE := -fno-builtin KASAN_SHADOW_OFFSET ?= $(CONFIG_KASAN_SHADOW_OFFSET) +cc-param = $(call cc-option, -mllvm -$(1), $(call cc-option, --param $(1))) + ifdef CONFIG_KASAN_GENERIC ifdef CONFIG_KASAN_INLINE @@ -12,8 +14,6 @@ endif CFLAGS_KASAN_MINIMAL := -fsanitize=kernel-address -cc-param = $(call cc-option, -mllvm -$(1), $(call cc-option, --param $(1))) - # -fasan-shadow-offset fails without -fsanitize CFLAGS_KASAN_SHADOW := $(call cc-option, -fsanitize=kernel-address \ -fasan-shadow-offset=$(KASAN_SHADOW_OFFSET), \ _ Patches currently in -mm which might be from elver@xxxxxxxxxx are kasan-fix-hwasan-build-for-gcc-fix.patch kfence-zero-guard-page-after-out-of-bounds-access.patch