[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20250319000427.GA2617458@ax162>
Date: Tue, 18 Mar 2025 17:04:27 -0700
From: Nathan Chancellor <nathan@...nel.org>
To: Miguel Ojeda <miguel.ojeda.sandonis@...il.com>
Cc: Peter Zijlstra <peterz@...radead.org>,
Ramon de C Valle <rcvalle@...gle.com>,
Matthew Maurer <mmaurer@...gle.com>, 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, Mar 12, 2025 at 12:36:42PM +0100, Miguel Ojeda wrote:
> On Wed, Mar 12, 2025 at 10:16 AM Peter Zijlstra <peterz@...radead.org> wrote:
> > I normally build llvm toolchains using tc-build, but it seems rust is
> > not actually part of llvm?
>
> Yeah, Rust uses LLVM but is not part of the LLVM project.
>
> But I think we could have support to build Rust there easily -- I
> discussed it with Nathan (Cc'd) in the past. Currently, for the
> LLVM+Rust toolchains he provides in kernel.org, he just bundles the
> upstream Rust binaries AFAIR -- and IIRC he uses tc-build to drive
> that build, so if we do that we could also "easily" get the full chain
> in kernel.org too ("easily" if we ignore doing the PGO dance for the
> Rust side etc. and assuming the building time/resources makes it
> doable, which I don't know about).
>
> If that is correct, I could take a look into adding a simple Rust
> build to tc-build (i.e. without PGO etc.).
Right, tc-build is used to build the toolchain but I have another build
wrapper around that to build the toolchain in a Debian bullseye
userspace for compatibility with glibc 2.28 and newer:
https://github.com/nathanchance/env/tree/c19e35f39080a961a762a6c486ca2b2077ffc4ef/python/pgo-llvm-builder
That is where I had initially considered wiring it up when we last
talked but wiring it up in tc-build would probably be better/cleaner,
especially with the rewrite I did two years ago. I could envision
tc_build/rust.py for example, then either integrating it into
build-llvm.py or have a separate standalone build-rust.py, like
binutils.
Cheers,
Nathan
Powered by blists - more mailing lists