]> git.baikalelectronics.ru Git - kernel.git/commit
Merge branch 'cve-2019-3016' into kvm-next-5.6
authorPaolo Bonzini <pbonzini@redhat.com>
Thu, 30 Jan 2020 17:47:38 +0000 (18:47 +0100)
committerPaolo Bonzini <pbonzini@redhat.com>
Thu, 30 Jan 2020 17:47:59 +0000 (18:47 +0100)
commit5f2273d83538664115c07ed736d52fef35d6975c
tree67084da88ee7651804b98c939b1284f4f6f1aaf1
parentaed789b9554360648811c2ff067de70489f5d099
parent8c99ec2de7f5faa718ebd407b76cd486dbee34d8
Merge branch 'cve-2019-3016' into kvm-next-5.6

From Boris Ostrovsky:

The KVM hypervisor may provide a guest with ability to defer remote TLB
flush when the remote VCPU is not running. When this feature is used,
the TLB flush will happen only when the remote VPCU is scheduled to run
again. This will avoid unnecessary (and expensive) IPIs.

Under certain circumstances, when a guest initiates such deferred action,
the hypervisor may miss the request. It is also possible that the guest
may mistakenly assume that it has already marked remote VCPU as needing
a flush when in fact that request had already been processed by the
hypervisor. In both cases this will result in an invalid translation
being present in a vCPU, potentially allowing accesses to memory locations
in that guest's address space that should not be accessible.

Note that only intra-guest memory is vulnerable.

The five patches address both of these problems:
1. The first patch makes sure the hypervisor doesn't accidentally clear
a guest's remote flush request
2. The rest of the patches prevent the race between hypervisor
acknowledging a remote flush request and guest issuing a new one.

Conflicts:
arch/x86/kvm/x86.c [move from kvm_arch_vcpu_free to kvm_arch_vcpu_destroy]
arch/x86/include/asm/kvm_host.h
arch/x86/kvm/x86.c
include/linux/kvm_host.h
virt/kvm/kvm_main.c