Re: [PATCH v2] x86/retpoline: Add LFENCE to the retpoline/RSB filling RSB macros

2018-01-14 Thread Woodhouse, David
On Sun, 2018-01-14 at 16:41 +0100, Borislav Petkov wrote: > On Sat, Jan 13, 2018 at 05:27:30PM -0600, Tom Lendacky wrote: > > > > The PAUSE instruction is currently used in the retpoline and RSB filling > > macros as a speculation trap.  The use of PAUSE was originally suggested > > because it sho

Re: [PATCH v2] x86/retpoline: Add LFENCE to the retpoline/RSB filling RSB macros

2018-01-14 Thread Borislav Petkov
On Sat, Jan 13, 2018 at 05:27:30PM -0600, Tom Lendacky wrote: > The PAUSE instruction is currently used in the retpoline and RSB filling > macros as a speculation trap. The use of PAUSE was originally suggested > because it showed a very, very small difference in the amount of > cycles/time used t

[PATCH v2] x86/retpoline: Add LFENCE to the retpoline/RSB filling RSB macros

2018-01-13 Thread Tom Lendacky
The PAUSE instruction is currently used in the retpoline and RSB filling macros as a speculation trap. The use of PAUSE was originally suggested because it showed a very, very small difference in the amount of cycles/time used to execute the retpoline as compared to LFENCE. On AMD, the PAUSE inst