The Linux Kernel Mailing List
 help / color / mirror / Atom feed
* [PATCH] ARM: Do not select HAVE_RUST when KASAN is enabled
@ 2026-05-11  8:02 Nathan Chancellor
  2026-05-11  8:21 ` Alice Ryhl
  2026-05-11 13:22 ` Christian Schrefl
  0 siblings, 2 replies; 5+ messages in thread
From: Nathan Chancellor @ 2026-05-11  8:02 UTC (permalink / raw)
  To: Russell King, Miguel Ojeda, Boqun Feng, Gary Guo,
	Björn Roy Baron, Benno Lossin, Andreas Hindborg, Alice Ryhl,
	Trevor Gross, Danilo Krummrich, Christian Schrrefl
  Cc: linux-arm-kernel, linux-kernel, rust-for-linux, stable,
	Nathan Chancellor

When KASAN is enabled, such as with allmodconfig, the build fails when
building the Rust code with:

  error: kernel-address sanitizer is not supported for this target

  error: aborting due to 1 previous error

  make[4]: *** [rust/Makefile:654: rust/core.o] Error 1

The arm-unknown-linux-gnueabi target does not support KASAN, so avoid
saying Rust is supported when it is enabled.

Cc: stable@vger.kernel.org
Fixes: ccb8ce526807 ("ARM: 9441/1: rust: Enable Rust support for ARMv7")
Link: https://github.com/Rust-for-Linux/linux/issues/1234
Signed-off-by: Nathan Chancellor <nathan@kernel.org>
---
 arch/arm/Kconfig | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
index 71fc5dd4123f..73e6647bea46 100644
--- a/arch/arm/Kconfig
+++ b/arch/arm/Kconfig
@@ -136,7 +136,7 @@ config ARM
 	select MMU_GATHER_RCU_TABLE_FREE if SMP && ARM_LPAE
 	select HAVE_REGS_AND_STACK_ACCESS_API
 	select HAVE_RSEQ
-	select HAVE_RUST if CPU_LITTLE_ENDIAN && CPU_32v7
+	select HAVE_RUST if CPU_LITTLE_ENDIAN && CPU_32v7 && !KASAN
 	select HAVE_STACKPROTECTOR
 	select HAVE_SYSCALL_TRACEPOINTS
 	select HAVE_UID16

---
base-commit: 5d6919055dec134de3c40167a490f33c74c12581
change-id: 20260511-arm-avoid-rust-with-kasan-7670981ef8b5

Best regards,
--  
Cheers,
Nathan


^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2026-05-11 13:22 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-05-11  8:02 [PATCH] ARM: Do not select HAVE_RUST when KASAN is enabled Nathan Chancellor
2026-05-11  8:21 ` Alice Ryhl
2026-05-11  9:09   ` Nathan Chancellor
2026-05-11  9:58     ` Miguel Ojeda
2026-05-11 13:22 ` Christian Schrefl

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox