arch/loongarch/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
After commit 2625480a1bf7 ("hardening: Default randstruct off with rust
for better allmodconfig support"), which allows Rust to be enabled for
allmodconfig, ARCH=loongarch allmodconfig starts failing with:
error: kernel-address sanitizer is not supported for this target
error: aborting due to 1 previous error
make[4]: *** [rust/Makefile:741: rust/core.o] Error 1
For the same reason as commit 84a0f7caafc6 ("ARM: Do not select
HAVE_RUST when KASAN is enabled"), do not select HAVE_RUST when KASAN is
enabled until the loongarch64-unknown-none-softfloat target in rustc
supports KASAN.
Fixes: 90868ff9cade ("LoongArch: Enable initial Rust support")
Signed-off-by: Nathan Chancellor <nathan@kernel.org>
---
arch/loongarch/Kconfig | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/loongarch/Kconfig b/arch/loongarch/Kconfig
index a21f51e5815e..2067d1f2ad7a 100644
--- a/arch/loongarch/Kconfig
+++ b/arch/loongarch/Kconfig
@@ -175,7 +175,7 @@ config LOONGARCH
select HAVE_RELIABLE_STACKTRACE if UNWINDER_ORC
select HAVE_RETHOOK
select HAVE_RSEQ
- select HAVE_RUST
+ select HAVE_RUST if !KASAN
select HAVE_SAMPLE_FTRACE_DIRECT
select HAVE_SAMPLE_FTRACE_DIRECT_MULTI
select HAVE_SETUP_PER_CPU_AREA if NUMA
---
base-commit: 940de590b839f71d6dc846160534bf202401b8b7
change-id: 20260903-loongarch-disable-rust-with-kasan-ee6ca248bf1c
Best regards,
--
Cheers,
Nathan
On Thu, Sep 3, 2026 at 10:12 PM Nathan Chancellor <nathan@kernel.org> wrote:
>
> After commit 2625480a1bf7 ("hardening: Default randstruct off with rust
> for better allmodconfig support"), which allows Rust to be enabled for
> allmodconfig, ARCH=loongarch allmodconfig starts failing with:
>
> error: kernel-address sanitizer is not supported for this target
>
> error: aborting due to 1 previous error
>
> make[4]: *** [rust/Makefile:741: rust/core.o] Error 1
>
> For the same reason as commit 84a0f7caafc6 ("ARM: Do not select
> HAVE_RUST when KASAN is enabled"), do not select HAVE_RUST when KASAN is
> enabled until the loongarch64-unknown-none-softfloat target in rustc
> supports KASAN.
>
> Fixes: 90868ff9cade ("LoongArch: Enable initial Rust support")
> Signed-off-by: Nathan Chancellor <nathan@kernel.org>
Sounds good to me -- if LoongArch gives their Acked-by, then I can
take it in the rust-fixes PR I will send soon; otherwise, this can go
through their tree or Kbuild's I guess.
Thanks!
Cheers,
Miguel
On Fri, Sep 4, 2026 at 7:04 AM Miguel Ojeda
<miguel.ojeda.sandonis@gmail.com> wrote:
>
> On Thu, Sep 3, 2026 at 10:12 PM Nathan Chancellor <nathan@kernel.org> wrote:
> >
> > After commit 2625480a1bf7 ("hardening: Default randstruct off with rust
> > for better allmodconfig support"), which allows Rust to be enabled for
> > allmodconfig, ARCH=loongarch allmodconfig starts failing with:
> >
> > error: kernel-address sanitizer is not supported for this target
> >
> > error: aborting due to 1 previous error
> >
> > make[4]: *** [rust/Makefile:741: rust/core.o] Error 1
> >
> > For the same reason as commit 84a0f7caafc6 ("ARM: Do not select
> > HAVE_RUST when KASAN is enabled"), do not select HAVE_RUST when KASAN is
> > enabled until the loongarch64-unknown-none-softfloat target in rustc
> > supports KASAN.
> >
> > Fixes: 90868ff9cade ("LoongArch: Enable initial Rust support")
> > Signed-off-by: Nathan Chancellor <nathan@kernel.org>
>
> Sounds good to me -- if LoongArch gives their Acked-by, then I can
> take it in the rust-fixes PR I will send soon; otherwise, this can go
> through their tree or Kbuild's I guess.
I queued for loongarch-fixes, thanks.
Huacai
>
> Thanks!
>
> Cheers,
> Miguel
>
On Fri, Sep 4, 2026 at 8:51 AM Huacai Chen <chenhuacai@kernel.org> wrote: > > I queued for loongarch-fixes, thanks. Great, thanks, please feel free to add my Acked-by: Acked-by: Miguel Ojeda <ojeda@kernel.org> Cheers, Miguel
© 2016 - 2026 Red Hat, Inc.