From: Matthew Maurer <mmaurer@google.com>
To: Dave Hansen <dave.hansen@intel.com>
Cc: "Miguel Ojeda" <miguel.ojeda.sandonis@gmail.com>,
"Thomas Gleixner" <tglx@linutronix.de>,
"Ingo Molnar" <mingo@redhat.com>,
"Borislav Petkov" <bp@alien8.de>,
"Dave Hansen" <dave.hansen@linux.intel.com>,
x86@kernel.org, "Miguel Ojeda" <ojeda@kernel.org>,
"Alex Gaynor" <alex.gaynor@gmail.com>,
"Wedson Almeida Filho" <wedsonaf@gmail.com>,
"H. Peter Anvin" <hpa@zytor.com>,
"Boqun Feng" <boqun.feng@gmail.com>,
"Gary Guo" <gary@garyguo.net>,
"Björn Roy Baron" <bjorn3_gh@protonmail.com>,
"Benno Lossin" <benno.lossin@proton.me>,
"Andreas Hindborg" <a.hindborg@samsung.com>,
"Alice Ryhl" <aliceryhl@google.com>,
linux-kernel@vger.kernel.org, rust-for-linux@vger.kernel.org
Subject: Re: [PATCH] x86: rust: Disable entry padding with Rust
Date: Tue, 30 Jan 2024 15:54:25 -0800 [thread overview]
Message-ID: <CAGSQo01SLbT2rb8CnXx1hk-17-HHQzVNBqszAa4qMbpa-BbQfQ@mail.gmail.com> (raw)
In-Reply-To: <f17ce61b-7f4f-4851-aa23-b8489686b840@intel.com>
On Tue, Jan 30, 2024 at 3:46 PM Dave Hansen <dave.hansen@intel.com> wrote:
>
> On 1/28/24 09:48, Miguel Ojeda wrote:
> > On Fri, Dec 15, 2023 at 8:48 PM Matthew Maurer <mmaurer@google.com> wrote:
> >> rustc-1.73.0 used by Linux does not support entry padding. Mark entry
> >> padding support as explicitly incompatible with Rust.
> > We are now at 1.74.1 and moving to 1.75.0 for the next cycle, which
> > does not support it yet, in case whoever applies the patch wants to
> > update it in the description.
> >
> >> Signed-off-by: Matthew Maurer <mmaurer@google.com>
> > x86: are you picking this one up through your tree? Thanks!
>
> Do we need a 'rust-option' equivalent of 'cc-option', like:
>
> config CC_HAS_ENTRY_PADDING
> def_bool $(cc-option,-fpatchable-function-entry=16,16)
>
> That way this doesn't become a temporary option at all. We just do:
>
> config RUST_HAS_ENTRY_PADDING
> def_bool $(rust-option,-fpatchable-function-entry) # or whatever
>
> and:
>
> config HAVE_ENTRY_PADDING
> def_bool CC_HAS_ENTRY_PADDING
> depends on !RUST || RUST_HAS_ENTRY_PADDING
>
> and never have to touch this again.
I agree that we'll want something like that in the long term (my
original version of this patch did use something like `rs-option`),
but in this particular case the main thing still being bikeshedded in
the RFC[1] *is* how the option will be specified to the Rust compiler.
We could assume the current form of the RFC which is nearly signed off
on is what will happen, in which case we could add `rs-option` and
test for `-C patchable-function-entry=total_nops=16,prefix_nops=16`,
but there's a chance we could still have to update it until the flag
form is finalized.
Link: https://github.com/rust-lang/rfcs/pull/3543 [1]
next prev parent reply other threads:[~2024-01-30 23:54 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-12-15 19:39 [PATCH] x86: rust: Disable entry padding with Rust Matthew Maurer
2023-12-16 14:09 ` Martin Rodriguez Reboredo
2024-01-04 9:38 ` Alice Ryhl
2024-01-28 17:48 ` Miguel Ojeda
2024-01-30 23:46 ` Dave Hansen
2024-01-30 23:53 ` Miguel Ojeda
2024-01-30 23:54 ` Matthew Maurer [this message]
2024-01-31 20:31 ` Dave Hansen
2024-02-03 13:35 ` Miguel Ojeda
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=CAGSQo01SLbT2rb8CnXx1hk-17-HHQzVNBqszAa4qMbpa-BbQfQ@mail.gmail.com \
--to=mmaurer@google.com \
--cc=a.hindborg@samsung.com \
--cc=alex.gaynor@gmail.com \
--cc=aliceryhl@google.com \
--cc=benno.lossin@proton.me \
--cc=bjorn3_gh@protonmail.com \
--cc=boqun.feng@gmail.com \
--cc=bp@alien8.de \
--cc=dave.hansen@intel.com \
--cc=dave.hansen@linux.intel.com \
--cc=gary@garyguo.net \
--cc=hpa@zytor.com \
--cc=linux-kernel@vger.kernel.org \
--cc=miguel.ojeda.sandonis@gmail.com \
--cc=mingo@redhat.com \
--cc=ojeda@kernel.org \
--cc=rust-for-linux@vger.kernel.org \
--cc=tglx@linutronix.de \
--cc=wedsonaf@gmail.com \
--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;
as well as URLs for NNTP newsgroup(s).