lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CANiq72=3ghFxy8E=AU9p+0imFxKr5iU3sd0hVUXed5BA+KjdNQ@mail.gmail.com>
Date: Mon, 10 Mar 2025 17:00:47 +0100
From: Miguel Ojeda <miguel.ojeda.sandonis@...il.com>
To: Peter Zijlstra <peterz@...radead.org>, Ramon de C Valle <rcvalle@...gle.com>, 
	Matthew Maurer <mmaurer@...gle.com>
Cc: linux-kernel@...r.kernel.org, ojeda@...nel.org, 
	linux-tip-commits@...r.kernel.org, 
	Scott Constable <scott.d.constable@...el.com>, Ingo Molnar <mingo@...nel.org>, 
	Kees Cook <kees@...nel.org>, x86@...nel.org, Sami Tolvanen <samitolvanen@...gle.com>, 
	Alice Ryhl <aliceryhl@...gle.com>
Subject: Re: [tip: x86/core] x86/ibt: Implement FineIBT-BHI mitigation

On Wed, Feb 26, 2025 at 8:53 PM Peter Zijlstra <peterz@...radead.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.

Cheers,
Miguel

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ