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]
Date:	Sat, 2 Jun 2007 10:49:44 -0400 (EDT)
From:	Alan Stern <stern@...land.harvard.edu>
To:	Michael Hanselmann <linux-kernel@...smi.ch>
cc:	linux-kernel@...r.kernel.org, <dbrownell@...rs.sourceforge.net>,
	<linux-usb-devel@...ts.sourceforge.net>,
	<linux-kernel@...lerfox.forkbomb.ch>
Subject: Re: [linux-usb-devel] [PATCH] Fix NEC OHCI chip silicon bug

On Sat, 2 Jun 2007, Michael Hanselmann wrote:

> On Fri, Jun 01, 2007 at 10:19:30AM -0400, Alan Stern wrote:
> > > @@ -779,7 +790,11 @@ static int ohci_restart (struct ohci_hcd
> > >  	 */
> > >  	spin_lock_irq(&ohci->lock);
> > >  	disable (ohci);
> > > +
> > > +#ifdef CONFIG_PM
> > >  	usb_root_hub_lost_power(ohci_to_hcd(ohci)->self.root_hub);
> > > +#endif
> > > +
> 
> > Suppose CONFIG_PM isn't defined.  How are you going to let usbcore 
> > know about all the old connections which no longer exist?
> 
> You're right, something is wrong there. The patch below uses
> usb_root_hub_lost_power again but disables CONFIG_PM specific code in it
> when CONFIG_PM isn't defined. It seems to work for me with and without
> CONFIG_PM, but I have to confess I might not know enough about Linux'
> USB core. Is it better now?

Well no, even this is still wrong.

What you don't understand is how usb_root_hub_lost_power() works.  It 
doesn't actually do much of anything itself; it simply sets a flag in 
the root hub's device structure.  Then later on, when the hub driver 
is resumed it will see the flag and disconnect all the devices below 
the root hub.

In your case the last step won't work, because the hub driver will
never be resumed since it wasn't suspended to begin with.  You need to
use a completely different approach.  For instance, you could force
ohci-hcd to report connect-change events on all the ports.  Perhaps it
does something like that anyway, in which case you wouldn't have to
worry about it.

Alan Stern

-
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