[PATCH 2/2] drm/etnaviv: fix mmap operations for userptr and dma-buf objects

2016-05-02 Thread Lucas Stach
Am Mittwoch, den 27.04.2016, 21:27 +0100 schrieb Russell King - ARM Linux: > On Wed, Apr 27, 2016 at 02:39:21PM +0200, Lucas Stach wrote: > > +static int etnaviv_gem_userptr_mmap_obj(struct etnaviv_gem_object > > *etnaviv_obj, > > + struct vm_area_struct *vma) > > +{ > > + return -EPER

[PATCH 2/2] drm/etnaviv: fix mmap operations for userptr and dma-buf objects

2016-04-27 Thread Russell King - ARM Linux
On Wed, Apr 27, 2016 at 02:39:21PM +0200, Lucas Stach wrote: > +static int etnaviv_gem_userptr_mmap_obj(struct etnaviv_gem_object > *etnaviv_obj, > + struct vm_area_struct *vma) > +{ > + return -EPERM; > +} EPERM The prot argument asks for PROT_EXEC but the mapped area bel

[PATCH 2/2] drm/etnaviv: fix mmap operations for userptr and dma-buf objects

2016-04-27 Thread Lucas Stach
Add an indirect object operations call to allow distinct implementations of the mmap operation based on the type of the object. This ensures that the exporter is called to set up the mmap for imported dma-bufs and disallows mapping of userptr objects through the DRM file, as this might lead to ser