linux-stable/init
Conor Dooley 3a93374596 rust: make mutually exclusive with CFI_CLANG
commit 8933cf4651 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: 2f7ab1267d ("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>
2024-05-02 16:32:42 +02:00
..
.gitignore kbuild: build init/built-in.a just once 2022-09-29 04:40:15 +09:00
Kconfig rust: make mutually exclusive with CFI_CLANG 2024-05-02 16:32:42 +02:00
Makefile x86/retpoline: Make sure there are no unconverted return thunks due to KCSAN 2023-11-28 17:19:36 +00:00
build-version kbuild: build init/built-in.a just once 2022-09-29 04:40:15 +09:00
calibrate.c
do_mounts.c rootfs: Fix support for rootfstype= when root= is given 2024-01-25 15:35:46 -08:00
do_mounts.h init: pass root_device_name explicitly 2023-06-05 10:55:20 -06:00
do_mounts_initrd.c init: pass root_device_name explicitly 2023-06-05 10:55:20 -06:00
do_mounts_rd.c
init_task.c rcu-tasks: Add data structures for lightweight grace periods 2022-06-20 09:22:28 -07:00
initramfs.c init: open /initrd.image with O_LARGEFILE 2024-04-03 15:28:53 +02:00
main.c init/main.c: Fix potential static_command_line memory overflow 2024-04-27 17:11:41 +02:00
noinitramfs.c
version-timestamp.c init/version-timestamp.c: remove unneeded #include <linux/version.h> 2023-01-09 07:34:38 +09:00
version.c init/version.c: remove #include <generated/utsrelease.h> 2022-12-10 10:33:20 +09:00