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]
Date:   Tue, 22 Feb 2022 16:59:04 +0100
From:   Christoph Hellwig <hch@....de>
To:     Baoquan He <bhe@...hat.com>
Cc:     Christoph Hellwig <hch@....de>, linux-kernel@...r.kernel.org,
        linux-mm@...ck.org, akpm@...ux-foundation.org, cl@...ux.com,
        42.hyeyoo@...il.com, penberg@...nel.org, rientjes@...gle.com,
        iamjoonsoo.kim@....com, vbabka@...e.cz, David.Laight@...lab.com,
        david@...hat.com, herbert@...dor.apana.org.au, davem@...emloft.net,
        linux-crypto@...r.kernel.org, steffen.klassert@...unet.com,
        netdev@...r.kernel.org, hca@...ux.ibm.com, gor@...ux.ibm.com,
        agordeev@...ux.ibm.com, borntraeger@...ux.ibm.com,
        svens@...ux.ibm.com, linux-s390@...r.kernel.org, michael@...le.cc,
        linux-i2c@...r.kernel.org, wsa@...nel.org
Subject: Re: [PATCH 1/2] dma-mapping: check dma_mask for streaming mapping
 allocs

On Tue, Feb 22, 2022 at 09:41:43PM +0800, Baoquan He wrote:
> For newly added streaming mapping APIs, the internal core function
> __dma_alloc_pages() should check dev->dma_mask, but not
> ev->coherent_dma_mask which is for coherent mapping.

No, this is wrong.  dev->coherent_dma_mask is and should be used here.

>
> 
> Meanwhile, just filter out gfp flags if they are any of
> __GFP_DMA, __GFP_DMA32 and __GFP_HIGHMEM, but not fail it. This change
> makes it  consistent with coherent mapping allocs.

This is wrong as well.  We want to eventually fail dma_alloc_coherent
for these, too.  It just needs more work.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ