diff options
author | 2024-02-27 18:41:46 -0800 | |
---|---|---|
committer | 2024-05-07 11:59:23 -0400 | |
commit | f3310e622f77979f13a36f6bfaf0252eecc7b9f6 (patch) | |
tree | 76d25631b2ab51ee9adf8ccf58f3f55727275b6f /tools/perf/scripts/python/export-to-postgresql.py | |
parent | KVM: x86/mmu: Set kvm_page_fault.hva to KVM_HVA_ERR_BAD for "no slot" faults (diff) | |
download | linux-rng-f3310e622f77979f13a36f6bfaf0252eecc7b9f6.tar.xz linux-rng-f3310e622f77979f13a36f6bfaf0252eecc7b9f6.zip |
KVM: x86/mmu: Initialize kvm_page_fault's pfn and hva to error values
Explicitly set "pfn" and "hva" to error values in kvm_mmu_do_page_fault()
to harden KVM against using "uninitialized" values. In quotes because the
fields are actually zero-initialized, and zero is a legal value for both
page frame numbers and virtual addresses. E.g. failure to set "pfn" prior
to creating an SPTE could result in KVM pointing at physical address '0',
which is far less desirable than KVM generating a SPTE with reserved PA
bits set and thus effectively killing the VM.
Signed-off-by: Sean Christopherson <seanjc@google.com>
Reviewed-by: Kai Huang <kai.huang@intel.com>
Message-ID: <20240228024147.41573-16-seanjc@google.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'tools/perf/scripts/python/export-to-postgresql.py')
0 files changed, 0 insertions, 0 deletions