Skip to content
Commit 91a2c34b authored by Santosh Shukla's avatar Santosh Shukla Committed by Marc Zyngier
Browse files

KVM: arm64: Force PTE mapping on fault resulting in a device mapping



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: 6d674e28 ("KVM: arm/arm64: Properly handle faulting of device mappings")
Suggested-by: default avatarMarc Zyngier <maz@kernel.org>
Signed-off-by: default avatarSantosh Shukla <sashukla@nvidia.com>
[maz: rewritten commit message]
Signed-off-by: default avatarMarc Zyngier <maz@kernel.org>
Reviewed-by: default avatarGavin Shan <gshan@redhat.com>
Cc: stable@vger.kernel.org
Link: https://lore.kernel.org/r/1603711447-11998-2-git-send-email-sashukla@nvidia.com
parent 2f40c460
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment