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: <20180502124151.GA22857@lst.de>
Date:   Wed, 2 May 2018 14:41:51 +0200
From:   Christoph Hellwig <hch@....de>
To:     Daniel Vetter <daniel@...ll.ch>
Cc:     Christian König <christian.koenig@....com>,
        Chris Wilson <chris@...is-wilson.co.uk>,
        Michel Dänzer <michel@...nzer.net>,
        Konrad Rzeszutek Wilk <konrad.wilk@...cle.com>,
        Christoph Hellwig <hch@....de>,
        iommu@...ts.linux-foundation.org,
        Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
        dri-devel <dri-devel@...ts.freedesktop.org>
Subject: Re: [PATCH] swiotlb: Fix inversed DMA_ATTR_NO_WARN test

On Wed, May 02, 2018 at 02:18:56PM +0200, Daniel Vetter wrote:
> Other dma-api backends like cma just shut up when __GFP_NOWARN is
> passed. And afaiui Christoph Hellwig has plans to nuke the DMA_ATTR
> stuff (or at least clean it up) - should we just remove
> DMA_ATTR_NO_WARN and instead only look at __GFP_NOWARN?

No.  __GFP_NOWARN (and gfp_t flags in general) are the wrong interface
for dma allocations and just cause problems.  I actually plan to
get rid of the gfp_t argument in dma_alloc_attrs sooner, and only
allow either GFP_KERNEL or GFP_DMA passed in dma_alloc_coherent.

> Or maybe we should at least enforce that both or none are set, for
> consistency for now?

The interface should be DMA_ATTR_NO_WARN.  __GFP_NOWARN in this
context was never documented, and just slipped in.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ