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: <82f3cf3c-960b-41bc-82a8-ce84353706ed@app.fastmail.com>
Date: Tue, 19 Aug 2025 20:49:08 +0200
From: "Leon Romanovsky" <leon@...nel.org>
To: "Keith Busch" <kbusch@...nel.org>
Cc: "Marek Szyprowski" <m.szyprowski@...sung.com>,
 "Leon Romanovsky" <leonro@...dia.com>,
 "Jason Gunthorpe" <jgg@...dia.com>,
 "Abdiel Janulgue" <abdiel.janulgue@...il.com>,
 "Alexander Potapenko" <glider@...gle.com>,
 "Alex Gaynor" <alex.gaynor@...il.com>,
 "Andrew Morton" <akpm@...ux-foundation.org>,
 "Christoph Hellwig" <hch@....de>, "Danilo Krummrich" <dakr@...nel.org>,
 iommu@...ts.linux.dev, "Jason Wang" <jasowang@...hat.com>,
 "Jens Axboe" <axboe@...nel.dk>, "Joerg Roedel" <joro@...tes.org>,
 "Jonathan Corbet" <corbet@....net>, "Juergen Gross" <jgross@...e.com>,
 kasan-dev@...glegroups.com, linux-block@...r.kernel.org,
 linux-doc@...r.kernel.org, linux-kernel@...r.kernel.org,
 linux-mm@...ck.org, linux-nvme@...ts.infradead.org,
 linuxppc-dev@...ts.ozlabs.org, linux-trace-kernel@...r.kernel.org,
 "Madhavan Srinivasan" <maddy@...ux.ibm.com>,
 "Masami Hiramatsu" <mhiramat@...nel.org>,
 "Michael Ellerman" <mpe@...erman.id.au>,
 "Michael S. Tsirkin" <mst@...hat.com>, "Miguel Ojeda" <ojeda@...nel.org>,
 "Robin Murphy" <robin.murphy@....com>, rust-for-linux@...r.kernel.org,
 "Sagi Grimberg" <sagi@...mberg.me>,
 "Stefano Stabellini" <sstabellini@...nel.org>,
 "Steven Rostedt" <rostedt@...dmis.org>, virtualization@...ts.linux.dev,
 "Will Deacon" <will@...nel.org>, xen-devel@...ts.xenproject.org
Subject: Re: [PATCH v4 14/16] block-dma: migrate to dma_map_phys instead of map_page



On Tue, Aug 19, 2025, at 20:20, Keith Busch wrote:
> On Tue, Aug 19, 2025 at 08:36:58PM +0300, Leon Romanovsky wrote:
>>  static bool blk_dma_map_direct(struct request *req, struct device *dma_dev,
>>  		struct blk_dma_iter *iter, struct phys_vec *vec)
>>  {
>> -	iter->addr = dma_map_page(dma_dev, phys_to_page(vec->paddr),
>> -			offset_in_page(vec->paddr), vec->len, rq_dma_dir(req));
>> +	iter->addr = dma_map_phys(dma_dev, vec->paddr, vec->len,
>> +			rq_dma_dir(req), 0);
>
> Looks good.
>
> Reviewed-by: Keith Busch <kbusch@...nel.org>
>
> Just a random thought when I had to double back to check what the "0"
> means: many dma_ api's have a default macro without an "attrs" argument,
> then an _attrs() version for when you need it. Not sure if you want to
> strictly follow that pattern, but merely a suggestion.

At some point,  I had both functions with and without attrs, but Christoph said that it is an artefact and I should introduce one function which accepts attrs but without _attrs in the name.

Thanks 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ