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: <200804021607.22424.david-b@pacbell.net>
Date:	Wed, 2 Apr 2008 16:07:21 -0700
From:	David Brownell <david-b@...bell.net>
To:	Alan Stern <stern@...land.harvard.edu>
Cc:	Mark Lord <lkml@....ca>, pavel@...e.cz, oliver@...kum.org,
	linux-usb@...r.kernel.org, linux-kernel@...r.kernel.org,
	jikos@...e.cz, gregkh@...e.de, akpm@...ux-foundation.org
Subject: Re: [PATCH] usb ehci_iaa_watchdog fix

On Wednesday 02 April 2008, Alan Stern wrote:
> On Wed, 2 Apr 2008, David Brownell wrote:
> 
> > Those hcd->state tests have been getting more and more
> > dodgey as time goes by.  At this point I hardly trust
> > any of them.  There *IS* no clear state machine which
> > governs the usbcore/HCD interaction.
> 
> ISTR trying to make that same point a few times over the past two or 
> three years...  :-)

Was there any argument about that fact?  The question was
more "shouldn't there actually *be* such a state machine"
than "do we have one yet".


> It would make more sense for each HCD to keep its own private "state" 
> variable.  The interaction with usbcore can be broken down into a few 
> simple tests, such as:
> 
> 	Is the HC dead?
> 	Is the HC (i.e., the PCI or platform device) suspended?
> 	Is the HC running?
> 	Is it okay to submit an URB?
> 
> There's plenty of redundancy in this list, and some of the information
> may already be available in hcd->self.root_hub->state.  In many or most
> cases, these questions can't be answered in a race-free manner anyhow, 
> which limits their usefulness.

At any given instant, all of them have valid answers.
The only one that's not resolvable by mutual exclusion
on the HCD's spinlock is "is it dead", since the HC
could crap out at any time.  (Nowadays that's fortunately
rare ... we've been whomping on such bugs for long enough
by now!)

- 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