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] [day] [month] [year] [list]
Date:   Mon, 1 Jul 2019 23:37:24 +0530
From:   Pankaj Suryawanshi <pankajssuryawanshi@...il.com>
To:     Robin Murphy <robin.murphy@....com>
Cc:     Christoph Hellwig <hch@...radead.org>, linux-mm@...ck.org,
        iommu@...ts.linux-foundation.org, linux-kernel@...r.kernel.org,
        Vlastimil Babka <vbabka@...e.cz>,
        Michal Hocko <mhocko@...nel.org>
Subject: Re: DMA-API attr - DMA_ATTR_NO_KERNEL_MAPPING

On Mon, Jul 1, 2019 at 11:24 PM Robin Murphy <robin.murphy@....com> wrote:
>
> On 01/07/2019 18:47, Pankaj Suryawanshi wrote:
> >> If you want a kernel mapping, *don't* explicitly request not to have a
> >> kernel mapping in the first place. It's that simple.
> >>
> >
> > Do you mean do not use dma-api ? because if i used dma-api it will give you
> > mapped virtual address.
> > or i have to use directly cma_alloc() in my driver. // if i used this
> > approach i need to reserved more vmalloc area.
>
> No, I mean just call dma_alloc_attrs() normally *without* adding the
> DMA_ATTR_NO_KERNEL_MAPPING flag. That flag means "I never ever want to
> make CPU accesses to this buffer from the kernel" - that is clearly not
> the case for your code, so it is utterly nonsensical to still pass the
> flag but try to hack around it later.


Actually my use case is that i want virtual mapping only when i will
play video as my vpu/gpu driver is design like that.
and  i am using 32-bit so virtual memory is splitted as 3G/1G so dont
have enough memory for all the time to mapped with kernel space.

Lets say i am allocating 400MB for driver but i want only 30MB for
virtual mapping (not everytime) that is the case.
>
>
> Robin.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ