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: <20071016191323.GC24082@one-eyed-alien.net>
Date:	Tue, 16 Oct 2007 12:13:23 -0700
From:	Matthew Dharm <mdharm-kernel@...-eyed-alien.net>
To:	Alan Stern <stern@...land.harvard.edu>
Cc:	Greg KH <greg@...ah.com>, Dave Young <hidave.darkstar@...il.com>,
	bbpetkov@...oo.de,
	Kernel development list <linux-kernel@...r.kernel.org>,
	USB development list <linux-usb-devel@...ts.sourceforge.net>
Subject: Re: [linux-usb-devel] usb+sysfs: duplicate filename 'bInterfaceNumber'

On Tue, Oct 16, 2007 at 02:04:43PM -0400, Alan Stern wrote:
> On Tue, 16 Oct 2007, Matthew Dharm wrote:
> 
> > I haven't looked at this code at all, but neither approach feels right to
> > me.
> > 
> > How does this work at all?  Even if you load a driver later, wouldn't it
> > call usb_set_interface(), which would call usb_create_sysfs_intf_files()
> > and hit the same issue?
> 
> usb_set_interface() is smart enough to remove the old interface files
> before creating new ones, since it expects them to exist already.  
> Hence there's no problem in that scenario.
> 
> But usb_set_configuration doesn't expect there to be any pre-existing
> interface files, because there isn't even an interface until the
> registration is performed.

And I'm guessing that you can't call usb_create_sysfs_intf_files() until
registration is performed, right?

> The most important reason has to do with the endpoint pseudo-devices.  
> Different altsettings can have different endpoints, so those have to be
> removed and re-created whenever the altsetting changes.

Right, altsettings.  I forgot about those.  I only ever think in terms of
multiple configurations.

*grumble*

If usb_set_interface() has to be smart enough to remove existing files
first already, then I guess it's reasonably symmetric to have
usb_set_configuration() have the same smarts.  Maybe they can share some
common code, even.

Matt

-- 
Matthew Dharm                              Home: mdharm-usb@...-eyed-alien.net 
Maintainer, Linux USB Mass Storage Driver

C:  Why are you upgrading to NT?
AJ: It must be the sick, sadistic streak that runs through me.
					-- Chief and A.J.
User Friendly, 5/12/1998

Content of type "application/pgp-signature" skipped

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ