Re: [PATCH v2b] rust: cfi: add support for CFI_CLANG with Rust

Miguel Ojeda
2024-09-16T14:07:22Z

On Mon, Aug 19, 2024 at 9:55 AM Alice Ryhl <aliceryhl@google.com> wrote:
>
> +PADDING_RUSTFLAGS := -Zpatchable-function-entry=$(CONFIG_FUNCTION_PADDING_BYTES),$(CONFIG_FUNCTION_PADDING_BYTES)
> +KBUILD_RUSTFLAGS += $(PADDING_RUSTFLAGS)
> +export PADDING_RUSTFLAGS

It is possible to have CALL_PADDING && !FINEIBT, which means one can
trigger a build error if the compiler is not recent enough. Should we
test for CALL_PADDING here?

> + depends on !FINEIBT || RUSTC_VERSION >= 108000

Cheers,
Miguel