summaryrefslogtreecommitdiffstats
path: root/arch/x86/include/asm/vgtod.h
diff options
context:
space:
mode:
authorLuckTony <tony.luck@intel.com>2018-08-31 09:55:06 -0700
committerThomas Gleixner <tglx@linutronix.de>2018-09-01 14:59:19 +0200
commitc7486104a5ce7e8763e3cb5157bba8d0f1468d87 (patch)
tree2ee0f08523889787829bf370b0f3566855dd0f01 /arch/x86/include/asm/vgtod.h
parenteeb89e2bb1ac45b0836d4170e97a988c3a746c62 (diff)
downloadlinux-0-day-c7486104a5ce7e8763e3cb5157bba8d0f1468d87.tar.gz
linux-0-day-c7486104a5ce7e8763e3cb5157bba8d0f1468d87.tar.xz
x86/mce: Fix set_mce_nospec() to avoid #GP fault
The trick with flipping bit 63 to avoid loading the address of the 1:1 mapping of the poisoned page while the 1:1 map is updated used to work when unmapping the page. But it falls down horribly when attempting to directly set the page as uncacheable. The problem is that when the cache mode is changed to uncachable, the pages needs to be flushed from the cache first. But the decoy address is non-canonical due to bit 63 flipped, and the CLFLUSH instruction throws a #GP fault. Add code to change_page_attr_set_clr() to fix the address before calling flush. Fixes: 284ce4011ba6 ("x86/memory_failure: Introduce {set, clear}_mce_nospec()") Suggested-by: Linus Torvalds <torvalds@linux-foundation.org> Signed-off-by: Tony Luck <tony.luck@intel.com> Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Acked-by: Linus Torvalds <torvalds@linux-foundation.org> Cc: Peter Anvin <hpa@zytor.com> Cc: Borislav Petkov <bp@alien8.de> Cc: linux-edac <linux-edac@vger.kernel.org> Cc: Dan Williams <dan.j.williams@intel.com> Cc: Dave Jiang <dave.jiang@intel.com> Link: https://lkml.kernel.org/r/20180831165506.GA9605@agluck-desk
Diffstat (limited to 'arch/x86/include/asm/vgtod.h')
0 files changed, 0 insertions, 0 deletions