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 for Android: free password hash cracker in your pocket
[<prev] [next>] [day] [month] [year] [list]
Date:   Mon, 28 Jan 2019 21:52:57 -0800
From:   Maya Nakamura <m.maya.nakamura@...il.com>
To:     Michael Kelley <mikelley@...rosoft.com>
Cc:     "lorenzo.pieralisi@....com" <lorenzo.pieralisi@....com>,
        "bhelgaas@...gle.com" <bhelgaas@...gle.com>,
        "linux-pci@...r.kernel.org" <linux-pci@...r.kernel.org>,
        KY Srinivasan <kys@...rosoft.com>,
        Stephen Hemminger <sthemmin@...rosoft.com>,
        "olaf@...fle.de" <olaf@...fle.de>,
        "apw@...onical.com" <apw@...onical.com>,
        "jasowang@...hat.com" <jasowang@...hat.com>,
        Sasha Levin <Alexander.Levin@...rosoft.com>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        "driverdev-devel@...uxdriverproject.org" 
        <driverdev-devel@...uxdriverproject.org>,
        Haiyang Zhang <haiyangz@...rosoft.com>,
        vkuznets <vkuznets@...hat.com>,
        "marcelo.cerri@...onical.com" <marcelo.cerri@...onical.com>
Subject: Re: [PATCH v2 2/2] PCI: hv: Refactor hv_irq_unmask() to use
 cpumask_to_vpset()

On Sun, Jan 27, 2019 at 05:22:06AM +0000, Michael Kelley wrote:
> From: Maya Nakamura <m.maya.nakamura@...il.com>  Sent: Saturday, January 26, 2019 12:55 AM
> >
> > @@ -953,29 +951,27 @@ static void hv_irq_unmask(struct irq_data *data)
> >  		 */
> >  		params->int_target.flags |=
> >  			HV_DEVICE_INTERRUPT_TARGET_PROCESSOR_SET;
> > -		params->int_target.vp_set.valid_bank_mask =
> > -			(1ull << HV_VP_SET_BANK_COUNT_MAX) - 1;
> > +
> > +		if (!alloc_cpumask_var(&tmp, GFP_KERNEL)) {
> > +			res = 1;
> > +			goto exit_unlock;
> > +		}
> > +
> > +		cpumask_and(tmp, dest, cpu_online_mask);
> > +		nr_bank = cpumask_to_vpset(&params->int_target.vp_set, tmp);
> > +		free_cpumask_var(tmp);
> > +
> > +		if (!nr_bank) {
> 
> There are two failures cases in cpumask_to_vpset().  One case returns
> 0, and the other case returns -1.  The above test only catches the 0
> failure case.  Need to modify the test to catch both cases.
> 
> Michael
> 
Thank you for your feedback. I will correct it in v3.

Maya

> > +			res = 1;
> > +			goto exit_unlock;
> > +		}
> > 
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ