From: Borislav Petkov <bp@alien8.de>
To: Miguel Ojeda <miguel.ojeda.sandonis@gmail.com>,
Miguel Ojeda <ojeda@kernel.org>
Cc: "Thomas Gleixner" <tglx@kernel.org>,
"Peter Zijlstra" <peterz@infradead.org>,
"Josh Poimboeuf" <jpoimboe@kernel.org>,
"Ingo Molnar" <mingo@redhat.com>,
"Dave Hansen" <dave.hansen@linux.intel.com>,
x86@kernel.org, "Sami Tolvanen" <samitolvanen@google.com>,
"Kees Cook" <kees@kernel.org>,
"Nathan Chancellor" <nathan@kernel.org>,
"Nicolas Schier" <nsc@kernel.org>,
"Pawan Gupta" <pawan.kumar.gupta@linux.intel.com>,
"H. Peter Anvin" <hpa@zytor.com>,
linux-kernel@vger.kernel.org, llvm@lists.linux.dev,
"Boqun Feng" <boqun@kernel.org>, "Gary Guo" <gary@garyguo.net>,
"Björn Roy Baron" <bjorn3_gh@protonmail.com>,
"Benno Lossin" <lossin@kernel.org>,
"Andreas Hindborg" <a.hindborg@kernel.org>,
"Alice Ryhl" <aliceryhl@google.com>,
"Trevor Gross" <tmgross@umich.edu>,
"Danilo Krummrich" <dakr@kernel.org>,
"Daniel Almeida" <daniel.almeida@collabora.com>,
"Tamir Duberstein" <tamird@kernel.org>,
"Alexandre Courbot" <acourbot@nvidia.com>,
"Onur Özkan" <work@onurozkan.dev>,
rust-for-linux@vger.kernel.org, linux-kbuild@vger.kernel.org,
stable@vger.kernel.org,
"Kent Overstreet" <kent.overstreet@linux.dev>
Subject: Re: [PATCH] x86/rust: use `-Zindirect-branch-cs-prefix` for RETPOLINE builds
Date: Tue, 10 Nov 2026 21:53:21 +0000 [thread overview]
Message-ID: <E91BAC6B-9F08-4801-8866-2BB0ECAAB349@alien8.de> (raw)
In-Reply-To: <CANiq72npfiOC2ZCan-zAe-h79kba_5jtWFAeAoigCs_hnO8gJA@mail.gmail.com>
On November 10, 2026 8:31:08 PM UTC, Miguel Ojeda <miguel.ojeda.sandonis@gmail.com> wrote:
>On Sun, Oct 18, 2026 at 7:55 PM Miguel Ojeda <ojeda@kernel.org> wrote:
>>
>> The C compiler is asked to add a `cs` prefix to the `call` and `jmp`
>> instructions that go through the indirect thunks for the `r8`-`r15`
>> registers, which makes them 6 bytes long instead of 5. That gives
>> `patch_retpoline()` enough room to inline them, e.g. as `lfence; call
>> *%r11` for `spectre_v2=retpoline,lfence`.
>>
>> However, Rust code does not get the prefix, e.g. for a
>> `CONFIG_MITIGATION_RETPOLINE=y` build:
>
>Any comments on this?
>
>If it helps, then I am happy to take it via one of the Rust trees with
>an Acked-by from x86.
>
>Thanks!
>
>Cheers,
>Miguel
LGTM.
Acked-by: Borislav Petkov <bp@alien8.de>
--
Small device. Typos and formatting crap
prev parent reply other threads:[~2026-11-10 21:54 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-18 17:54 Miguel Ojeda
2026-10-18 17:56 ` Miguel Ojeda
2026-11-10 20:31 ` Miguel Ojeda
2026-11-10 21:53 ` Borislav Petkov [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=E91BAC6B-9F08-4801-8866-2BB0ECAAB349@alien8.de \
--to=bp@alien8.de \
--cc=a.hindborg@kernel.org \
--cc=acourbot@nvidia.com \
--cc=aliceryhl@google.com \
--cc=bjorn3_gh@protonmail.com \
--cc=boqun@kernel.org \
--cc=dakr@kernel.org \
--cc=daniel.almeida@collabora.com \
--cc=dave.hansen@linux.intel.com \
--cc=gary@garyguo.net \
--cc=hpa@zytor.com \
--cc=jpoimboe@kernel.org \
--cc=kees@kernel.org \
--cc=kent.overstreet@linux.dev \
--cc=linux-kbuild@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=llvm@lists.linux.dev \
--cc=lossin@kernel.org \
--cc=miguel.ojeda.sandonis@gmail.com \
--cc=mingo@redhat.com \
--cc=nathan@kernel.org \
--cc=nsc@kernel.org \
--cc=ojeda@kernel.org \
--cc=pawan.kumar.gupta@linux.intel.com \
--cc=peterz@infradead.org \
--cc=rust-for-linux@vger.kernel.org \
--cc=samitolvanen@google.com \
--cc=stable@vger.kernel.org \
--cc=tamird@kernel.org \
--cc=tglx@kernel.org \
--cc=tmgross@umich.edu \
--cc=work@onurozkan.dev \
--cc=x86@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®