Re: [tip:x86/pti] x86/retpoline: Fill return stack buffer on vmexit

From: Josh Poimboeuf
Date: Thu Jan 25 2018 - 13:32:37 EST


On Thu, Jan 25, 2018 at 06:04:23PM +0000, David Woodhouse wrote:
> On Thu, 2018-01-25 at 18:53 +0100, Borislav Petkov wrote:
> >
> > So forget the KABI angle and think: simpler, cleaner, more readable
> > macros.
> >
> > Oh, and David, if while doing so I manage to add the alignment, then
> > *that* is even better.
> >
> > Win-win-effing-win situation!
>
> Yep, I'll buy that. But first we need Josh to work out what he's having
> for lunch.

This is what I've been eating every day:

https://www.urbandictionary.com/define.php?term=Shit%20Sandwich

:-)

> Although just another marker to tell objtool "ignore this whole
> function" might be sufficient to allow us to have an out-of-line RSB-
> stuffing function.

If the function is only in arch/x86/lib/retpoline.S, we can just tell
objtool to ignore the entire file for now, as the file has no useful
information anyway (until I get around to adding ORC hints to it). Just
add

OBJECT_FILES_NON_STANDARD_retpoline.o :=y

to the Makefile.

--
Josh