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, 18 Dec 2018 10:51:34 -0800 (PST)
From:   David Miller <davem@...emloft.net>
To:     hch@....de
Cc:     jgg@...pe.ca, swarren@...dotorg.org, tariqt@...lanox.com,
        xavier.huwei@...wei.com, netdev@...r.kernel.org,
        linux-rdma@...r.kernel.org, dledford@...hat.com
Subject: Re: [RFC PATCH] net/mlx4: Get rid of page operation after
 dma_alloc_coherent

From: Christoph Hellwig <hch@....de>
Date: Tue, 18 Dec 2018 19:50:12 +0100

> On Tue, Dec 18, 2018 at 11:43:08AM -0700, Jason Gunthorpe wrote:
>> So the problem here is that on some arches
>> 
>>  sg_set_buf(sg, dma_coherent_buf, size)
>>  p = sg_virt(sg);
>>  assert(p == dma_coherent_buf);
> 
> dma allocations purely return a virtual address, you must never
> call virt_to_page or virt_to_phys on them, which sg_set_buf
> will do.  On many architectures this will give your the wrong
> result as the coherent DMA address is a vmap or ioremap address.

Correct.

And I don't think it makes sense to create fake pages for these
remapped areas to resolve to.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ