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:	Tue, 19 Sep 2006 09:13:11 -0700
From:	David Brownell <david-b@...bell.net>
To:	Jiri Kosina <jikos@...os.cz>
Cc:	linux-usb-devel@...ts.sourceforge.net,
	dbrownell@...rs.sourceforge.net, weissg@...nna.at,
	linux-kernel@...r.kernel.org, Andrew Morton <akpm@...l.org>
Subject: Re: [linux-usb-devel] [PATCH] USB: consolidate error values from EHCI, UHCI and OHCI _suspend()

On Tuesday 19 September 2006 3:43 am, Jiri Kosina wrote:

> (by the way, EHCI and OHCI seem to have broken (read: missing) locking 
> when accessing the hcd->state. Should I fix it by per-hcd spinlock, or 
> does the patch already exist somewhere?)

They should only ever access it while holding their internal spinlocks;
which are held during most driver operations, easy to miss.  And except
for hardware faults, the HCD state changes only when usbcore pushes an
HCD through driver model state transitions like probe(), suspend(), and
their inverses.  I see some dodgey code in the OHCI IRQ handler, but
even that shouldn't make trouble.

Admittedly the usbcore access to that field is a bit problematic, since
it doesn't handle the hardware faulting cases very cleanly.  For those
cases, other problems are more severe ... like basic cleanup of all the
pending transactions, and removal of the usb devices, didn't work the
last time I tripped over such cases.


Eventually we want hcd->state to vanish, but until it does it sure seems
like a problem if usbcore can't rely on all HCDs to treat it the same.

- Dave
-
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