All of lore.kernel.org
 help / color / mirror / Atom feed
From: Dave Hansen <dave.hansen@intel.com>
To: Matthew Maurer <mmaurer@google.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>
Cc: "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: Wed, 31 Jan 2024 12:31:55 -0800	[thread overview]
Message-ID: <ca0f2db8-e353-4f52-aaa1-35042e52ad91@intel.com> (raw)
In-Reply-To: <20231215194828.2611213-1-mmaurer@google.com>

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.

  parent reply	other threads:[~2024-01-31 20:31 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
2024-01-31 20:31 ` Dave Hansen [this message]
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=ca0f2db8-e353-4f52-aaa1-35042e52ad91@intel.com \
    --to=dave.hansen@intel.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@linux.intel.com \
    --cc=gary@garyguo.net \
    --cc=hpa@zytor.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@redhat.com \
    --cc=mmaurer@google.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.