]> git.dujemihanovic.xyz Git - linux.git/commit
rust: make mutually exclusive with CFI_CLANG
authorConor Dooley <conor.dooley@microchip.com>
Thu, 4 Apr 2024 14:17:02 +0000 (15:17 +0100)
committerMiguel Ojeda <ojeda@kernel.org>
Tue, 16 Apr 2024 19:13:43 +0000 (21:13 +0200)
commit8933cf4651e02853ca679be7b2d978dfcdcc5e0c
treeae19d711e37033f0a96ee8b40bca4434391c6194
parent7044dcff8301b29269016ebd17df27c4736140d2
rust: make mutually exclusive with CFI_CLANG

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/
Link: https://lore.kernel.org/rust-for-linux/CAOcBZOS2kPyH0Dm7Fuh4GC3=v7nZhyzBj_-dKu3PfAnrHZvaxg@mail.gmail.com/
Link: https://github.com/rust-lang/rust/issues/123479
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>
init/Kconfig