]> git.baikalelectronics.ru Git - kernel.git/commit
KVM: x86: do not pass poisoned hva to __kvm_set_memory_region
authorPaolo Bonzini <pbonzini@redhat.com>
Thu, 11 Jun 2020 18:01:51 +0000 (14:01 -0400)
committerPaolo Bonzini <pbonzini@redhat.com>
Thu, 11 Jun 2020 18:02:02 +0000 (14:02 -0400)
commit7c07661b7c1caa1292e880dc5fa200816fede275
treed2767c63e064f52559f792182767d77c1e5fd434
parent3636dd988a90e671126ef25bdafe7612b7f6357c
KVM: x86: do not pass poisoned hva to __kvm_set_memory_region

__kvm_set_memory_region does not use the hva at all, so trying to
catch use-after-delete is pointless and, worse, it fails access_ok
now that we apply it to all memslots including private kernel ones.
This fixes an AVIC regression.

Fixes: c85ea33e31fe ("KVM: check userspace_addr for all memslots")
Reported-by: Maxim Levitsky <mlevitsk@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
arch/x86/kvm/x86.c