KVM: nVMX: Don't dump VMCS if virtual APIC page can't be mapped
authorSean Christopherson <sean.j.christopherson@intel.com>
Tue, 7 May 2019 16:06:26 +0000 (09:06 -0700)
committerPaolo Bonzini <pbonzini@redhat.com>
Tue, 18 Jun 2019 09:47:21 +0000 (11:47 +0200)
... as a malicious userspace can run a toy guest to generate invalid
virtual-APIC page addresses in L1, i.e. flood the kernel log with error
messages.

Fixes: 690908104e39d ("KVM: nVMX: allow tests to use bad virtual-APIC page address")
Cc: stable@vger.kernel.org
Cc: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Sean Christopherson <sean.j.christopherson@intel.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
arch/x86/kvm/vmx/nested.c

index 691f84b..4ba0e7b 100644 (file)
@@ -2880,9 +2880,6 @@ static void nested_get_vmcs12_pages(struct kvm_vcpu *vcpu)
                         */
                        vmcs_clear_bits(CPU_BASED_VM_EXEC_CONTROL,
                                        CPU_BASED_TPR_SHADOW);
-               } else {
-                       printk("bad virtual-APIC page address\n");
-                       dump_vmcs();
                }
        }