Bug#1017425: [PATCH] x86/speculation: Avoid LFENCE in FILL_RETURN_BUFFER on CPUs that lack it

2022-08-30 Thread Peter Zijlstra
On Tue, Aug 30, 2022 at 02:42:04PM +0300, Martin-Éric Racine wrote: > Greetings, > > On Fri, Aug 19, 2022 at 3:15 PM Peter Zijlstra wrote: > > > > On Fri, Aug 19, 2022 at 01:38:27PM +0200, Ben Hutchings wrote: > > > > > So that puts the whole __FILL_RETU

Bug#1017425: [PATCH] x86/speculation: Avoid LFENCE in FILL_RETURN_BUFFER on CPUs that lack it

2022-08-19 Thread Peter Zijlstra
On Fri, Aug 19, 2022 at 01:38:27PM +0200, Ben Hutchings wrote: > So that puts the whole __FILL_RETURN_BUFFER inside an alternative, and > we can't have nested alternatives. That's unfortunate. Well, both alternatives end with the LFENCE instruction, so I could pull it out and do two consequtive

Bug#1017425: [PATCH] x86/speculation: Avoid LFENCE in FILL_RETURN_BUFFER on CPUs that lack it

2022-08-19 Thread Peter Zijlstra
On Fri, Aug 19, 2022 at 10:47:21AM +0200, Peter Zijlstra wrote: > On Fri, Aug 19, 2022 at 02:33:08AM +0200, Ben Hutchings wrote: > > From: Ben Hutchings > > > > The mitigation for PBRSB includes adding LFENCE instructions to the > > RSB filling sequence. However,

Bug#1017425: [PATCH] x86/speculation: Avoid LFENCE in FILL_RETURN_BUFFER on CPUs that lack it

2022-08-19 Thread Peter Zijlstra
On Fri, Aug 19, 2022 at 02:33:08AM +0200, Ben Hutchings wrote: > From: Ben Hutchings > > The mitigation for PBRSB includes adding LFENCE instructions to the > RSB filling sequence. However, RSB filling is done on some older CPUs > that don't support the LFENCE instruction. > Wait; what? There