Re: [PATCH v2 5/8] x86/speculation: Add basic support for IBPB
From: Borislav Petkov
Date: Sun Jan 21 2018 - 14:53:11 EST
On Sun, Jan 21, 2018 at 07:31:00PM +0000, David Woodhouse wrote:
> Congratulations, you've just turned a potential GCC missed optimisation
> into a kernel bug. We don't *care* that it's unlikely that GCC will
> miss that optimisation. The point is that it doesn't *have* to do it,
> and we don't *check*.
Err, I guess I'm missing something:
gcc doesn't add any code here - we do. We turn the JMP into a NOP and
the three instructions of the wrmsr are from an asm volatile().
So please elaborate.
Thx.
--
Regards/Gruss,
Boris.
Good mailing practices for 400: avoid top-posting and trim the reply.