Re: [PATCH 03/24] x86/paravirt: Annotate indirect calls

From: David Woodhouse
Date: Mon Jan 29 2018 - 13:09:58 EST


On Mon, 2018-01-29 at 11:58 -0600, Josh Poimboeuf wrote:
> On Tue, Jan 23, 2018 at 04:25:42PM +0100, Peter Zijlstra wrote:
> >
> > Paravirt emits indirect calls which get flagged by objtool
> > retpoline
> > checks, annotate it away because all these indirect calls will be
> > patched out before we start userspace.
> >
> > Signed-off-by: Peter Zijlstra (Intel) <peterz@xxxxxxxxxxxxx>
> > ---
> > Âarch/x86/include/asm/paravirt.hÂÂÂÂÂÂÂ|ÂÂÂ22 ++++++++++++++++++---
> > -
> > Âarch/x86/include/asm/paravirt_types.h |ÂÂÂÂ7 ++++++-
> > Â2 files changed, 24 insertions(+), 5 deletions(-)
> >
> > --- a/arch/x86/include/asm/paravirt.h
> > +++ b/arch/x86/include/asm/paravirt.h
> > @@ -828,6 +828,12 @@ extern void default_banner(void);
> > Â Â.short clobbers; \
> > Â .popsection
> > Â
> > +#define PARA_RETPOLINE_SAFE \
> > + 773:; \
> > + .pushsection .discard.retpoline_safe; \
> > + _ASM_PTR 773b; \
> > + .popsection
>
> Why does paravirt have its own version of this macro?

Because otherwise we'd only have two, and they might get lonely?

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