Re: [PATCH] x86/Kconfig: make CFI_AUTO_DEFAULT depend on !RUST

From: Peter Zijlstra
Date: Thu Apr 10 2025 - 10:19:14 EST


On Thu, Apr 10, 2025 at 04:05:54PM +0200, Miguel Ojeda wrote:
> On Thu, Apr 10, 2025 at 3:57 PM Peter Zijlstra <peterz@xxxxxxxxxxxxx> wrote:
> >
> > Remove the offending Rust code? Afaict from this github issue, it is
> > just some formatting nonsense. Surely code can be adjusted to not use
> > that?
>
> If you mean not using the formatting machinery from our side, then
> that is a major change -- we should just fix it upstream, really.

That is what I mean, yeah. I've no idea what is or is not common in
this rust code. It still looks like line noise to me :/

But given that FineIBT isn't at all new, I was under the assumption that
this was some shiny new rust driver that did something that hadn't been
done before. And it could now not do that.

> If you mean fixing it upstream, definitely, but we should still
> prevent people from building an invalid kernel, i.e. when Alice's PR
> or similar lands upstream, then we can relax the `depends on` based on
> the Rust version (which is something we have done for other bits).

So why wasn't any of this a problem when Rust enabled kCFI? Surely the
testing back then included FineIBT. That has been in longer than rust's
kcfi support (integer type confusion etc.).