> > > I thought of SCM_RIGHTS on AF_VSOCK, which would return BADF if a FD is > > > passed that cannot be shared in the requested direction. Are there any > > > better options? > > > > When limiting this SCM_RIGHTS support to dma-bufs, guest -> host, that > > could actually work. > > Would you go with SCM_RIGHTS as defined for AF_UNIX, or with a different, > more specific name? Hmm, good question. Maybe a separate name is less confusing. > > The nice thing about dma-bufs is that the size is > > fixed and the pages are pinned. > > Those pages are permanently pinned? Would have expected to be only pinned > while scanning out, and such. Hmm, not fully sure, maybe only when someone holds a reference. Didn't look at them too deeply from the kernel side. cheers, Gerd