1
0
Fork 0
alistair23-linux/virt/kvm/arm
Santosh Shukla 9dfbc2f82a KVM: arm64: Force PTE mapping on fault resulting in a device mapping
[ Upstream commit 91a2c34b7d ]

VFIO allows a device driver to resolve a fault by mapping a MMIO
range. This can be subsequently result in user_mem_abort() to
try and compute a huge mapping based on the MMIO pfn, which is
a sure recipe for things to go wrong.

Instead, force a PTE mapping when the pfn faulted in has a device
mapping.

Fixes: 6d674e28f6 ("KVM: arm/arm64: Properly handle faulting of device mappings")
Suggested-by: Marc Zyngier <maz@kernel.org>
Signed-off-by: Santosh Shukla <sashukla@nvidia.com>
[maz: rewritten commit message]
Signed-off-by: Marc Zyngier <maz@kernel.org>
Reviewed-by: Gavin Shan <gshan@redhat.com>
Cc: stable@vger.kernel.org
Link: https://lore.kernel.org/r/1603711447-11998-2-git-send-email-sashukla@nvidia.com
Signed-off-by: Sasha Levin <sashal@kernel.org>
2020-11-18 19:20:15 +01:00
..
hyp KVM: arm64: Fix 32bit PC wrap-around 2020-05-14 07:58:26 +02:00
vgic KVM: arm64: vgic-its: Fix memory leak on the error path of vgic_add_lpi() 2020-10-01 13:17:56 +02:00
aarch32.c KVM: arm64: Synchronize sysreg state on injecting an AArch32 exception 2020-06-17 16:40:38 +02:00
arch_timer.c KVM: arm64: Treat emulated TVAL TimerValue as a signed 32-bit integer 2020-02-14 16:34:18 -05:00
arm.c KVM: arm64: Save the host's PtrAuth keys in non-preemptible context 2020-06-17 16:40:38 +02:00
mmio.c KVM: arm64: Assume write fault on S1PTW permission fault on instruction fetch 2020-10-01 13:18:25 +02:00
mmu.c KVM: arm64: Force PTE mapping on fault resulting in a device mapping 2020-11-18 19:20:15 +01:00
perf.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 234 2019-06-19 17:09:07 +02:00
pmu.c KVM: arm64: pmu: Fix chained SW_INCR counters 2020-02-14 16:34:17 -05:00
psci.c KVM: arm/arm64: Add save/restore support for firmware workaround state 2019-07-05 13:56:27 +01:00
trace.h KVM: arm/arm64: Fix TRACE_INCLUDE_PATH 2019-02-19 21:05:51 +00:00