aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/tools/perf/scripts/python/exported-sql-viewer.py
diff options
context:
space:
mode:
authorSean Christopherson <sean.j.christopherson@intel.com>2020-09-23 11:44:50 -0700
committerPaolo Bonzini <pbonzini@redhat.com>2020-09-28 07:57:46 -0400
commitdf82a24b29d1b10b965eb7d66b68867b7da76e76 (patch)
treea84d2a36800d4922b88bd86c4d1d331d4337d1b1 /tools/perf/scripts/python/exported-sql-viewer.py
parentKVM: nVMX: Move free_nested() below vmx_switch_vmcs() (diff)
downloadwireguard-linux-df82a24b29d1b10b965eb7d66b68867b7da76e76.tar.xz
wireguard-linux-df82a24b29d1b10b965eb7d66b68867b7da76e76.zip
KVM: nVMX: Ensure vmcs01 is the loaded VMCS when freeing nested state
Add a WARN in free_nested() to ensure vmcs01 is loaded prior to freeing vmcs02 and friends, and explicitly switch to vmcs01 if it's not. KVM is supposed to keep is_guest_mode() and loaded_vmcs==vmcs02 synchronized, but bugs happen and freeing vmcs02 while it's in use will escalate a KVM error to a use-after-free and potentially crash the kernel. Do the WARN and switch even in the !vmxon case to help detect latent bugs. free_nested() is not a hot path, and the check is cheap. Signed-off-by: Sean Christopherson <sean.j.christopherson@intel.com> Message-Id: <20200923184452.980-6-sean.j.christopherson@intel.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'tools/perf/scripts/python/exported-sql-viewer.py')
0 files changed, 0 insertions, 0 deletions