1
0
Fork 0
alistair23-linux/arch/powerpc
Paul Mackerras ad9940e377 KVM: PPC: Book3S HV: Close race with page faults around memslot flushes
[ Upstream commit 11362b1bef ]

There is a potential race condition between hypervisor page faults
and flushing a memslot.  It is possible for a page fault to read the
memslot before a memslot is updated and then write a PTE to the
partition-scoped page tables after kvmppc_radix_flush_memslot has
completed.  (Note that this race has never been explicitly observed.)

To close this race, it is sufficient to increment the MMU sequence
number while the kvm->mmu_lock is held.  That will cause
mmu_notifier_retry() to return true, and the page fault will then
return to the guest without inserting a PTE.

Signed-off-by: Paul Mackerras <paulus@ozlabs.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2020-10-01 13:18:05 +02:00
..
boot powerpc/boot: Fix CONFIG_PPC_MPC52XX references 2020-08-19 08:16:17 +02:00
configs vgacon: remove software scrollback support 2020-09-17 13:47:54 +02:00
crypto treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500 2019-06-19 17:09:55 +02:00
include KVM: PPC: Book3S HV: Treat TM-related invalid form instructions on P9 like the valid ones 2020-10-01 13:17:44 +02:00
kernel powerpc/traps: Make unrecoverable NMIs die instead of panic 2020-10-01 13:18:01 +02:00
kvm KVM: PPC: Book3S HV: Close race with page faults around memslot flushes 2020-10-01 13:18:05 +02:00
lib powerpc: Fix __clear_user() with KUAP enabled 2020-01-04 19:18:37 +01:00
math-emu treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 152 2019-05-30 11:26:32 -07:00
mm powerpc/book3s64: Fix error handling in mm_iommu_do_alloc() 2020-10-01 13:17:38 +02:00
net powerpc/bpf: Fix tail call implementation 2019-11-02 00:32:26 +01:00
oprofile treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 333 2019-06-05 17:37:06 +02:00
perf powerpc/perf: Implement a global lock to avoid races between trace, core and thread imc events. 2020-10-01 13:17:52 +02:00
platforms powerpc/spufs: add CONFIG_COREDUMP dependency 2020-09-03 11:26:48 +02:00
purgatory treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 441 2019-06-05 17:37:17 +02:00
sysdev powerpc/xive: Ignore kmemleak false positives 2020-09-03 11:26:42 +02:00
tools powerpc: Do not consider weak unresolved symbol relocations as bad 2020-02-24 08:37:00 +01:00
xmon powerpc/xmon: Restrict when kernel is locked down 2020-06-07 13:18:49 +02:00
Kbuild treewide: Add SPDX license identifier - Kbuild 2019-05-30 11:32:33 -07:00
Kconfig powerpc/kasan: Fix stack overflow by increasing THREAD_SHIFT 2020-06-24 17:50:12 +02:00
Kconfig.debug powerpc/ptdump: Only enable PPC_CHECK_WX with STRICT_KERNEL_RWX 2020-02-14 16:34:16 -05:00
Makefile powerpc: Don't add -mabi= flags when building with Clang 2020-01-04 19:18:23 +01:00
Makefile.postlink powerpc: Do not consider weak unresolved symbol relocations as bad 2020-02-24 08:37:00 +01:00