FROMLIST: x86: rust: Disable entry padding with Rust

rustc-1.73.0 used by Linux does not support entry padding. Mark entry
padding support as explicitly incompatible with Rust.

Bug: 316624874
Link: https://lore.kernel.org/rust-for-linux/20231215194828.2611213-1-mmaurer@google.com/
Change-Id: I177faf86a72eb424f7b707d1e21e745994901ff6
Signed-off-by: Matthew Maurer <mmaurer@google.com>
This commit is contained in:
Matthew Maurer 2023-12-15 19:39:57 +00:00 committed by Treehugger Robot
parent b802a765fb
commit ae876716fc

View File

@ -2397,6 +2397,9 @@ config CC_HAS_RETURN_THUNK
config CC_HAS_ENTRY_PADDING
def_bool $(cc-option,-fpatchable-function-entry=16,16)
config HAVE_ENTRY_PADDING
def_bool CC_HAS_ENTRY_PADDING && !RUST
config FUNCTION_PADDING_CFI
int
default 59 if FUNCTION_ALIGNMENT_64B
@ -2414,17 +2417,17 @@ config FUNCTION_PADDING_BYTES
config CALL_PADDING
def_bool n
depends on CC_HAS_ENTRY_PADDING && OBJTOOL
depends on HAVE_ENTRY_PADDING && OBJTOOL
select FUNCTION_ALIGNMENT_16B
config FINEIBT
def_bool y
depends on X86_KERNEL_IBT && CFI_CLANG && RETPOLINE
depends on X86_KERNEL_IBT && CFI_CLANG && RETPOLINE && HAVE_ENTRY_PADDING
select CALL_PADDING
config HAVE_CALL_THUNKS
def_bool y
depends on CC_HAS_ENTRY_PADDING && RETHUNK && OBJTOOL
depends on HAVE_ENTRY_PADDING && RETHUNK && OBJTOOL
config CALL_THUNKS
def_bool n