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: <1442341223.2177.8.camel@HansenPartnership.com>
Date:	Tue, 15 Sep 2015 11:20:23 -0700
From:	James Bottomley <James.Bottomley@...senPartnership.com>
To:	Lee Duncan <lduncan@...e.com>
Cc:	linux-scsi@...r.kernel.org, linux-kernel@...r.kernel.org,
	Hannes Reinecke <hare@...e.com>,
	Johannes Thumshirn <jthumshirn@...e.de>,
	Christoph Hellwig <hch@...radead.org>,
	Tejun Heo <htejun@...il.com>
Subject: Re: [PATCH 01/17] Add ida and idr helper routines.

On Tue, 2015-09-15 at 09:46 -0700, Lee Duncan wrote:
> Clients of the ida and idr index-management routines
> tend to use the same calling sequences much of the time,
> so this change adds helper functions for allocating and
> releasing indexes of either flavor, i.e. with or
> without pointer management.
> 
> Inline functions added for idr:
>   idr_get_index_in_range
>   idr_get_index (in range 0,0)
>   idr_put_index
> And for ida:
>   ida_get_index
>   ida_put_index

Every consumer of this I've seen seems to have the pattern of allocating
the ida and the protecting spinlock together.  If that's the case, why
not move the spinlock into struct ida so it doesn't have to be
separately allocated and passed in to all the helpers?

Also, you need a cc of Tejun (added on this one) because he's the one
who last did significant work in ida/idr.

James


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