All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v3] rust: make mutually exclusive with CFI_CLANG
@ 2024-04-04 14:17 ` Conor Dooley
  0 siblings, 0 replies; 20+ messages in thread
From: Conor Dooley @ 2024-04-04 14:17 UTC (permalink / raw)
  To: linux-riscv
  Cc: conor, Conor Dooley, stable, Miguel Ojeda, Alex Gaynor,
	Wedson Almeida Filho, linux-kernel, rust-for-linux, Sami Tolvanen,
	Kees Cook, Nathan Chancellor, llvm

From: Conor Dooley <conor.dooley@microchip.com>

On RISC-V and arm64, and presumably x86, if CFI_CLANG is enabled,
loading a rust module will trigger a kernel panic. Support for
sanitisers, including kcfi (CFI_CLANG), is in the works, but for now
they're nightly-only options in rustc. Make RUST depend on !CFI_CLANG
to prevent configuring a kernel without symmetrical support for kfi.

Fixes: 2f7ab1267dc9 ("Kbuild: add Rust support")
cc: stable@vger.kernel.org
Signed-off-by: Conor Dooley <conor.dooley@microchip.com>
---
Sending this one on its own, there's no explicit dep on this for the
riscv enabling patch, v3 to continue the numbering from there. Nothing
has changed since v2.

CC: Miguel Ojeda <ojeda@kernel.org>
CC: Alex Gaynor <alex.gaynor@gmail.com>
CC: Wedson Almeida Filho <wedsonaf@gmail.com>
CC: linux-kernel@vger.kernel.org (open list)
CC: rust-for-linux@vger.kernel.org
CC: Sami Tolvanen <samitolvanen@google.com>
CC: Kees Cook <keescook@chromium.org>
CC: Nathan Chancellor <nathan@kernel.org>
CC: llvm@lists.linux.dev
---
 init/Kconfig | 1 +
 1 file changed, 1 insertion(+)

diff --git a/init/Kconfig b/init/Kconfig
index aa02aec6aa7d..ad9a2da27dc9 100644
--- a/init/Kconfig
+++ b/init/Kconfig
@@ -1899,6 +1899,7 @@ config RUST
 	bool "Rust support"
 	depends on HAVE_RUST
 	depends on RUST_IS_AVAILABLE
+	depends on !CFI_CLANG
 	depends on !MODVERSIONS
 	depends on !GCC_PLUGINS
 	depends on !RANDSTRUCT
-- 
2.43.0


_______________________________________________
linux-riscv mailing list
linux-riscv@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-riscv

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

end of thread, other threads:[~2024-04-07 20:03 UTC | newest]

Thread overview: 20+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-04-04 14:17 [PATCH v3] rust: make mutually exclusive with CFI_CLANG Conor Dooley
2024-04-04 14:17 ` Conor Dooley
2024-04-04 14:33 ` Miguel Ojeda
2024-04-04 14:33   ` Miguel Ojeda
2024-04-04 15:25   ` Matthew Maurer
2024-04-04 15:25     ` Matthew Maurer
2024-04-04 15:55     ` Conor Dooley
2024-04-04 15:55       ` Conor Dooley
2024-04-04 17:47     ` Miguel Ojeda
2024-04-04 17:47       ` Miguel Ojeda
2024-04-04 15:32 ` Nathan Chancellor
2024-04-04 15:32   ` Nathan Chancellor
2024-04-04 18:42   ` Miguel Ojeda
2024-04-04 18:42     ` Miguel Ojeda
2024-04-04 22:41     ` Ramon de C Valle
2024-04-04 22:41       ` Ramon de C Valle
     [not found]     ` <CAOcBZOTuqzwQncS8rMUMoOj3zE+FnLxPY6O=4EEaOP2xuFG9Vg@mail.gmail.com>
2024-04-05 10:30       ` Miguel Ojeda
2024-04-05 10:30         ` Miguel Ojeda
2024-04-07 20:02 ` Miguel Ojeda
2024-04-07 20:02   ` Miguel Ojeda

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.