[PATCH 1/6] drm: prime: Honour O_RDWR during prime-handle-to-fd
Tiago Vignatti
tiago.vignatti at intel.com
Thu Aug 27 11:19:40 PDT 2015
On 08/27/2015 01:36 PM, Emil Velikov wrote:
> Hi all,
>
> On 27 August 2015 at 00:29, Tiago Vignatti <tiago.vignatti at intel.com> wrote:
>> From: Daniel Thompson <daniel.thompson at linaro.org>
>>
>> Currently DRM_IOCTL_PRIME_HANDLE_TO_FD rejects all flags except
>> (DRM|O)_CLOEXEC making it difficult (maybe impossible) for userspace
>> to mmap() the resulting dma-buf even when this is supported by the
>> DRM driver.
>>
>> It is trivial to relax the restriction and permit read/write access.
>> This is safe because the flags are seldom touched by drm; mostly they
>> are passed verbatim to dma_buf calls.
>>
> Strictly speaking shouldn't this patch be the last one in the series ?
> I.e. we should lift this restriction, after the sync method
> (ioctl/syscall/etc.) is in place. Or perhaps I missed something ?
I think you're right about it, Emil.
Thank you,
Tiago
More information about the dri-devel
mailing list