]> git.baikalelectronics.ru Git - kernel.git/commit
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)
commit9aa7c2bb36c1f8017c9c0ae40e54b9b2cc17c7ff
tree007e2f546b1201d4a2301ebacc8d9273ddf093ce
parent2193c6b4ccd9979d4cc4cdbf5f4a7c35df73bab8
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