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>] [day] [month] [year] [list]
Message-ID: <a3eb519e5831459db1c926776ad97cca@huawei.com>
Date:   Thu, 23 Jan 2020 09:36:30 +0000
From:   linmiaohe <linmiaohe@...wei.com>
To:     Paolo Bonzini <pbonzini@...hat.com>,
        Vitaly Kuznetsov <vkuznets@...hat.com>
CC:     "kvm@...r.kernel.org" <kvm@...r.kernel.org>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        "x86@...nel.org" <x86@...nel.org>,
        "rkrcmar@...hat.com" <rkrcmar@...hat.com>,
        "sean.j.christopherson@...el.com" <sean.j.christopherson@...el.com>,
        "wanpengli@...cent.com" <wanpengli@...cent.com>,
        "jmattson@...gle.com" <jmattson@...gle.com>,
        "joro@...tes.org" <joro@...tes.org>,
        "tglx@...utronix.de" <tglx@...utronix.de>,
        "mingo@...hat.com" <mingo@...hat.com>,
        "bp@...en8.de" <bp@...en8.de>, "hpa@...or.com" <hpa@...or.com>
Subject: Re: [PATCH] KVM: nVMX: set rflags to specify success in
 handle_invvpid() default case

Paolo Bonzini <pbonzini@...hat.com> wrote:
> On 23/01/20 09:55, Vitaly Kuznetsov wrote:
> > Your patch seems to do the right thing, however, I started wondering 
> > if
> > WARN_ON_ONCE() is the right thing to do. SDM says that "If an 
> > unsupported INVVPID type is specified, the instruction fails." and 
> > this is similar to INVEPT and I decided to check what handle_invept() 
> > does. Well, it does BUG_ON().
> > 
> > Are we doing the right thing in any of these cases?
>
> Yes, both INVEPT and INVVPID catch this earlier.
>
> For INVEPT:
>
>         types = (vmx->nested.msrs.ept_caps >> VMX_EPT_EXTENT_SHIFT) & 6;
>
>         if (type >= 32 || !(types & (1 << type)))
>                 return nested_vmx_failValid(vcpu,
>                                 VMXERR_INVALID_OPERAND_TO_INVEPT_INVVPID);
>
>
>
> For INVVPID:
>
>         types = (vmx->nested.msrs.vpid_caps &
>                         VMX_VPID_EXTENT_SUPPORTED_MASK) >> 8;
>
>         if (type >= 32 || !(types & (1 << type)))
>                 return nested_vmx_failValid(vcpu,
>                         VMXERR_INVALID_OPERAND_TO_INVEPT_INVVPID);
>
> So I'm leaning towards not applying Miaohe's patch.  Happy Mouse Year to everyone, here is an ASCII art (except for one Unicode character) mouse:
>
>
>        __()()
>       /     o)
>   ~~~~\_,__,_>°
>
> Thanks,

Yes, it seems my patch is meaningless. And thanks for both of your review and reply.
Happy Mouse Year and I catch a mickey mouse:

   ###########
  ###############        __-----__          ##
##################    ###          \       ####
################## #### #            \     # ##
 ####################            \~~\  \   ,##",
  #################       /~~\    \## \  \"     :
    ###############       \    \   \##" /       :
              #######       \### \    /         :
              #############  \###/             :
               ########                       :
                ######   __                  :
                 ####   /\                  /
      ############ ###    \\______________/|
    ##################     \ __         / /
  ####################\__    \  \---\,/ /
  ###################    \     \_____/ /
   #################       \_________/
    ###############
      ###########

Thanks both again.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ