Re: [GIT PULL] RISC-V updates for v7.0
From: Linus Torvalds
Date: Mon Feb 16 2026 - 16:56:16 EST
On Mon, 16 Feb 2026 at 06:20, Mark Brown <broonie@xxxxxxxxxx> wrote:
>
> If that's the part I think it is it's following the same pattern as
> shadow stacks, originally inherited from x86 then generalised.
That makes sense. I was looking at the speculation control ones -
which I honestly think are done much better in that they are a bit
more future-proof and won't need yet another random prctl just because
some architecture comes up with a slight variation on a theme.
They don't technically do the locking (the speculation control has a
different kind of locking), but because of how they do things - by
having separate "which control do you want to change", and "how do you
want to change it", it would actually be very natural to make "lock
it" just another thing.
So I actually wish we didn't have that shadow stack prctl - or this
new one - at all, and they'd just use the speculation mitigation
pattern instead.
I think the shadow stack case is probably too late to fix and people
presumably already use it, but maybe it's not too late to fix this new
control flow integrity case?
Linus