Re: Avoid speculative indirect calls in kernel

From: Andi Kleen
Date: Thu Jan 04 2018 - 10:53:13 EST


> +.macro JMP_THUNK reg:req
> +#ifdef RETPOLINE
> +       ALTERNATIVE __stringify(jmp __x86.indirect_thunk.\reg), __stringify(jmp *%\reg), X86_FEATURE_IBRS_ATT
> +#else
> +       jmp *\reg
> +#endif
> +.endm

I remove that because what you're testing for doesn't exist in the tree yet.

Yes it can be added later.

Right now we just want a basic static version to work reliably.

-Andi