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

From: Woodhouse, David
Date: Mon Jan 08 2018 - 03:37:32 EST


On Sun, 2018-01-07 at 23:06 -0600, Josh Poimboeuf wrote:
>
> Here's the use case I had in mind before. With paravirt,
>
> Â ENABLE_INTERRUPTS(CLBR_NONE)
>
> becomes
>
> Â pushÂÂ%rax
> Â callÂÂ*pv_irq_ops.irq_enable
> Â popÂÂÂ%rax
>
> and I wanted to apply those instructions with an alternative. It
> doesn't work currently because the 'call' isn't first.

I believe Borislav has made that work... however, if you're literally
doing the above then you'd be introducing new indirect branches which
is precisely what I've been trying to eliminate.

I believe I was told to stop prodding at pvops and just trust that they
all get turned into *direct* jumps at runtime. For example the above
call would not be literally 'call *pv_irq_ops.irq_enable', because by
the time the pvops are patched we'd *know* the final value of the
irq_enable method, and we'd turn it into a *direct* call instead.

Do I need to start looking at pvops again?

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