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]
Message-ID: <181efc24bdd.108279419521615.7697137316951540027@linux.beauty>
Date:   Tue, 12 Jul 2022 08:14:56 +0800
From:   Li Chen <me@...ux.beauty>
To:     "Christoph Hellwig" <hch@...radead.org>
Cc:     "Catalin Marinas" <catalin.marinas@....com>,
        "Will Deacon" <will@...nel.org>,
        "Rob Herring" <robh+dt@...nel.org>,
        "Frank Rowand" <frowand.list@...il.com>,
        "Andrew Morton" <akpm@...ux-foundation.org>,
        "linux-arm-kernel" <linux-arm-kernel@...ts.infradead.org>,
        "linux-kernel" <linux-kernel@...r.kernel.org>,
        "devicetree" <devicetree@...r.kernel.org>,
        "linux-mm" <linux-mm@...ck.org>
Subject: Re: [PATCH 0/4] add struct page and Direct I/O support to reserved
 memory

Hi Christoph,
 ---- On Tue, 12 Jul 2022 00:09:55 +0800  Christoph Hellwig <hch@...radead.org> wrote --- 
 > On Tue, Jul 12, 2022 at 12:05:06AM +0800, Li Chen wrote:
 > > My use case has been stated in the cover letter, but our driver is not ready for upstream yet.
 > 
 > Which means we can't review the use case.  I'd suggest you come back
 > when you submit your driver.

Totally agree, but we plan to start rewriting the code of our video driver in a long time, it has many legacy codes and I need to rewrite a lot of codes to migrate to v4l2.
That's why I also submit a sample driver here: to make the review progress easier and don't need reviewers to read video driver codes.

 > 
 > > With DMA allocator, we can access buffer in kernel space, not userspace, however, this patch
 > 
 > Take a look at dma_mmap_* on how to map DMA coherent allocations to
 > usersapce.  This is of course easily possible.
 > 

Yes, I know them. They take use of remap_pfn_range, which set VM_IO and VM_PFNMAP on vma, so dio is not possible with them.
IIUC, if you want to expose the kernel's reserved memory to userspace, it doesn't matter whether the memory came from dma allocator or something else.
The point is if they want to get better throughput, they can consider replacing their dma_mmap_* with my reserved_mem_memremap_pages + reserved_mem_dio_mmap.

Regards,
Li

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ