KVM: arm64: Check for PTE validity when checking for executable/cacheable
authorMarc Zyngier <maz@kernel.org>
Tue, 23 Apr 2024 15:05:15 +0000 (16:05 +0100)
committerMarc Zyngier <maz@kernel.org>
Wed, 1 May 2024 15:46:58 +0000 (16:46 +0100)
commit96171cfa55d0a58048ef7dada507141daa400027
treeb861563f212f4942fb392fde335baad435747f95
parent02949f36bc7b723944bf754b71cfdf75e5e36f44
KVM: arm64: Check for PTE validity when checking for executable/cacheable

Don't just assume that the PTE is valid when checking whether it
describes an executable or cacheable mapping.

This makes sure that we don't issue CMOs for invalid mappings.

Suggested-by: Will Deacon <will@kernel.org>
Signed-off-by: Fuad Tabba <tabba@google.com>
Acked-by: Oliver Upton <oliver.upton@linux.dev>
Link: https://lore.kernel.org/r/20240423150538.2103045-8-tabba@google.com
Signed-off-by: Marc Zyngier <maz@kernel.org>
arch/arm64/kvm/hyp/pgtable.c