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] [day] [month] [year] [list]
Date:	Fri, 22 Jul 2011 17:43:34 +0100
From:	Jonathan Cameron <jic23@....ac.uk>
To:	Rusty Russell <rusty@...tcorp.com.au>
CC:	Tejun Heo <tj@...nel.org>, LKML <linux-kernel@...r.kernel.org>,
	Andrew Morton <akpm@...ux-foundation.org>
Subject: Re: RFC: Boiler plate functions for ida / idr allocation?

On 07/22/11 12:13, Rusty Russell wrote:
> On Thu, 21 Jul 2011 10:35:01 +0200, Tejun Heo <tj@...nel.org> wrote:
>> On Thu, Jul 21, 2011 at 10:19:46AM +0200, Tejun Heo wrote:
>>> On Thu, Jul 21, 2011 at 05:07:36PM +0930, Rusty Russell wrote:
>>>> From: Rusty Russell <rusty@...tcorp.com.au>
>>>> Subject: ida: Simplified functions for id allocation.
>>>>
>>>> The current hyper-optimized functions are overkill if you simply want
>>>> to allocate an id for a device.  Create versions which use an internal
>>>> lock.
>>>>
>>>> Thanks to Tejun for feedback.  Feel free to delete the #ifdef TEST
>>>> code.
>>>>
>>>> Signed-off-by: Rusty Russell <rusty@...tcorp.com.au>
>>> ...
>>>>  static struct kmem_cache *idr_layer_cache;
>>>> +static DEFINE_SPINLOCK(simple_ida);
>>>
>>> I think the name is a bit confusing.  Maybe simple_ida_lock is better?
>>> Other than that,
>>
>> Ooh, one more thing, maybe it would be better to use spin_lock_irq()
>> to allow calling free under other irq locks.
> 
> Jonathan, please take original patch and mod it to taste, and produce a
> series on it you can push to Andrew.
> 
> As for irqsave etc, as soon as someone needs that we can add
> it... Jonathan will run into it soon enough.
> 
> Thanks,
> Rusty.
> 
Given the timing, it's clearly 3.2 merge window material anyway. Too late to
push any users this time round even if we hustled it through.

Quite a few 'interesting' users out there now I look into them.  Might take
a little while to get them past the relevant maintainers.

I've just sent out a few of the simpler cases.  I guess Andrew may take the core
patch and the others will route through relevant subsystems.

A few more to do. Some of them need a little more thought.

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