public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Peter Zijlstra <peterz@infradead.org>
To: Miguel Ojeda <miguel.ojeda.sandonis@gmail.com>
Cc: Ramon de C Valle <rcvalle@google.com>,
	Matthew Maurer <mmaurer@google.com>,
	linux-kernel@vger.kernel.org, ojeda@kernel.org,
	linux-tip-commits@vger.kernel.org,
	Scott Constable <scott.d.constable@intel.com>,
	Ingo Molnar <mingo@kernel.org>, Kees Cook <kees@kernel.org>,
	x86@kernel.org, Sami Tolvanen <samitolvanen@google.com>,
	Alice Ryhl <aliceryhl@google.com>
Subject: Re: [tip: x86/core] x86/ibt: Implement FineIBT-BHI mitigation
Date: Mon, 10 Mar 2025 17:02:42 +0100	[thread overview]
Message-ID: <20250310160242.GH19344@noisy.programming.kicks-ass.net> (raw)
In-Reply-To: <CANiq72=3ghFxy8E=AU9p+0imFxKr5iU3sd0hVUXed5BA+KjdNQ@mail.gmail.com>

On Mon, Mar 10, 2025 at 05:00:47PM +0100, Miguel Ojeda wrote:
> On Wed, Feb 26, 2025 at 8:53 PM Peter Zijlstra <peterz@infradead.org> wrote:
> >
> > On Wed, Feb 26, 2025 at 12:54:35PM -0000, tip-bot2 for Peter Zijlstra wrote:
> >
> > > +config CC_HAS_KCFI_ARITY
> > > +     def_bool $(cc-option,-fsanitize=kcfi -fsanitize-kcfi-arity)
> > > +     depends on CC_IS_CLANG && !RUST
> > > +
> >
> > Miguel, can we work on fixing that !RUST dep?
> 
> Thanks for the ping Peter -- we discussed `rustc` in the couple PRs
> that added it to LLVM back then, and I think the conclusion was that
> it shouldn't be a fundamental problem to add it to `rustc`.
> 
> From a quick look, the Clang flag that eventually landed just emits
> one more `llvm.module.flags` and LLVM takes care of the rest. So it
> should be straightforward to add a `-Csanitize-kcfi-arity` in `rustc`
> and then pass it at the same time to both Clang and `rustc` in the
> kernel.
> 
> But I may be missing something -- Cc'ing Ramon and Matthew, since they
> are the ones behind sanitizers and kCFI in upstream Rust.
> 
> I added it to our list, and created an issue in upstream Rust for it:
> 
>     https://github.com/rust-lang/rust/issues/138311
>     https://github.com/Rust-for-Linux/linux/issues/355
> 
> I will also mention it in the meeting with upstream Rust in a couple days.

Thanks!, let me know if there's anything I can do. I'm happy to test
patches.

  reply	other threads:[~2025-03-10 16:04 UTC|newest]

Thread overview: 56+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-02-24 12:37 [PATCH v4 00/10] x86/ibt: FineIBT-BHI Peter Zijlstra
2025-02-24 12:37 ` [PATCH v4 01/10] x86/cfi: Add warn option Peter Zijlstra
2025-02-24 18:57   ` Kees Cook
2025-02-26 10:54   ` [tip: x86/core] " tip-bot2 for Peter Zijlstra
2025-02-26 12:04   ` [tip: x86/core] x86/cfi: Add 'cfi=warn' boot option tip-bot2 for Peter Zijlstra
2025-02-24 12:37 ` [PATCH v4 02/10] x86/ibt: Add exact_endbr() helper Peter Zijlstra
2025-02-26 10:54   ` [tip: x86/core] " tip-bot2 for Peter Zijlstra
2025-02-26 12:04   ` tip-bot2 for Peter Zijlstra
2025-02-24 12:37 ` [PATCH v4 03/10] x86/traps: Decode 0xEA #UD Peter Zijlstra
2025-02-24 18:58   ` Kees Cook
2025-02-26 10:54   ` [tip: x86/core] " tip-bot2 for Peter Zijlstra
2025-02-26 12:04   ` [tip: x86/core] x86/traps: Decode 0xEA instructions as #UD tip-bot2 for Peter Zijlstra
2025-02-24 12:37 ` [PATCH v4 04/10] x86/traps: Allow custom fixups in handle_bug() Peter Zijlstra
2025-02-24 18:59   ` Kees Cook
2025-02-25  8:54     ` Peter Zijlstra
2025-02-26 10:54   ` [tip: x86/core] " tip-bot2 for Peter Zijlstra
2025-02-26 12:04   ` tip-bot2 for Peter Zijlstra
2025-02-24 12:37 ` [PATCH v4 05/10] x86/ibt: Optimize FineIBT sequence Peter Zijlstra
2025-02-26 10:54   ` [tip: x86/core] " tip-bot2 for Peter Zijlstra
2025-02-26 12:04   ` [tip: x86/core] x86/ibt: Optimize the FineIBT instruction sequence tip-bot2 for Peter Zijlstra
2025-02-24 12:37 ` [PATCH v4 06/10] x86/traps: Decode LOCK Jcc.d8 #UD Peter Zijlstra
2025-02-24 21:46   ` David Laight
2025-02-25 18:33     ` Kees Cook
2025-02-26 10:54   ` [tip: x86/core] " tip-bot2 for Peter Zijlstra
2025-02-26 12:04   ` [tip: x86/core] x86/traps: Decode LOCK Jcc.d8 as #UD tip-bot2 for Peter Zijlstra
2025-02-24 12:37 ` [PATCH v4 07/10] x86/ibt: Add paranoid FineIBT mode Peter Zijlstra
2025-02-24 19:00   ` Kees Cook
2025-02-26 10:54   ` [tip: x86/core] " tip-bot2 for Peter Zijlstra
2025-02-26 12:04   ` tip-bot2 for Peter Zijlstra
2025-02-24 12:37 ` [PATCH v4 08/10] x86: BHI stubs Peter Zijlstra
2025-02-24 19:01   ` Kees Cook
2025-02-25  8:52     ` Peter Zijlstra
2025-02-25 18:31       ` Kees Cook
2025-02-26 10:54   ` [tip: x86/core] " tip-bot2 for Peter Zijlstra
2025-02-26 12:04   ` [tip: x86/core] x86/bhi: Add " tip-bot2 for Peter Zijlstra
2025-02-26 12:54   ` tip-bot2 for Peter Zijlstra
2025-02-24 12:37 ` [PATCH v4 09/10] x86/ibt: Implement FineIBT-BHI mitigation Peter Zijlstra
2025-02-25  9:12   ` Peter Zijlstra
2025-02-26  0:04     ` Constable, Scott D
2025-02-26 10:54   ` [tip: x86/core] " tip-bot2 for Peter Zijlstra
2025-02-26 12:04   ` tip-bot2 for Peter Zijlstra
2025-02-26 12:54   ` tip-bot2 for Peter Zijlstra
2025-02-26 19:53     ` Peter Zijlstra
2025-03-10  8:55       ` Peter Zijlstra
2025-03-10 16:00       ` Miguel Ojeda
2025-03-10 16:02         ` Peter Zijlstra [this message]
2025-03-11 19:09           ` Ramon de C Valle
2025-03-11 19:41             ` Miguel Ojeda
2025-03-11 20:23               ` Ramon de C Valle
2025-03-12  9:16                 ` Peter Zijlstra
2025-03-12 11:36                   ` Miguel Ojeda
2025-03-19  0:04                     ` Nathan Chancellor
2025-02-24 12:37 ` [PATCH v4 10/10] x86/ibt: Optimize fineibt-bhi arity 1 case Peter Zijlstra
2025-02-26 10:54   ` [tip: x86/core] " tip-bot2 for Peter Zijlstra
2025-02-26 12:04   ` [tip: x86/core] x86/ibt: Optimize the " tip-bot2 for Peter Zijlstra
2025-02-26 12:54   ` tip-bot2 for Peter Zijlstra

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=20250310160242.GH19344@noisy.programming.kicks-ass.net \
    --to=peterz@infradead.org \
    --cc=aliceryhl@google.com \
    --cc=kees@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-tip-commits@vger.kernel.org \
    --cc=miguel.ojeda.sandonis@gmail.com \
    --cc=mingo@kernel.org \
    --cc=mmaurer@google.com \
    --cc=ojeda@kernel.org \
    --cc=rcvalle@google.com \
    --cc=samitolvanen@google.com \
    --cc=scott.d.constable@intel.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