Re: [PATCH] x86/mce: Fix set_mce_nospec() to avoid #GP fault

From: Linus Torvalds
Date: Thu Aug 30 2018 - 21:29:26 EST


On Thu, Aug 30, 2018 at 2:45 PM Tony Luck <tony.luck@xxxxxxxxx> wrote:
>
> Fix is to move one step at a time. First mark the page not present
> (using the decoy address). Then it is safe to use the actual address
> of the 1:1 mapping to mark it "uc", and finally as present.

Can't we do it in one step, but make sure that he clflush gets the real address?

Linus