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:   Mon, 14 Nov 2022 10:04:37 +0100
From:   Takashi Iwai <tiwai@...e.de>
To:     Christoph Hellwig <hch@....de>
Cc:     Dennis Dalessandro <dennis.dalessandro@...nelisnetworks.com>,
        Mauro Carvalho Chehab <mchehab@...nel.org>,
        Alexandra Winter <wintera@...ux.ibm.com>,
        Wenjia Zhang <wenjia@...ux.ibm.com>,
        Marek Szyprowski <m.szyprowski@...sung.com>,
        Jaroslav Kysela <perex@...ex.cz>,
        Takashi Iwai <tiwai@...e.com>,
        Russell King <linux@...linux.org.uk>,
        Robin Murphy <robin.murphy@....com>,
        linux-arm-kernel@...ts.infradead.org, linux-rdma@...r.kernel.org,
        iommu@...ts.linux.dev, linux-media@...r.kernel.org,
        netdev@...r.kernel.org, linux-s390@...r.kernel.org,
        alsa-devel@...a-project.org
Subject: Re: [PATCH 6/7] ALSA: memalloc: don't pass bogus GFP_ flags to dma_alloc_*

On Sun, 13 Nov 2022 17:35:34 +0100,
Christoph Hellwig wrote:
> 
> dma_alloc_coherent/dma_alloc_wc is an opaque allocator that only uses
> the GFP_ flags for allocation context control.  Don't pass __GFP_COMP
> which makes no sense for an allocation that can't in any way be
> converted to a page pointer.

The addition of __GFP_COMP there was really old, it was Hugh's commit
f3d48f0373c1 at 2005:
    [PATCH] unpaged: fix sound Bad page states

It mentions something about sparc32/64.  I hope this isn't relevant
any longer (honestly I have no idea about that).

> Note that for dma_alloc_noncoherent and dma_alloc_noncontigous in
> combination with the DMA mmap helpers __GFP_COMP looks sketchy as well,
> so I would suggest to drop that as well after a careful audit.

Yeah, that's a cargo-cult copy&paste from the old idiom.
Should be killed altogether.


Thanks!

Takashi

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ