Re: [PATCH libdrm] xf86drm: Add drmIsMaster()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Jan 22, 2019 at 3:26 AM Christopher James Halse Rogers
<raof@xxxxxxxxxx> wrote:
>
> On 18 December 2018 7:07:01 pm NZDT, Christopher James Halse Rogers <chris@xxxxxxxxxxxxxx> wrote:
>>
>> On 18 December 2018 4:35:37 am AEDT, Emil Velikov <emil.l.velikov@xxxxxxxxx> wrote:
>>>
>>> Hi Christopher,
>>>
>>> On Tue, 20 Nov 2018 at 03:37, Christopher James Halse Rogers
>>> <christopher.halse.rogers@xxxxxxxxxxxxx> 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.
>>
>>
>> Certainly!
>>
>> The particular use-case I was hitting was testing my display server in a container, where container-root is not real-root but the implicit-master FD you get by opening the DRM node when there is no current master would be sufficient.
>>
>> Just assuming the FD we get is master and failing later breaks the platform probing; for example, when run under X11 if we don't check master we'll load the KMS platform and then fail, rather than noticing that KMS won't work and using our X11 backend.
>>
>> >
>>>>
>>>>  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?
>>
>>
>> I think if I was going to do kernel-side changes if probably just make it so that IOCTL_SET_MASTER just unconditionally succeeded on an fd that was already master?

Use-case seems all reasonable, I was waiting for a respin with my suggestion ...
-Daniel

>> ________________________________
>> dri-devel mailing list
>> dri-devel@xxxxxxxxxxxxxxxxxxxxx
>> https://lists.freedesktop.org/mailman/listinfo/dri-devel
>
>
> Ping!
>
> Is there anything more you'd like to know about my use-case here? Are there any objections to adding drmIsMaster()?
> _______________________________________________
> dri-devel mailing list
> dri-devel@xxxxxxxxxxxxxxxxxxxxx
> https://lists.freedesktop.org/mailman/listinfo/dri-devel



-- 
Daniel Vetter
Software Engineer, Intel Corporation
+41 (0) 79 365 57 48 - http://blog.ffwll.ch
_______________________________________________
dri-devel mailing list
dri-devel@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/dri-devel




[Index of Archives]     [Linux DRI Users]     [Linux Intel Graphics]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux