Re: [PATCH v2 01/12] x86/retpoline: Define retpoline indirect thunk and macros

2018-01-03 Thread Alan Cox
> > +ENTRY(__x86.indirect_thunk) > > + CFI_STARTPROC > > + callretpoline_call_target > > +2: > > + lfence /* stop speculation */ > > + jmp 2b > > +retpoline_call_target: > > +#ifdef CONFIG_64BIT > > + lea 8(%rsp), %rsp > > +#else > > + lea

Re: [PATCH v2 01/12] x86/retpoline: Define retpoline indirect thunk and macros

2018-01-03 Thread Brian Gerst
On Wed, Jan 3, 2018 at 9:00 PM, Andi Kleen wrote: > From: Dave Hansen > > From: David Woodhouse > > retpoline is a special sequence on Intel CPUs to stop speculation for > indirect branches. > > Provide assembler infrastructure to use retpoline by the compiler > and for assembler. We add the out

[PATCH v2 01/12] x86/retpoline: Define retpoline indirect thunk and macros

2018-01-03 Thread Andi Kleen
From: Dave Hansen From: David Woodhouse retpoline is a special sequence on Intel CPUs to stop speculation for indirect branches. Provide assembler infrastructure to use retpoline by the compiler and for assembler. We add the out of line trampoline used by the compiler, and NOSPEC_JUMP / NOSPEC