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  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Thu, 22 Jul 2021 08:40:23 -0700
From:   Oliver Upton <oupton@...gle.com>
To:     Maxim Levitsky <mlevitsk@...hat.com>
Cc:     Vitaly Kuznetsov <vkuznets@...hat.com>, kvm@...r.kernel.org,
        Paolo Bonzini <pbonzini@...hat.com>,
        Sean Christopherson <seanjc@...gle.com>,
        Wanpeng Li <wanpengli@...cent.com>,
        Jim Mattson <jmattson@...gle.com>, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] KVM: x86: Check the right feature bit for
 MSR_KVM_ASYNC_PF_ACK access

On Thu, Jul 22, 2021 at 5:39 AM Maxim Levitsky <mlevitsk@...hat.com> wrote:
>
> On Thu, 2021-07-22 at 14:30 +0200, Vitaly Kuznetsov wrote:
> > MSR_KVM_ASYNC_PF_ACK MSR is part of interrupt based asynchronous page fault
> > interface and not the original (deprecated) KVM_FEATURE_ASYNC_PF. This is
> > stated in Documentation/virt/kvm/msr.rst.
> >
> > Fixes: 66570e966dd9 ("kvm: x86: only provide PV features if enabled in guest's CPUID")
> > Signed-off-by: Vitaly Kuznetsov <vkuznets@...hat.com>
> > ---
> >  arch/x86/kvm/x86.c | 4 ++--
> >  1 file changed, 2 insertions(+), 2 deletions(-)
> >
> > diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c
> > index d715ae9f9108..88ff7a1af198 100644
> > --- a/arch/x86/kvm/x86.c
> > +++ b/arch/x86/kvm/x86.c
> > @@ -3406,7 +3406,7 @@ int kvm_set_msr_common(struct kvm_vcpu *vcpu, struct msr_data *msr_info)
> >                       return 1;
> >               break;
> >       case MSR_KVM_ASYNC_PF_ACK:
> > -             if (!guest_pv_has(vcpu, KVM_FEATURE_ASYNC_PF))
> > +             if (!guest_pv_has(vcpu, KVM_FEATURE_ASYNC_PF_INT))
> >                       return 1;
> >               if (data & 0x1) {
> >                       vcpu->arch.apf.pageready_pending = false;
> > @@ -3745,7 +3745,7 @@ int kvm_get_msr_common(struct kvm_vcpu *vcpu, struct msr_data *msr_info)
> >               msr_info->data = vcpu->arch.apf.msr_int_val;
> >               break;
> >       case MSR_KVM_ASYNC_PF_ACK:
> > -             if (!guest_pv_has(vcpu, KVM_FEATURE_ASYNC_PF))
> > +             if (!guest_pv_has(vcpu, KVM_FEATURE_ASYNC_PF_INT))
> >                       return 1;
> >
> >               msr_info->data = 0;
>
> Reviewed-by: Maxim Levitsky <mlevitsk@...hat.com>
>
> Best regards,
>         Maxim Levitsky
>

Reviewed-by: Oliver Upton <oupton@...gle.com>

--
Thanks,
Oliver

Powered by blists - more mailing lists