Re: [RFC][PATCH 04/17] objtool/x86: Fix SRSO mess

From: Borislav Petkov
Date: Thu Aug 10 2023 - 11:02:21 EST


On Thu, Aug 10, 2023 at 02:50:05PM +0200, Peter Zijlstra wrote:
> Notably 'call RET' is not what this is about. I hope the below
> clarifies.

Yah, it does, now that you've taken the time to explain it. Looking at
the commit which added it:

15e67227c49a ("x86: Undo return-thunk damage")

it doesn't even begin to explain it. Can you please put the gist of what
you've explained here in a comment over patch_return() as it is not
really obvious - at least to me it isn't - what the rules for the thunks
are.

I mean, they're clear now but I think we should hold them down
explicitly. Especially with all the crazy patching we're doing now.

Thx.

--
Regards/Gruss,
Boris.

https://people.kernel.org/tglx/notes-about-netiquette