Re: [PATCH v2 v3.18-rc4 1/4] drm: prime: Honour O_RDWR during prime-handle-to-fd

2015-05-27 Thread Daniel Thompson
On 27/05/15 04:15, Damian Hobson-Garcia wrote: Hello, On Wed, Nov 12, 2014 at 6:38 AM, Daniel Thompson wrote: Currently DRM_IOCTL_PRIME_HANDLE_TO_FD rejects all flags except (DRM|O)_CLOEXEC making it hard for the userspace to generate a file descriptor that can be used by mmap(). It is easy

Re: [PATCH v2 v3.18-rc4 1/4] drm: prime: Honour O_RDWR during prime-handle-to-fd

2015-05-26 Thread Damian Hobson-Garcia
Hello, >On Wed, Nov 12, 2014 at 6:38 AM, Daniel Thompson >wrote: >> Currently DRM_IOCTL_PRIME_HANDLE_TO_FD rejects all flags except >> (DRM|O)_CLOEXEC making it hard for the userspace to generate a file >> descriptor that can be used by mmap(). >> >> It is easy to relax the restriction and allow

Re: [PATCH v2 v3.18-rc4 1/4] drm: prime: Honour O_RDWR during prime-handle-to-fd

2014-11-12 Thread Rob Clark
On Wed, Nov 12, 2014 at 6:38 AM, Daniel Thompson wrote: > Currently DRM_IOCTL_PRIME_HANDLE_TO_FD rejects all flags except > (DRM|O)_CLOEXEC making it hard for the userspace to generate a file > descriptor that can be used by mmap(). > > It is easy to relax the restriction and allow read/write perm

[PATCH v2 v3.18-rc4 1/4] drm: prime: Honour O_RDWR during prime-handle-to-fd

2014-11-12 Thread Daniel Thompson
Currently DRM_IOCTL_PRIME_HANDLE_TO_FD rejects all flags except (DRM|O)_CLOEXEC making it hard for the userspace to generate a file descriptor that can be used by mmap(). It is easy to relax the restriction and allow read/write permissions. This should be safe because the flags are seldom touched