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:   Wed, 31 Jan 2018 01:44:47 +0200
From:   alexey <alexey.skidanov@...el.com>
To:     Greg KH <gregkh@...uxfoundation.org>
Cc:     devel@...verdev.osuosl.org, labbott@...hat.com,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCH v2] staging: android: ion: Add implementation of
 dma_buf_vmap and dma_buf_vunmap



On 01/31/2018 12:15 AM, Greg KH wrote:
> On Tue, Jan 30, 2018 at 10:39:13PM +0200, Alexey Skidanov wrote:
>> dma_buf_vmap and dma_buf_vunmap allow drivers to access buffers, created by ion.
> But why would anyone ever want to do that?  What is wrong with the
> existing interfaces that drivers use to access buffers created by ion?
Any driver, sharing the buffers, created by ion, through dma-buf, may 
get back the
sgtable describing the buffer for device DMA  and may call dma_buf_vmap 
to get back
the kernel virtual address of the buffer to get access to it. Currently, 
the second
option is missing. Actually, the buffer already mapped by ion 
implementation.
> What code uses this new interface?
This is not the new interface. this is the missing implementation of the 
last two ops:
struct dma_buf_ops {
   int (* attach) (struct dma_buf *, struct device *, struct 
dma_buf_attachment *);
   void (* detach) (struct dma_buf *, struct dma_buf_attachment *);
   struct sg_table * (* map_dma_buf) (struct dma_buf_attachment *, enum 
dma_data_direction);
   void (* unmap_dma_buf) (struct dma_buf_attachment *,struct sg_table 
*, enum dma_data_direction);
   void (* release) (struct dma_buf *);
   int (* begin_cpu_access) (struct dma_buf *, enum dma_data_direction);
   int (* end_cpu_access) (struct dma_buf *, enum dma_data_direction);
   void *(* map_atomic) (struct dma_buf *, unsigned long);
   void (* unmap_atomic) (struct dma_buf *, unsigned long, void *);
   void *(* map) (struct dma_buf *, unsigned long);
   void (* unmap) (struct dma_buf *, unsigned long, void *);
   int (* mmap) (struct dma_buf *, struct vm_area_struct *vma);
   void *(* vmap) (struct dma_buf *);
   void (* vunmap) (struct dma_buf *, void *vaddr);
};
>
> We need a bit more information please.
>
> thanks,
>
> greg k-h
Thanks,
Alexey

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ