Re: [PATCH] loongarch: Do not select HAVE_RUST when KASAN is enabled

From: Huacai Chen

Date: Fri Sep 04 2026 - 03:10:29 EST


On Fri, Sep 4, 2026 at 7:04 AM Miguel Ojeda
<miguel.ojeda.sandonis@xxxxxxxxx> wrote:
>
> On Thu, Sep 3, 2026 at 10:12 PM Nathan Chancellor <nathan@xxxxxxxxxx> 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@xxxxxxxxxx>
>
> 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
>