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] [day] [month] [year] [list]
Date:	Wed, 01 Oct 2008 16:10:22 +0200
From:	Denis Joseph Barrow <D.Barow@...ion.com>
To:	Alan Stern <stern@...land.harvard.edu>
CC:	Andrew Bird <ajb@...eresystems.co.uk>,
	Linux USB kernel mailing list <linux-usb@...r.kernel.org>,
	Linux netdev Mailing list <netdev@...r.kernel.org>,
	Greg Kroah-Hartman <gregkh@...e.de>
Subject: Re: A few design questions wrt the hso driver.

Hi Alan,
Thank you good sir, I'll look into it.

Alan Stern wrote:
> On Wed, 1 Oct 2008, Denis Joseph Barrow wrote:
> 
>> Now a more involved question.
>> The suspend resume code in hso.c hso_get_activity &
>> hso_put_activity code to me looks very racy but the code seems to be working relatively reliably
>> because the schedule resume stuff happens at a slow pace. 
>> Despite the codes simplicity I do not have a good feel for whether it
>> is stable or not & don't feel like an authority on how to make the code better.
>>
>> The more obvious possible issues I see with it the code are,
>> I could be wrong if I am please say so.
>> 1) On smp systems there is a
>> workqueue for each cpu which means
>> that if one cpu workqueue is not going to be scheduled soon & the other 
>> workqueue is, if a suspend is queued on the cpu which is busy
>> & a resume is later queued on the cpu with soon to run workqueue
>> the resume will most likely happen before the suspend i.e. out of order.
>>
>> 2) Also only the schedule_work will only queue the
>> request once so if multiple schedule works happen
>> only the first one is accepted even if you wanted
>> to change the order of the suspend resume requests later on
>> they won't reorder.
> 
> I agree that the code looks very racy.  You may be able to improve it
> by using the new infrastructure in this patch:
> 
> 	http://marc.info/?l=linux-usb&m=122279021325200&w=2
> 
> It is intended specifically for handling asynchronous suspends and 
> resumes.
> 
> Alan Stern


-- 
best regards,
D.J. Barrow
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ