[PATCH libdrm] xf86drm: Add drmIsMaster()

Emil Velikov emil.l.velikov at gmail.com
Mon Dec 17 17:35:37 UTC 2018


Hi Christopher,

On Tue, 20 Nov 2018 at 03:37, Christopher James Halse Rogers
<christopher.halse.rogers at canonical.com> wrote:
>
> We can't use drmSetMaster to query whether or not a drm fd is master
> because it requires CAP_SYS_ADMIN, even if the fd *is* a master fd.
>
Can you please mention the exact use case here? You mentioned it over
IRC although it'll be nice to have it here for posterity.

> Pick DRM_IOCTL_MODE_ATTACHMODE as a long-deprecated ioctl that is
> DRM_MASTER but not DRM_ROOT_ONLY as the probe by which we can detect
> whether or not the fd is master.
>
I'm wondering if we cannot extent DRM_IOCTL_GET_CLIENT or another IOCTL.
What do you think? May I interest you in writing an RFC for the kernel-side?

IMHO checking with the kernel devs for a cleaner solution is a worthy
goal. If they're unhappy we can use this workaround.

Thanks
Emil


More information about the dri-devel mailing list