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]
Message-ID: <4B53F496.8050105@kernel.org>
Date:	Mon, 18 Jan 2010 14:41:42 +0900
From:	Tejun Heo <tj@...nel.org>
To:	Andy Walls <awalls@...ix.net>
CC:	torvalds@...ux-foundation.org, mingo@...e.hu, peterz@...radead.org,
	linux-kernel@...r.kernel.org, jeff@...zik.org,
	akpm@...ux-foundation.org, jens.axboe@...cle.com,
	rusty@...tcorp.com.au, cl@...ux-foundation.org,
	dhowells@...hat.com, arjan@...ux.intel.com, avi@...hat.com,
	johannes@...solutions.net, andi@...stfloor.org
Subject: Re: [PATCH 30/40] workqueue: implement work_busy()

Hello, Andy.

On 01/18/2010 11:52 AM, Andy Walls wrote:
>>>From a driver writer's perspective, this function not useful since it is
> unreliable (false positives only?) and I have no way of
> 
> "ensuring the workqueue @work was last queued on stays valid until this
> function returns."
> 
> I don't quite know how to check and enfore a workqueue's continuing
> validity across the function call.  (Maybe you could clarify?)

I don't really think that would be possible without tinkering with
workqueue internal locking.

> 2. Just schedule the work object and check the return value to see if
> the submission suceeded.  If it did, the work was "not pending".  This
> method can't check for "running" of course.

For workqueue, the above combined with proper subsystem locking would
be the best way to do it, I think.

> Is there some specific use case where this function is very useful
> despite being unreliable?  I just think it's asking for abuse by someone
> who would think "mostly reliable" is good enough, when it actually may
> not be.

I mostly just wanted to keep the fscache debug printout which
indicates whether a fscache object has work pending or running.  It's
a debug printout so it doesn't need to be reliable.  If the debug
printout can be removed, this patch can go too.

Thanks.

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