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:	Mon, 13 Jun 2016 19:41:40 +0200
From:	"Luis R. Rodriguez" <mcgrof@...nel.org>
To:	Christoph Hellwig <hch@...radead.org>
Cc:	"Luis R. Rodriguez" <mcgrof@...nel.org>,
	Krzysztof Kozlowski <k.kozlowski@...sung.com>,
	Andrew Morton <akpm@...ux-foundation.org>,
	Bartlomiej Zolnierkiewicz <b.zolnierkie@...sung.com>,
	Jonathan Corbet <corbet@....net>,
	Russell King <rmk+kernel@....linux.org.uk>,
	Robin Murphy <robin.murphy@....com>,
	Marek Szyprowski <m.szyprowski@...sung.com>,
	Doug Anderson <armlinux@...isordat.com>,
	Will Deacon <will.deacon@....com>,
	Joerg Roedel <jroedel@...e.de>,
	Christian Borntraeger <borntraeger@...ibm.com>,
	Zhen Lei <thunder.leizhen@...wei.com>,
	"Michael S. Tsirkin" <mst@...hat.com>,
	Andy Lutomirski <luto@...nel.org>, linux-doc@...r.kernel.org,
	linux-kernel@...r.kernel.org
Subject: Re: [PATCH v4 01/44] dma-mapping: Use unsigned long for dma_attrs

On Mon, Jun 13, 2016 at 09:00:41AM -0700, Christoph Hellwig wrote:
> On Fri, Jun 10, 2016 at 04:49:47PM +0200, Luis R. Rodriguez wrote:
> > Do we not expect the number of argument to grow ? This "cleanup" would
> > do away with such possibilities, and then require adding the API later,
> > and this requiring a full set of collateral evolutions again when this
> > is needed. What was the original motivation for using this instead of
> > the approach you are suggesting ?
> 
> We still got plenty of space for attrs.  If you're worried about running
> out of 32 flags we could do a dma_attrs_t typedef that we could swich
> to a u64.  That would have another advantage in that we could add a
> __bitwise sparse annotation to avoid people passing the wrong kind of
> flags.

History shows only sparse use of extensions of these these attributes so I
think the approach with a typedef is definitely more suitable for this API, and
should last long enough. The added gain of the annotation is a nice bonus.

  Luis

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ