* [PATCH] kbuild: Allow LTO to be selected with KASAN_HW_TAGS
@ 2021-03-08 18:46 Sami Tolvanen
2021-03-08 21:39 ` Kees Cook
0 siblings, 1 reply; 3+ messages in thread
From: Sami Tolvanen @ 2021-03-08 18:46 UTC (permalink / raw)
To: Masahiro Yamada, Kees Cook
Cc: Nick Desaulniers, Nathan Chancellor, linux-kbuild, linux-kernel,
Sami Tolvanen, Alistair Delva
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>
---
arch/Kconfig | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/Kconfig b/arch/Kconfig
index 2bb30673d8e6..2e7139b39e8f 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
base-commit: 144c79ef33536b4ecb4951e07dbc1f2b7fa99d32
--
2.30.1.766.gb4fecdf3b7-goog
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] kbuild: Allow LTO to be selected with KASAN_HW_TAGS
2021-03-08 18:46 [PATCH] kbuild: Allow LTO to be selected with KASAN_HW_TAGS Sami Tolvanen
@ 2021-03-08 21:39 ` Kees Cook
2021-03-09 17:12 ` Masahiro Yamada
0 siblings, 1 reply; 3+ messages in thread
From: Kees Cook @ 2021-03-08 21:39 UTC (permalink / raw)
To: Sami Tolvanen
Cc: Masahiro Yamada, Nick Desaulniers, Nathan Chancellor,
linux-kbuild, linux-kernel, Alistair Delva
On Mon, Mar 08, 2021 at 10:46:56AM -0800, Sami Tolvanen wrote:
> 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>
--
Kees Cook
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] kbuild: Allow LTO to be selected with KASAN_HW_TAGS
2021-03-08 21:39 ` Kees Cook
@ 2021-03-09 17:12 ` Masahiro Yamada
0 siblings, 0 replies; 3+ messages in thread
From: Masahiro Yamada @ 2021-03-09 17:12 UTC (permalink / raw)
To: Kees Cook
Cc: Sami Tolvanen, Nick Desaulniers, Nathan Chancellor,
Linux Kbuild mailing list, Linux Kernel Mailing List,
Alistair Delva
On Tue, Mar 9, 2021 at 6:39 AM Kees Cook <keescook@chromium.org> wrote:
>
> On Mon, Mar 08, 2021 at 10:46:56AM -0800, Sami Tolvanen wrote:
> > 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>
>
> --
> Kees Cook
Applied to linux-kbuild/fixes. Thanks.
--
Best Regards
Masahiro Yamada
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2021-03-09 17:14 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-03-08 18:46 [PATCH] kbuild: Allow LTO to be selected with KASAN_HW_TAGS Sami Tolvanen
2021-03-08 21:39 ` Kees Cook
2021-03-09 17:12 ` Masahiro Yamada
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.