summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorConor Dooley <conor.dooley@microchip.com>2024-04-04 15:17:02 +0100
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2024-05-02 16:35:25 +0200
commitf94e59d1c3699bb3470e5e601cbe96411137e975 (patch)
tree33ec9524c02f371721596f8f8bf177027db01883
parent2ce4005d93ffa77c5d2c78f72981ea20dba61273 (diff)
downloadlinux-stable-f94e59d1c3699bb3470e5e601cbe96411137e975.tar.gz
linux-stable-f94e59d1c3699bb3470e5e601cbe96411137e975.tar.bz2
linux-stable-f94e59d1c3699bb3470e5e601cbe96411137e975.zip
rust: make mutually exclusive with CFI_CLANG
commit 8933cf4651e02853ca679be7b2d978dfcdcc5e0c upstream. 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. [ Matthew Maurer writes [1]: This patch is fine by me - the last patch needed for KCFI to be functional in Rust just landed upstream last night, so we should revisit this (in the form of enabling it) once we move to `rustc-1.79.0` or later. Ramon de C Valle also gave feedback [2] on the status of KCFI for Rust and created a tracking issue [3] in upstream Rust. - Miguel ] Fixes: 2f7ab1267dc9 ("Kbuild: add Rust support") Cc: stable@vger.kernel.org Signed-off-by: Conor Dooley <conor.dooley@microchip.com> Acked-by: Nathan Chancellor <nathan@kernel.org> Link: https://lore.kernel.org/rust-for-linux/CAGSQo024u1gHJgzsO38Xg3c4or+JupoPABQx_+0BLEpPg0cOEA@mail.gmail.com/ [1] Link: https://lore.kernel.org/rust-for-linux/CAOcBZOS2kPyH0Dm7Fuh4GC3=v7nZhyzBj_-dKu3PfAnrHZvaxg@mail.gmail.com/ [2] Link: https://github.com/rust-lang/rust/issues/123479 [3] Link: https://lore.kernel.org/r/20240404-providing-emporium-e652e359c711@spud [ Added feedback from the list, links, and used Cc for the tag. ] Signed-off-by: Miguel Ojeda <ojeda@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r--init/Kconfig1
1 files changed, 1 insertions, 0 deletions
diff --git a/init/Kconfig b/init/Kconfig
index e111c44ea2d8..c8a155cf7209 100644
--- a/init/Kconfig
+++ b/init/Kconfig
@@ -1904,6 +1904,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