From: Sami Tolvanen Date: Mon, 8 Mar 2021 18:46:56 +0000 (-0800) Subject: kbuild: Allow LTO to be selected with KASAN_HW_TAGS X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=bf3c255150619b71badb328c4dab48401a7ed62d;p=linux.git kbuild: Allow LTO to be selected with KASAN_HW_TAGS While LTO with KASAN is normally not useful, hardware tag-based KASAN can be used also in production kernels with ARM64_MTE. Therefore, allow KASAN_HW_TAGS to be selected together with HAS_LTO_CLANG. Reported-by: Alistair Delva Signed-off-by: Sami Tolvanen Reviewed-by: Kees Cook Signed-off-by: Masahiro Yamada --- diff --git a/arch/Kconfig b/arch/Kconfig index 2bb30673d8e6f..2e7139b39e8f6 100644 --- a/arch/Kconfig +++ b/arch/Kconfig @@ -638,7 +638,7 @@ config HAS_LTO_CLANG depends on $(success,$(AR) --help | head -n 1 | grep -qi llvm) depends on ARCH_SUPPORTS_LTO_CLANG depends on !FTRACE_MCOUNT_USE_RECORDMCOUNT - depends on !KASAN + depends on !KASAN || KASAN_HW_TAGS depends on !GCOV_KERNEL help The compiler and Kconfig options support building with Clang's