diff options
author | 2021-11-22 18:20:16 -0500 | |
---|---|---|
committer | 2021-11-26 06:43:28 -0500 | |
commit | 8503fea6761de32b72585001ac94e5f81ce8ca44 (patch) | |
tree | f96061abbabe1d65115ea53ebfafa431b26d64e3 /tools/perf/scripts/python/export-to-postgresql.py | |
parent | Merge branch 'kvm-5.16-fixes-pre-rc2' into HEAD (diff) | |
download | linux-dev-8503fea6761de32b72585001ac94e5f81ce8ca44.tar.xz linux-dev-8503fea6761de32b72585001ac94e5f81ce8ca44.zip |
KVM: VMX: do not use uninitialized gfn_to_hva_cache
An uninitialized gfn_to_hva_cache has ghc->len == 0, which causes
the accessors to croak very loudly. While a BUG_ON is definitely
_too_ loud and a bug on its own, there is indeed an issue of using
the caches in such a way that they could not have been initialized,
because ghc->gpa == 0 might match and thus kvm_gfn_to_hva_cache_init
would not be called.
For the vmcs12_cache, the solution is simply to invoke
kvm_gfn_to_hva_cache_init unconditionally: we already know
that the cache does not match the current VMCS pointer.
For the shadow_vmcs12_cache, there is no similar condition
that checks the VMCS link pointer, so invalidate the cache
on VMXON.
Fixes: cee66664dcd6 ("KVM: nVMX: Use a gfn_to_hva_cache for vmptrld")
Acked-by: David Woodhouse <dwmw@amazon.co.uk>
Reported-by: syzbot+7b7db8bb4db6fd5e157b@syzkaller.appspotmail.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