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: <20190725143040.GA21894@infradead.org>
Date:   Thu, 25 Jul 2019 07:30:41 -0700
From:   Christoph Hellwig <hch@...radead.org>
To:     "Andrew F. Davis" <afd@...com>
Cc:     Christoph Hellwig <hch@...radead.org>,
        John Stultz <john.stultz@...aro.org>,
        lkml <linux-kernel@...r.kernel.org>,
        Laura Abbott <labbott@...hat.com>,
        Benjamin Gaignard <benjamin.gaignard@...aro.org>,
        Sumit Semwal <sumit.semwal@...aro.org>,
        Liam Mark <lmark@...eaurora.org>,
        Pratik Patel <pratikp@...eaurora.org>,
        Brian Starkey <Brian.Starkey@....com>,
        Vincent Donnefort <Vincent.Donnefort@....com>,
        Sudipto Paul <Sudipto.Paul@....com>,
        Xu YiPing <xuyiping@...ilicon.com>,
        "Chenfeng (puck)" <puck.chen@...ilicon.com>,
        butao <butao@...ilicon.com>,
        "Xiaqing (A)" <saberlily.xia@...ilicon.com>,
        Yudongbin <yudongbin@...ilicon.com>,
        Chenbo Feng <fengc@...gle.com>,
        Alistair Strachan <astrachan@...gle.com>,
        dri-devel <dri-devel@...ts.freedesktop.org>
Subject: Re: [PATCH v6 4/5] dma-buf: heaps: Add CMA heap to dmabuf heaps

On Thu, Jul 25, 2019 at 10:25:50AM -0400, Andrew F. Davis wrote:
> On 7/25/19 10:11 AM, Christoph Hellwig wrote:
> > On Thu, Jul 25, 2019 at 10:10:08AM -0400, Andrew F. Davis wrote:
> >> Pages yes, but not "normal" pages from the kernel managed area.
> >> page_to_pfn() will return bad values on the pages returned by this
> >> allocator and so will any of the kernel sync/map functions. Therefor
> >> those operations cannot be common and need special per-heap handling.
> > 
> > Well, that means this thing is buggy and abuses the scatterlist API
> > and we can't merge it anyway, so it is irrelevant.
> > 
> 
> Since when do scatterlists need to only have kernel virtual backed
> memory pages? Device memory is stored in scatterlists and
> dma_sync_sg_for_* would fail just the same when the cache ops were
> attempted.

I'm not sure what you mean with virtual backed memory pages, as we
don't really have that concept.

But a page in the scatterlist needs to be able to be used everywhere
we'd normally use a page, e.g. page_to_phys, page_to_pfn, kmap,
page_address (if !highmem) as consumers including the dma mapping
interface do all that.

If you want to dma map memory that does not have page backing you
need to use dma_map_resource.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ