diff options
| author | 2026-08-26 09:42:14 -0700 | |
|---|---|---|
| committer | 2026-09-11 11:48:14 -0700 | |
| commit | f7a3be22761953f4a1f754786b7a35b4c5ea6824 (patch) | |
| tree | 734c9892e96e318b83d9592ef6d4060861246284 /scripts/Makefile.thinlto | |
| parent | KVM: x86/mmu: Top-up memory caches when retrying "map private PFN" (diff) | |
KVM: x86/mmu: Add sanity check to detect stale page faults in "map private PFN"
Harden the "map private PFN" flow against potentially-fatal bugs or future
KVM changes by checking for a stale "fault" prior to actually mapping the
PFN into the guest. While it should be impossible for the "page fault" to
become stale, the sanity check is cheap, whereas a broken assumption would
have a high probability of leading to a guest-expoitable use-after-free.
Snapshot the invalidation sequence after acquiring mmu_lock to avoid false
positives, even though doing so completely voids anys and all protection
against unexpected invalidations. Pretty much the entire point of
kvm_tdp_mmu_map_private_pfn() is that it allows mapping a PFN that was
gifted by the caller, i.e. the caller would have to mess up its one and
only responsibility.
Link: https://patch.msgid.link/20260826164214.756512-5-seanjc@google.com
Signed-off-by: Sean Christopherson <seanjc@google.com>
Diffstat (limited to 'scripts/Makefile.thinlto')
0 files changed, 0 insertions, 0 deletions
