Re: [patch 00/38] x86/retbleed: Call depth tracking mitigation

Linus Torvalds
2022-07-19T00:11:17Z

On Mon, Jul 18, 2022 at 4:58 PM Peter Zijlstra <peterz@infradead.org> wrote:
>
> On Mon, Jul 18, 2022 at 04:52:09PM -0700, Linus Torvalds wrote:
> > I also happen to believe that the kCFI code should have entirely
> > different targets for direct jumps and for indirect jumps, but that's
> > a separate issue. Maybe it already does that?
>
> kCFI is purely about indirect calls.

So it already only adds the pattern to things that have their address
taken, not all functions?

If so, that's simple enough to sort out: don't do any RSB stack
adjustment for those thunks AT ALL.

Because they should just then end up with a jump to the "real" target,
and that real target will do the RSB stack thing.

Linus