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: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Mon, 18 Feb 2019 16:26:59 +0800
From:   "linux.intel.com" <xiaoyao.li@...ux.intel.com>
To:     Konrad Rzeszutek Wilk <konrad.wilk@...cle.com>,
        Paolo Bonzini <pbonzini@...hat.com>
Cc:     x86@...nel.org, kvm@...r.kernel.org, linux-kernel@...r.kernel.org,
        Radim Krčmář <rkrcmar@...hat.com>,
        Thomas Gleixner <tglx@...utronix.de>,
        Ingo Molnar <mingo@...hat.com>, Borislav Petkov <bp@...en8.de>,
        "H. Peter Anvin" <hpa@...or.com>
Subject: Re: [PATCH] kvm: vmx: Fix entry nubmer check for
 add_atomic_switch_msr()

On Fri, 2019-02-15 at 11:46 -0500, Konrad Rzeszutek Wilk wrote:
> On Thu, Feb 14, 2019 at 12:08:58PM +0800, Xiaoyao Li wrote:
> > Commit ca83b4a7f2d068da79a0 ("x86/KVM/VMX: Add find_msr() helper function")
> > introduces the helper function find_msr(), which returns -ENOENT when
> > not find the msr in vmx->msr_autoload.guest/host. Correct checking contion
> 
> s/not find/cannot find/
> s/contion/condition/ ?
> 

Hi Paolo,
Could you correct these typos in KVM tree or when sending a PR?

> > of no more available entry in vmx->msr_autoload.
> > 
> > Fixes: ca83b4a7f2d0 ("x86/KVM/VMX: Add find_msr() helper function")
> > Signed-off-by: Xiaoyao Li <xiaoyao.li@...ux.intel.com>
> > ---
> >  arch/x86/kvm/vmx/vmx.c | 3 ++-
> >  1 file changed, 2 insertions(+), 1 deletion(-)
> > 
> > diff --git a/arch/x86/kvm/vmx/vmx.c b/arch/x86/kvm/vmx/vmx.c
> > index 95d618045001..1aaef2d536bd 100644
> > --- a/arch/x86/kvm/vmx/vmx.c
> > +++ b/arch/x86/kvm/vmx/vmx.c
> > @@ -863,7 +863,8 @@ static void add_atomic_switch_msr(struct vcpu_vmx *vmx,
> > unsigned msr,
> >  	if (!entry_only)
> >  		j = find_msr(&m->host, msr);
> >  
> > -	if (i == NR_AUTOLOAD_MSRS || j == NR_AUTOLOAD_MSRS) {
> > +	if ((i < 0 && m->guest.nr == NR_AUTOLOAD_MSRS) ||
> > +		(j < 0 &&  m->host.nr == NR_AUTOLOAD_MSRS)) {
> >  		printk_once(KERN_WARNING "Not enough msr switch entries. "
> >  				"Can't add msr %x\n", msr);
> >  		return;
> > -- 
> > 2.19.1
> > 

Powered by blists - more mailing lists