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: <87wmee0wzp.fsf@bootlin.com>
Date: Wed, 29 Jan 2025 10:50:50 +0100
From: Miquel Raynal <miquel.raynal@...tlin.com>
To: "Rabara, Niravkumar L" <niravkumar.l.rabara@...el.com>
Cc: Richard Weinberger <richard@....at>,  Vignesh Raghavendra
 <vigneshr@...com>,  "linux@...blig.org" <linux@...blig.org>,  Shen Lichuan
 <shenlichuan@...o.com>,  Jinjie Ruan <ruanjinjie@...wei.com>,
  "u.kleine-koenig@...libre.com" <u.kleine-koenig@...libre.com>,
  "linux-mtd@...ts.infradead.org" <linux-mtd@...ts.infradead.org>,
  "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
  "stable@...r.kernel.org" <stable@...r.kernel.org>
Subject: Re: [PATCH v2 2/3] mtd: rawnand: cadence: use dma_map_resource for
 sdma address

Hello,

>> > Map the slave DMA I/O address using dma_map_resource.
>> > When ARM SMMU is enabled, using a direct physical address of SDMA
>> > results in DMA transaction failure.
>> 
>> It is in general a better practice anyway. Drivers should be portable and
>> always remap resources.

I actually had a look at the kernel sources again regarding the use of
the map_resource() helper, and it is very strangely used. Sometimes the
DMA controller does the remapping, sometimes it is the slave device. The
core and headers are totally unclear about who should take the action.
Anyway, your diff is fine I believe.

> Do you think the commit message below would be better, or 
> stick with the existing one?
>
> Remap the slave DMA I/O resources to enhance driver portability.
> Using a physical address causes DMA translation failure when the
> ARM SMMU is enabled.

Fine by me!

Thanks,
Miquèl

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ