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] [thread-next>] [day] [month] [year] [list]
Date:   Thu, 24 Jun 2021 11:52:47 +0200
From:   Christian König <christian.koenig@....com>
To:     Christoph Hellwig <hch@....de>
Cc:     Oded Gabbay <oded.gabbay@...il.com>,
        Jason Gunthorpe <jgg@...pe.ca>,
        Christian König <ckoenig.leichtzumerken@...il.com>,
        Gal Pressman <galpress@...zon.com>, sleybo@...zon.com,
        linux-rdma <linux-rdma@...r.kernel.org>,
        Oded Gabbay <ogabbay@...nel.org>,
        Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
        dri-devel <dri-devel@...ts.freedesktop.org>,
        "moderated list:DMA BUFFER SHARING FRAMEWORK" 
        <linaro-mm-sig@...ts.linaro.org>,
        Doug Ledford <dledford@...hat.com>,
        Tomer Tayar <ttayar@...ana.ai>,
        amd-gfx list <amd-gfx@...ts.freedesktop.org>,
        Greg KH <gregkh@...uxfoundation.org>,
        Alex Deucher <alexander.deucher@....com>,
        Leon Romanovsky <leonro@...dia.com>,
        "open list:DMA BUFFER SHARING FRAMEWORK" 
        <linux-media@...r.kernel.org>
Subject: Re: [Linaro-mm-sig] [PATCH v3 1/2] habanalabs: define uAPI to export
 FD for DMA-BUF

Am 24.06.21 um 10:12 schrieb Christoph Hellwig:
> On Thu, Jun 24, 2021 at 10:07:14AM +0200, Christian König wrote:
>> The key point is that accessing the underlying pages even when DMA-bufs are
>> backed by system memory is illegal. Daniel even created a patch which
>> mangles the page pointers in sg_tables used by DMA-buf to make sure that
>> people don't try to use them.
> Which is another goddamn layering violation of a subsystem that has no
> business at all poking into the scatterlist structure, yes.

Completely agree, but it is also the easiest way to get away from the 
scatterlist as trasnport vehicle for the dma_addresses.

[SNIP]

>> My best plan to get out of this mess is that we change the DMA-buf
>> interface to use an array of dma_addresses instead of the sg_table object
>> and I have already been working on this actively the last few month.
> Awesome!  I have a bit of related work on the DMA mapping subsystems, so
> let's sync up as soon as you have some first sketches.

Don't start cheering to fast.

I've already converted a bunch of the GPU drivers, but there are at 
least 6 GPU still needing to be fixed and on top of that comes VA-API 
and a few others.

What are your plans for the DMA mapping subsystem?

> Btw, one thing I noticed when looking over the dma-buf instances is that
> there is a lot of duplicated code for creating a sg_table from pages,
> and then mapping it.  It would be good if we could move toward common
> helpers instead of duplicating that all over again.

Can you give an example?

Thanks,
Christian.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ