lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Thu, 12 Jul 2018 09:25:46 -0700
From:   Jim Mattson <jmattson@...gle.com>
To:     Vitaly Kuznetsov <vkuznets@...hat.com>
Cc:     kvm list <kvm@...r.kernel.org>,
        Paolo Bonzini <pbonzini@...hat.com>,
        Radim Krčmář <rkrcmar@...hat.com>,
        "the arch/x86 maintainers" <x86@...nel.org>,
        Wanpeng Li <kernellwp@...il.com>,
        KarimAllah Ahmed <karahmed@...zon.de>,
        LKML <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] x86/kvm/nVMX: set exit_qualification correctly when
 nested_vmx_load_msr() fails

This looks similar to my "[PATCH] kvm: nVMX: Restore exit qual for
VM-entry failure due to MSR loading"

On Thu, Jul 12, 2018 at 4:35 AM, Vitaly Kuznetsov <vkuznets@...hat.com> wrote:
> Commit e79f245ddec1 ("X86/KVM: Properly update 'tsc_offset' to represent
> the running guest") introduced a regression in enter_vmx_non_root_mode():
> when nested_vmx_load_msr() fails exit_qualification needs to point to the
> entry number we failed to validate. Intel's SDM states:
>
> "VM-entry failure due to MSR loading. The exit qualification is loaded to
> indicate which entry in the VM-entry MSR-load area caused the problem (1
> for the first entry, 2 for the second, etc.)."
>
> Fixes: e79f245ddec1 ("X86/KVM: Properly update 'tsc_offset' to represent the running guest")
> Reported-by: Wanpeng Li <kernellwp@...il.com>
> Signed-off-by: Vitaly Kuznetsov <vkuznets@...hat.com>
> ---
>  arch/x86/kvm/vmx.c | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/arch/x86/kvm/vmx.c b/arch/x86/kvm/vmx.c
> index 65968649b365..be468c822892 100644
> --- a/arch/x86/kvm/vmx.c
> +++ b/arch/x86/kvm/vmx.c
> @@ -11720,8 +11720,10 @@ static int enter_vmx_non_root_mode(struct kvm_vcpu *vcpu)
>         msr_entry_idx = nested_vmx_load_msr(vcpu,
>                                             vmcs12->vm_entry_msr_load_addr,
>                                             vmcs12->vm_entry_msr_load_count);
> -       if (msr_entry_idx)
> +       if (msr_entry_idx) {
> +               exit_qual = msr_entry_idx;
>                 goto fail;
> +       }
>
>         /*
>          * Note no nested_vmx_succeed or nested_vmx_fail here. At this point
> --
> 2.14.4
>

Powered by blists - more mailing lists