OrangePi_CM5/arch/x86/kvm/mmu
Paolo Bonzini 9c8474fa34 KVM: x86/mmu: avoid NULL-pointer dereference on page freeing bugs
[ Upstream commit 9191b8f0745e63edf519e4a54a4aaae1d3d46fbd ]

WARN and bail if KVM attempts to free a root that isn't backed by a shadow
page.  KVM allocates a bare page for "special" roots, e.g. when using PAE
paging or shadowing 2/3/4-level page tables with 4/5-level, and so root_hpa
will be valid but won't be backed by a shadow page.  It's all too easy to
blindly call mmu_free_root_page() on root_hpa, be nice and WARN instead of
crashing KVM and possibly the kernel.

Reviewed-by: Sean Christopherson <seanjc@google.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2022-05-12 12:25:44 +02:00
..
mmu.c KVM: x86/mmu: avoid NULL-pointer dereference on page freeing bugs 2022-05-12 12:25:44 +02:00
mmu_audit.c KVM: x86/mmu: Rename page_header() to to_shadow_page() 2020-07-08 16:21:55 -04:00
mmu_internal.h kvm: x86/mmu: NX largepage recovery for TDP MMU 2020-10-23 03:42:16 -04:00
mmutrace.h kvm: x86/mmu: Add TDP MMU PF handler 2020-10-23 03:42:04 -04:00
page_track.c KVM: x86: Handle SRCU initialization failure during page track init 2021-10-06 15:56:04 +02:00
paging.h KVM: x86/mmu: Do not apply HPA (memory encryption) mask to GPAs 2021-07-20 16:05:36 +02:00
paging_tmpl.h KVM: x86/mmu: do compare-and-exchange of gPTE via the user address 2022-04-08 14:40:44 +02:00
spte.c KVM: mmu: Fix SPTE encoding of MMIO generation upper half 2020-12-11 19:18:43 -05:00
spte.h KVM: x86/mmu: Do not apply HPA (memory encryption) mask to GPAs 2021-07-20 16:05:36 +02:00
tdp_iter.c KVM: x86/mmu: Ensure forward progress when yielding in TDP MMU iter 2021-04-14 08:42:04 +02:00
tdp_iter.h KVM: x86/mmu: Ensure forward progress when yielding in TDP MMU iter 2021-04-14 08:42:04 +02:00
tdp_mmu.c KVM: x86/mmu: Check for present SPTE when clearing dirty bit in TDP MMU 2022-04-08 14:40:36 +02:00
tdp_mmu.h KVM: x86/mmu: Don't allow TDP MMU to yield when recovering NX pages 2021-04-14 08:42:04 +02:00