[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <ca0f2db8-e353-4f52-aaa1-35042e52ad91@intel.com>
Date: Wed, 31 Jan 2024 12:31:55 -0800
From: Dave Hansen <dave.hansen@...el.com>
To: Matthew Maurer <mmaurer@...gle.com>, Thomas Gleixner
<tglx@...utronix.de>, Ingo Molnar <mingo@...hat.com>,
Borislav Petkov <bp@...en8.de>, Dave Hansen <dave.hansen@...ux.intel.com>,
x86@...nel.org, Miguel Ojeda <ojeda@...nel.org>,
Alex Gaynor <alex.gaynor@...il.com>,
Wedson Almeida Filho <wedsonaf@...il.com>
Cc: "H. Peter Anvin" <hpa@...or.com>, Boqun Feng <boqun.feng@...il.com>,
Gary Guo <gary@...yguo.net>, Björn Roy Baron
<bjorn3_gh@...tonmail.com>, Benno Lossin <benno.lossin@...ton.me>,
Andreas Hindborg <a.hindborg@...sung.com>, Alice Ryhl
<aliceryhl@...gle.com>, linux-kernel@...r.kernel.org,
rust-for-linux@...r.kernel.org
Subject: Re: [PATCH] x86: rust: Disable entry padding with Rust
On 12/15/23 11:39, Matthew Maurer wrote:
> +config HAVE_ENTRY_PADDING
> + def_bool CC_HAS_ENTRY_PADDING && !RUST
My only worry with this is that we need HAVE_ENTRY_PADDING for:
> config HAVE_CALL_THUNKS
> def_bool y
> depends on CC_HAS_ENTRY_PADDING && RETHUNK && OBJTOOL
..
> config CALL_DEPTH_TRACKING
> bool "Mitigate RSB underflow with call depth tracking"
> depends on CPU_SUP_INTEL && HAVE_CALL_THUNKS
so if they turn on RUST, they'll end up turning off CALL_DEPTH_TRACKING.
I'm wondering if it might be better to do this instead (temporarily of
course):
config RUST
bool "Rust support"
depends on HAVE_RUST
depends on RUST_IS_AVAILABLE
depends on !MODVERSIONS
depends on !GCC_PLUGINS
depends on !RANDSTRUCT
depends on !DEBUG_INFO_BTF || PAHOLE_HAS_LANG_EXCLUDE
+ depends on !CALL_THUNKS
That way, someone who is using CALL_DEPTH_TRACKING doesn't accidentally
lose it by turning on RUST. To turn on RUST, they'd first need to go
turn off the things that are selecting CALL_THUNKS.
Powered by blists - more mailing lists