Skip to content

Commit bf3c255

Browse files
samitolvanenmasahir0y
authored andcommitted
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 <adelva@google.com> Signed-off-by: Sami Tolvanen <samitolvanen@google.com> Reviewed-by: Kees Cook <keescook@chromium.org> Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
1 parent 2eab791 commit bf3c255

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

arch/Kconfig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -638,7 +638,7 @@ config HAS_LTO_CLANG
638638
depends on $(success,$(AR) --help | head -n 1 | grep -qi llvm)
639639
depends on ARCH_SUPPORTS_LTO_CLANG
640640
depends on !FTRACE_MCOUNT_USE_RECORDMCOUNT
641-
depends on !KASAN
641+
depends on !KASAN || KASAN_HW_TAGS
642642
depends on !GCOV_KERNEL
643643
help
644644
The compiler and Kconfig options support building with Clang's

0 commit comments

Comments
 (0)