[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <87bk21tqf4.ffs@tglx>
Date: Fri, 09 Aug 2024 22:03:11 +0200
From: Thomas Gleixner <tglx@...utronix.de>
To: Miguel Ojeda <ojeda@...nel.org>, Josh Poimboeuf <jpoimboe@...nel.org>,
Peter Zijlstra <peterz@...radead.org>, Ingo Molnar <mingo@...hat.com>,
Borislav Petkov <bp@...en8.de>, Dave Hansen <dave.hansen@...ux.intel.com>,
Masahiro Yamada <masahiroy@...nel.org>
Cc: x86@...nel.org, "H. Peter Anvin" <hpa@...or.com>, Nathan Chancellor
<nathan@...nel.org>, Nicolas Schier <nicolas@...sle.eu>, Miguel Ojeda
<ojeda@...nel.org>, Wedson Almeida Filho <wedsonaf@...il.com>, Alex Gaynor
<alex.gaynor@...il.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>,
rust-for-linux@...r.kernel.org, linux-kernel@...r.kernel.org,
patches@...ts.linux.dev
Subject: Re: [PATCH v3 3/6] x86/rust: support MITIGATION_RETHUNK
On Thu, Jul 25 2024 at 20:33, Miguel Ojeda wrote:
> The Rust compiler added support for `-Zfunction-return=thunk-extern` [1]
> in 1.76.0 [2], i.e. the equivalent of `-mfunction-return=thunk-extern`.
> Thus add support for `MITIGATION_RETHUNK`.
>
> Without this, `objtool` would warn if enabled for Rust and already warns
> under IBT builds, e.g.:
>
> samples/rust/rust_print.o: warning: objtool:
> _R...init+0xa5c: 'naked' return found in RETHUNK build
>
> Link: https://github.com/rust-lang/rust/issues/116853 [1]
> Link: https://github.com/rust-lang/rust/pull/116892 [2]
> Reviewed-by: Gary Guo <gary@...yguo.net>
> Tested-by: Alice Ryhl <aliceryhl@...gle.com>
> Tested-by: Benno Lossin <benno.lossin@...ton.me>
> Signed-off-by: Miguel Ojeda <ojeda@...nel.org>
Reviewed-by: Thomas Gleixner <tglx@...utronix.de>
Powered by blists - more mailing lists