OSDN Git Service

KVM: arm/arm64: Re-check VMA on detecting a poisoned page
authorJames Morse <james.morse@arm.com>
Tue, 17 Dec 2019 12:38:09 +0000 (12:38 +0000)
committerMarc Zyngier <maz@kernel.org>
Sun, 19 Jan 2020 18:05:20 +0000 (18:05 +0000)
commit1559b7583ff6ed018c5320d1503fa80b435775f0
tree007e2f546b1201d4a2301ebacc8d9273ddf093ce
parentde9375634b1ef49091004d08e5cd4f68695adf0f
KVM: arm/arm64: Re-check VMA on detecting a poisoned page

When we check for a poisoned page, we use the VMA to tell userspace
about the looming disaster. But we pass a pointer to this VMA
after having released the mmap_sem, which isn't a good idea.

Instead, stash the shift value that goes with this pfn while
we are holding the mmap_sem.

Reported-by: Marc Zyngier <maz@kernel.org>
Signed-off-by: James Morse <james.morse@arm.com>
Signed-off-by: Marc Zyngier <maz@kernel.org>
Reviewed-by: Christoffer Dall <christoffer.dall@arm.com>
Link: https://lore.kernel.org/r/20191211165651.7889-3-maz@kernel.org
Link: https://lore.kernel.org/r/20191217123809.197392-1-james.morse@arm.com
virt/kvm/arm/mmu.c