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]
Message-ID: <20181105132106.GB20797@kroah.com>
Date:   Mon, 5 Nov 2018 14:21:06 +0100
From:   Greg KH <gregkh@...uxfoundation.org>
To:     Jonas Bonn <jonas@...rbonn.se>
Cc:     linux-kernel@...r.kernel.org, rafael@...nel.org
Subject: Re: KOBJ_BIND uevent

On Mon, Nov 05, 2018 at 11:35:57AM +0100, Jonas Bonn wrote:
> Hi,
> 
> I have a question about the ordering of uevents, specifically concerning
> complex USB devices that present multiple interfaces/functions.
> 
> Before KOBJ_BIND, a USB device would typically present itself as:
> 
> add usb_device
> add usb_interface-1
> add subsystem-device-1.0
> add subsystem-device-1.1
> add usb_interface-2
> add subsystem-device-2.0
> 
> I have noted that the recently added "bind" actions, however, present in the
> reverse order.
> 
> bind subsystem-device-1.0
> bind subsystem-device-1.1
> bind usb-interface-1
> bind subsystem-device-2.0
> bind usb_interface-2
> bind usb_device
> 
> This secondary ordering could be useful in the sense that the final "bind"
> action on the usb_device is an indication that the kernel has finished
> enumeration of all endpoints and has bound all drivers that it could to the
> available interfaces... i.e. no further events for this device are expected.

Maybe.  Maybe not, as userspace might still be in the process of loading
new kernel drivers based on the add uevents that got sent out.  Then
binding would happen later after the usb_device was "bound".

> The question, then, is:  is the above ordering of "bind" events stable, or
> is it just a consequence of the current implementation and may change in the
> future?

Not stable at all, sorry, you can not depend on it.

Nor should you even try to, what problem are you wanting to solve here?

thanks,

greg k-h

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ