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] [thread-next>] [day] [month] [year] [list]
Date:	Tue, 7 Dec 2010 18:29:37 +0100 (CET)
From:	Sebastian Ott <sebott@...ux.vnet.ibm.com>
To:	Greg KH <gregkh@...e.de>
cc:	Kay Sievers <kay.sievers@...y.org>, linux-kernel@...r.kernel.org
Subject: Re: [RFC] bind/unbind uevent


On Tue, 7 Dec 2010, Greg KH wrote:
> On Tue, Dec 07, 2010 at 05:18:27PM +0100, Sebastian Ott wrote:
> > Hi,
> > 
> > There is currently no generic trigger for userspace to know when a driver
> > is bound to a device.
> 
> Not true at all, you get one when a device is attached to a bus.  What's
> wrong with that notification?
we get a KOBJ_ADD if a device is attached to a bus, but this does not
imply that a device driver is bound to this device

> 
> > Such a trigger may be required in cases where setup
> > steps must be performed in userspace after the device is bound, e.g.
> > because the driver adds sysfs attributes in its probe function.
> 
> A driver should not add sysfs attributes in its probe function as that
> is racy as you have noticed.  Add the attributes in the bus functions
> for that driver and it should be fine.
sry..I was not clear on this one. I was talking driver specific
attributes per device. So I'm searching for a trigger when these
attributes are created, or in other words when the device is useable,
which I think translates to when a driver is bound to this device.

> 
> > I can imagine 3 possible ways to solve this problem:
> > * add a bus specific change event (triggered by BUS_NOTIFY_BOUND_DRIVER)
> >   - this may result in duplicated code for each bus
> > * dissable autoprobing and "manually" probe the device from userspace
> >   triggered by the add event - this duplicates logic already implemented
> >   in the kernel
> > * add a generic bind/unbind uevent
> > 
> > Which one is preferred from a driver core perspective?
> 
> None, use the existing notifications like everyone else :)
> 
> thanks,
> 
> 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