1
0
Fork 0
alistair23-linux/arch
Junaid Shahid 0e0fee5c53 kvm: mmu: Fix race in emulated page table writes
When a guest page table is updated via an emulated write,
kvm_mmu_pte_write() is called to update the shadow PTE using the just
written guest PTE value. But if two emulated guest PTE writes happened
concurrently, it is possible that the guest PTE and the shadow PTE end
up being out of sync. Emulated writes do not mark the shadow page as
unsync-ed, so this inconsistency will not be resolved even by a guest TLB
flush (unless the page was marked as unsync-ed at some other point).

This is fixed by re-reading the current value of the guest PTE after the
MMU lock has been acquired instead of just using the value that was
written prior to calling kvm_mmu_pte_write().

Signed-off-by: Junaid Shahid <junaids@google.com>
Reviewed-by: Wanpeng Li <wanpengli@tencent.com>
Cc: stable@vger.kernel.org
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2018-11-27 12:50:31 +01:00
..
alpha TTY/Serial fixes for 4.20-rc2 2018-11-10 13:32:14 -06:00
arc mm: remove include/linux/bootmem.h 2018-10-31 08:54:16 -07:00
arm Merge branch 'spectre' of git://git.armlinux.org.uk/~rmk/linux-arm 2018-11-18 10:45:09 -08:00
arm64 efi/arm: Defer persistent reservations until after paging_init() 2018-11-15 10:04:46 +01:00
c6x c6x changes for 4.20 2018-10-31 15:39:25 -07:00
csky csky: dtb Kbuild fixup patches for linux-4.20-rc1 2018-11-01 09:04:30 -07:00
h8300 mm: remove include/linux/bootmem.h 2018-10-31 08:54:16 -07:00
hexagon mm: remove include/linux/bootmem.h 2018-10-31 08:54:16 -07:00
ia64 memblock: stop using implicit alignment to SMP_CACHE_BYTES 2018-10-31 08:54:16 -07:00
m68k s390 updates for 4.20-rc2 2018-11-09 06:30:44 -06:00
microblaze s390 updates for 4.20-rc2 2018-11-09 06:30:44 -06:00
mips MIPS: Fix `dma_alloc_coherent' returning a non-coherent allocation 2018-11-05 10:08:13 -08:00
nds32 s390 updates for 4.20-rc2 2018-11-09 06:30:44 -06:00
nios2 mm: remove include/linux/bootmem.h 2018-10-31 08:54:16 -07:00
openrisc mm: remove include/linux/bootmem.h 2018-10-31 08:54:16 -07:00
parisc Merge branch 'parisc-4.20-3' of git://git.kernel.org/pub/scm/linux/kernel/git/deller/parisc-linux 2018-11-14 13:42:41 -06:00
powerpc PPC KVM fixes for 4.20 2018-11-25 18:56:32 +01:00
riscv RISC-V: Silence some module warnings on 32-bit 2018-11-12 18:12:24 -08:00
s390 s390 updates for 4.20-rc2 2018-11-09 06:30:44 -06:00
sh mm: remove include/linux/bootmem.h 2018-10-31 08:54:16 -07:00
sparc Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc 2018-11-01 09:07:04 -07:00
um for-linus-20181109 2018-11-09 16:31:51 -06:00
unicore32 memblock: stop using implicit alignment to SMP_CACHE_BYTES 2018-10-31 08:54:16 -07:00
x86 kvm: mmu: Fix race in emulated page table writes 2018-11-27 12:50:31 +01:00
xtensa Xtensa fixes for v4.20-rc3 2018-11-16 10:10:27 -06:00
.gitignore
Kconfig New gcc plugin: stackleak 2018-11-01 11:46:27 -07:00