kbuild: Allow LTO to be selected with KASAN_HW_TAGS
PATCH 1/1 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.
--- arch/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
arch/Kconfig +1 -1
@@ -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
base-commit: 144c79ef33536b4ecb4951e07dbc1f2b7fa99d32
Signature · 1 line
2.30.1.766.gb4fecdf3b7-goog
Quoted 6 lines · Sami Tolvanen
While LTO with KASAN is normally not useful, hardware tag-based KASAN can be used also in production kernels with
ARM64_MTE. Therefore, allowKASAN_HW_TAGSto be selected together withHAS_LTO_CLANG.Reported-by Alistair Delva <[email protected]>Signed-off-by Sami Tolvanen <[email protected]>
Signature · 1 line
Kees Cook
Quoted 6 lines · Kees Cook
Quoted 4 lines · Sami Tolvanen
While LTO with KASAN is normally not useful, hardware tag-based KASAN can be used also in production kernels with
ARM64_MTE. Therefore, allowKASAN_HW_TAGSto be selected together withHAS_LTO_CLANG.
Quoted 7 lines
Quoted 2 lines
Reported-by Alistair Delva <[email protected]>Signed-off-by Sami Tolvanen <[email protected]>Reviewed-by Kees Cook <[email protected]>--
Kees Cook
Applied to linux-kbuild/fixes. Thanks.
Signature · 2 lines
Best Regards Masahiro Yamada