aboutsummaryrefslogtreecommitdiff
path: root/lib/memory-notifier-error-inject.c
diff options
context:
space:
mode:
authorSean Christopherson <[email protected]>2023-07-28 17:51:58 -0700
committerPaolo Bonzini <[email protected]>2023-08-31 14:08:22 -0400
commit2c6d4c27b92d729a2831df2a873ba6b5f682f435 (patch)
tree2b0c71a568e28b382d4c701c8f734fc14963744f /lib/memory-notifier-error-inject.c
parentc30e000e690af74f61a161fa60be140f23948cb1 (diff)
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 <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Sean Christopherson <[email protected]> Signed-off-by: Paolo Bonzini <[email protected]>
Diffstat (limited to 'lib/memory-notifier-error-inject.c')
0 files changed, 0 insertions, 0 deletions