linux/arch/x86/kvm/mmu
Sean Christopherson 2c6d4c27b9 KVM: x86/mmu: Harden TDP MMU iteration against root w/o shadow page
Explicitly check that tdp_iter_start() is handed a valid shadow page
to harden KVM against bugs, e.g. if KVM calls into the TDP MMU with an
invalid or shadow MMU root (which would be a fatal KVM bug), the shadow
page pointer will be NULL.

Opportunistically stop the TDP MMU iteration instead of continuing on
with garbage if the incoming root is bogus.  Attempting to walk a garbage
root is more likely to caused major problems than doing nothing.

Cc: Yu Zhang <yu.c.zhang@linux.intel.com>
Link: https://lore.kernel.org/r/20230729005200.1057358-4-seanjc@google.com
Signed-off-by: Sean Christopherson <seanjc@google.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2023-08-31 14:08:22 -04:00
..
mmu_internal.h KVM: x86/mmu: Use BUILD_BUG_ON_INVALID() for KVM_MMU_WARN_ON() stub 2023-08-31 13:48:48 -04:00
mmu.c KVM: x86/mmu: Harden new PGD against roots without shadow pages 2023-08-31 14:08:21 -04:00
mmutrace.h KVM: x86/mmu: Add RET_PF_CONTINUE to eliminate bool+int* "returns" 2022-05-12 09:51:42 -04:00
page_track.c KVM: x86/mmu: Handle KVM bookkeeping in page-track APIs, not callers 2023-08-31 14:08:19 -04:00
page_track.h KVM: x86/mmu: Drop @slot param from exported/external page-track APIs 2023-08-31 14:08:18 -04:00
paging_tmpl.h KVM: x86/mmu: Bug the VM if a vCPU ends up in long mode without PAE enabled 2023-08-31 13:48:47 -04:00
spte.c KVM: x86/mmu: Convert "runtime" WARN_ON() assertions to WARN_ON_ONCE() 2023-08-31 13:48:44 -04:00
spte.h KVM: x86/mmu: Add helper to convert root hpa to shadow page 2023-08-31 14:08:20 -04:00
tdp_iter.c KVM: x86/mmu: Harden TDP MMU iteration against root w/o shadow page 2023-08-31 14:08:22 -04:00
tdp_iter.h KVM: x86/mmu: Atomically clear SPTE dirty state in the clear-dirty-log flow 2023-04-04 12:37:30 -07:00
tdp_mmu.c KVM: x86/mmu: Add helper to convert root hpa to shadow page 2023-08-31 14:08:20 -04:00
tdp_mmu.h KVM: x86/mmu: Pivot on "TDP MMU enabled" to check if active MMU is TDP MMU 2022-12-29 15:33:25 -05:00