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>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20131220000035.GA5462@kroah.com>
Date:	Thu, 19 Dec 2013 16:00:35 -0800
From:	Greg Kroah-Hartman <gregkh@...uxfoundation.org>
To:	Stuart Yoder <stuart.yoder@...escale.com>
Cc:	Scott Wood <scottwood@...escale.com>,
	Kim Phillips <kim.phillips@...aro.org>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
	"kvm@...r.kernel.org" <kvm@...r.kernel.org>,
	"Bharat.Bhushan@...escale.com" <Bharat.Bhushan@...escale.com>,
	"christoffer.dall@...aro.org" <christoffer.dall@...aro.org>,
	"alex.williamson@...hat.com" <alex.williamson@...hat.com>,
	"a.motakis@...tualopensystems.com" <a.motakis@...tualopensystems.com>,
	"agraf@...e.de" <agraf@...e.de>,
	Varun Sethi <Varun.Sethi@...escale.com>
Subject: Re: [REPOST][PATCH 1/2] driver core: Add new device_driver flag to
 allow binding via sysfs only

On Thu, Dec 19, 2013 at 11:08:55PM +0000, Stuart Yoder wrote:
> > > How will it "know not to grab the device"?  The knowledge of whether
> > the
> > > binding was explicitly requested or not does not get passed through to
> > > the probe function.
> > 
> > Nor should it, as a driver should not know, nor care about this.
> > 
> > It's up to the BUS to handle this if it really wants to, and I'm afraid
> > that I really am not convinced that the driver core needs to handle it
> > either.
> > 
> > But again, as you don't have anything that could actually use this code
> > that is mergable, it's a totally moot point, sorry.
> 
> Understand, but what assumption do we develop vfio-plaform with?  That
> a driver core 'sysfs_bind_only' flag is not an option, period?  If that
> is the case we need to go back to square one and invent some new mechanism
> to bind devices to the vfio-platform driver.

Ok, why the total confusion between PCI and platform devices here?  Why
keep mentioning both of them in a semi-interchangeable way?

> I guess it would need to be the platform bus equivalent of new_id.

Then add it, there's nothing stopping the platform bus from supporting
this.

> But, then we're left with the potential racy situation where multiple drivers
> can potentially grab a device and it's ambiguous and non-deterministic at to which
> driver binds to it.

Welcome to life in hotpluggable systems, this is nothing new :)

Seriously, userspace has the ability to sort this all out after devices
show up, use it.  Don't try to create convoluted schemes in the driver
core that are confusing and don't really seem to work.

People have asked for a "priority" of drivers binding to devices for
over a decade now, as "other" operating systems have it.  Turns out, no
one has ever needed it badly enough to actually implement it...

good luck,

greg k-h
--
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