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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:   Wed, 28 Jun 2023 19:16:21 +0800
From:   Li Chen <me@...ux.beauty>
To:     "Russell King (Oracle)" <linux@...linux.org.uk>
Cc:     "dmaengine" <dmaengine@...r.kernel.org>,
        "linux-arm-kernel" <linux-arm-kernel@...ts.infradead.org>,
        "linux-kernel" <linux-kernel@...r.kernel.org>,
        "Arnd Bergmann" <arnd@...db.de>
Subject: Re: Should dma_map_single take the dma controller or its consumer
 as an argument?

Hi Russell,

 ---- On Wed, 28 Jun 2023 19:02:47 +0800  Russell King (Oracle)  wrote --- 
 > On Wed, Jun 28, 2023 at 06:57:35PM +0800, Li Chen wrote:
 > > Hi all,
 > > 
 > > I recently encountered an issue where the dma_mask was set in the DMA controller's driver, but the consumer peripheral driver didn't set its own dma_mask.
 > 
 > It should always take the device that is *actually* performing the DMA,
 > since that is the device that has restrictions on what addresses can be
 > accessed, etc.
 > 
 > Devices that "consume" the data from a DMA controller don't access
 > memory - they are merely the targets, and they can't on their own access
 > host memory. Therefore, their dma mask _should_ be irrelevant.

Thanks for your quick response. Therefore, I just need to use chan->device->dev in my dma_map_single and there is no need to configure the dma_mask for my consumer peripherals.

Regards,
Li

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ