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>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1383022483.3410.85.camel@snotra.buserror.net>
Date:	Mon, 28 Oct 2013 23:54:43 -0500
From:	Scott Wood <scottwood@...escale.com>
To:	Bhushan Bharat-R65777 <R65777@...escale.com>
CC:	Wood Scott-B07421 <B07421@...escale.com>,
	Alex Williamson <alex.williamson@...hat.com>,
	Kim Phillips <kim.phillips@...aro.org>,
	Yoder Stuart-B08248 <B08248@...escale.com>,
	"christoffer.dall@...aro.org" <christoffer.dall@...aro.org>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
	"a.motakis@...tualopensystems.com" <a.motakis@...tualopensystems.com>,
	"agraf@...e.de" <agraf@...e.de>,
	Sethi Varun-B16395 <B16395@...escale.com>,
	"peter.maydell@...aro.org" <peter.maydell@...aro.org>,
	"santosh.shukla@...aro.org" <santosh.shukla@...aro.org>,
	"kvm@...r.kernel.org" <kvm@...r.kernel.org>,
	"gregkh@...uxfoundation.org" <gregkh@...uxfoundation.org>
Subject: Re: [PATCH 3/4] VFIO: pci: amend vfio-pci for explicit binding via
 sysfs only

On Mon, 2013-10-28 at 23:45 -0500, Bhushan Bharat-R65777 wrote:
> 
> > -----Original Message-----
> > From: Wood Scott-B07421
> > Sent: Tuesday, October 29, 2013 10:05 AM
> > To: Bhushan Bharat-R65777
> > Cc: Wood Scott-B07421; Alex Williamson; Kim Phillips; Yoder Stuart-B08248;
> > christoffer.dall@...aro.org; linux-kernel@...r.kernel.org;
> > a.motakis@...tualopensystems.com; agraf@...e.de; Sethi Varun-B16395;
> > peter.maydell@...aro.org; santosh.shukla@...aro.org; kvm@...r.kernel.org;
> > gregkh@...uxfoundation.org
> > Subject: Re: [PATCH 3/4] VFIO: pci: amend vfio-pci for explicit binding via
> > sysfs only
> > 
> > On Mon, 2013-10-28 at 23:31 -0500, Bhushan Bharat-R65777 wrote:
> > >
> > > > -----Original Message-----
> > > > From: Wood Scott-B07421
> > > > Sent: Tuesday, October 29, 2013 10:00 AM
> > > > To: Bhushan Bharat-R65777
> > > > Cc: Wood Scott-B07421; Alex Williamson; Kim Phillips; Yoder
> > > > Stuart-B08248; christoffer.dall@...aro.org;
> > > > linux-kernel@...r.kernel.org; a.motakis@...tualopensystems.com;
> > > > agraf@...e.de; Sethi Varun-B16395; peter.maydell@...aro.org;
> > > > santosh.shukla@...aro.org; kvm@...r.kernel.org;
> > > > gregkh@...uxfoundation.org
> > > > Subject: Re: [PATCH 3/4] VFIO: pci: amend vfio-pci for explicit
> > > > binding via sysfs only
> > > >
> > > > On Mon, 2013-10-28 at 22:52 -0500, Bhushan Bharat-R65777 wrote:
> > > > > So when ids == NULL it does not check of vendor etc and calls
> > > > > pci_add_dynid()
> > > > which in turn calls driver_attach().
> > > > >
> > > > > If we change the above loop to break if ids->vendor == PCI_ANY_ID
> > > > >&& ids- subvendor == PCI_ANY_ID then also we will call pci_add_dyids().
> > > >
> > > > What problem are you trying to solve?
> > >
> > > new_id interface to continue working as before.
> > 
> > In what specific way does this allow new_id to continue working as before?  Be
> > verbose.
> 
> 
> What I observed that this patch (kim's patch) new_id interface stops working.

Yes.

>  This is found to be because store_new_id() checks for pdrv->id_table which is no more NULL, so the below check fails

I do not think that is the reason.  The reason is because
sysfs_bind_only is set, and this is not a direct sysfs bind.

>         if (ids) {
> ^^
> This is no more NULL, so enter inside the loop
> 
>                 retval = -EINVAL;
>                 while (ids->vendor || ids->subvendor || ids->class_mask) {
>                         if (driver_data == ids->driver_data) {
>                                 retval = 0;
>                                 break;
>                         }
>                         ids++;
>                 }
>                 if (retval)   /* No match */
>                         return retval;
> ^^^^^
> This is where it returns as -EINVAL

Why wouldn't it have broken out of the loop earlier, since driver_data
and ids->driver_data should both be zero?  I assume this is with a patch
to do PCI_ANY_ID in vfio-pci.

-Scott



--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ