Re: [PATCH 3/4] x86/retpoline: Simplify vmexit_fill_RSB()

From: David Woodhouse
Date: Fri Jan 26 2018 - 11:24:59 EST


On Fri, 2018-01-26 at 14:24 +0100, Borislav Petkov wrote:
> diff --git a/arch/x86/include/asm/asm-prototypes.h b/arch/x86/include/asm/asm-prototypes.h
> index 1908214b9125..b889705f995a 100644
> --- a/arch/x86/include/asm/asm-prototypes.h
> +++ b/arch/x86/include/asm/asm-prototypes.h
> @@ -38,4 +38,7 @@ INDIRECT_THUNK(dx)
> ÂINDIRECT_THUNK(si)
> ÂINDIRECT_THUNK(di)
> ÂINDIRECT_THUNK(bp)
> +asmlinkage void __fill_rsb_clobber_ax(void);
> +asmlinkage void __clr_rsb_clobber_ax(void);
> Â#endif /* CONFIG_RETPOLINE */
>

Dammit, have the IBM vowel-stealers escaped again? What was wrong with
'__clear_rsb_clobber_ax'?

>
> -/*
> - * Google experimented with loop-unrolling and this turned out to be
> - * the optimal version â two calls, each with their own speculation
> - * trap should their return address end up getting used, in a loop.
> - */

Let's not lose that comment?

Other than that, I think it'll look OK when it's a sane patch on top of
my existing tree instead of incremental on your last one. Thanks.

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