[PATCH v3] rust: make mutually exclusive with CFI_CLANG

Miguel Ojeda miguel.ojeda.sandonis at gmail.com
Thu Apr 4 07:33:08 PDT 2024


On Thu, Apr 4, 2024 at 4:17 PM Conor Dooley <conor at kernel.org> wrote:
>
> From: Conor Dooley <conor.dooley at 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 at vger.kernel.org
> Signed-off-by: Conor Dooley <conor.dooley at 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 at kernel.org>
> CC: Alex Gaynor <alex.gaynor at gmail.com>
> CC: Wedson Almeida Filho <wedsonaf at gmail.com>
> CC: linux-kernel at vger.kernel.org (open list)
> CC: rust-for-linux at vger.kernel.org
> CC: Sami Tolvanen <samitolvanen at google.com>
> CC: Kees Cook <keescook at chromium.org>
> CC: Nathan Chancellor <nathan at kernel.org>
> CC: llvm at lists.linux.dev

Cc'ing Matthew & Ramon as well so that they are aware and in case they
want to comment.

Cheers,
Miguel



More information about the linux-riscv mailing list