x86: don't store possibly stale TLB flush time stamp
authorJan Beulich <jbeulich@suse.com>
Thu, 12 Oct 2017 12:48:25 +0000 (14:48 +0200)
committerJan Beulich <jbeulich@suse.com>
Thu, 12 Oct 2017 12:48:25 +0000 (14:48 +0200)
commit23a183607a427572185fc51c76cc5ab11c00c4cc
tree2253003e89867e8460614a0ca19d9a6f555fe284
parent6987fc7558bdbab8119eabf026e3cdad1053f0e5
x86: don't store possibly stale TLB flush time stamp

While the timing window is extremely narrow, it is theoretically
possible for an update to the TLB flush clock and a subsequent flush
IPI to happen between the read and write parts of the update of the
per-page stamp. Exclude this possibility by disabling interrupts
across the update, preventing the IPI to be serviced in the middle.

This is XSA-241.

Reported-by: Jann Horn <jannh@google.com>
Suggested-by: George Dunlap <george.dunlap@citrix.com>
Signed-off-by: Jan Beulich <jbeulich@suse.com>
Reviewed-by: George Dunlap <george.dunlap@citrix.com>
xen/arch/arm/smp.c
xen/arch/x86/mm.c
xen/arch/x86/mm/shadow/common.c
xen/common/page_alloc.c
xen/include/asm-arm/flushtlb.h
xen/include/asm-x86/flushtlb.h