Re: ioctls that return file descriptors

From: Konstantin Belousov <kib_at_freebsd.org>
Date: Sat, 14 Sep 2024 10:42:28 UTC
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.