Re: ioctls that return file descriptors

From: Paul Floyd <paulf2718_at_gmail.com>
Date: Sat, 14 Sep 2024 19:15:43 UTC

On 14-09-24 10:42, Konstantin Belousov wrote:
> On Sat, Sep 14, 2024 at 10:10:14AM +0000, Paul Floyd wrote:
>> Hi
>>
>> Does anyone know of any FreeBSD ioctls that return file descriptors?
>>
>> An example from Linux is DRM_IOCTL_SYNCOBJ_HANDLE_TO_FD.
> 
> I expect that the same ioctl is implemented by the FreeBSD drm kmod.
> 
> For in-tree, you could search for falloc_caps() calls.  Quick grep
> shows it is only used by expected syscalls, not by drivers.
> 

Thanks for that.

There is DRM_IOCTL_PRIME_HANDLE_TO_FD but not 
DRM_IOCTL_SYNCOBJ_HANDLE_TO_FD.

I see also that there's one _umtx_op sub-command that I wasn't handling.

A+
Paul