Re: [PATCH v3 01/13] x86/retpoline: Add initial retpoline support

From: Woodhouse, David
Date: Sat Jan 06 2018 - 05:58:41 EST


On Fri, 2018-01-05 at 15:50 -0800, Linus Torvalds wrote:
>
> > +
> > +.macro RETPOLINE_CALL reg:req
> > +ÂÂÂÂÂÂ jmpÂÂÂÂ 1113f
> > +1110:Â RETPOLINE_JMP \reg
> > +1113:Â callÂÂÂ 1110b
> > +.endm


(Note that RETPOLINE_CALL is purely internal to nospec-branch.h, used
only from the NOSPEC_CALL macro to make the ALTERNATIVE_2 invocation
les
s ugly than it would have been. But the same applies to NOSPEC_CALL
which is the one that gets used in our .S files including retpoline.S)

> Why do these still force a register name?
>
> Is it because this is the only user?

By "register name" are you asking why it's invoked as
"NOSPEC_CALL rbx" instead of "NOSPEC_CALL %rbx" with the percent sign?

I think I can probably clean that up now, and turn a lot of %\reg
occurrences into just \reg. The only remaining %\reg would be left in
retpoline.S inside the THUNK macro used from .irp.




Attachment: smime.p7s
Description: S/MIME cryptographic signature