Re: Should linuxkpi linux_file_ioctl support flexible array copy?
yi zishun <[email protected]>
| Newsgroups | gmane.os.freebsd.devel.hackers |
|---|---|
| Message-ID | <CABjVtiaqNVb9syD53k8idBA6Nw9jqB7FFD=gd0VLC7DBJhSnwQ@mail.gmail.com> |
On Sun, Feb 15, 2026 at 03:38:59AM +0000, Bjoern A. Zeeb wrote: > > I was mostly curious to find out if/why this would be LinuxKPI code, or why > we would need the LinuxKPI interface/structures for this? FreeBSD's modern graphics stack (`drm-kmod`) is essentially a port of the Linux DRM subsystem running on top of LinuxKPI. So the interfaces and data structures of dma-buf subsystem in FreeBSD exposed to the GPU drivers are strictly Linux-compatible. So as a dmabuf exporter, udmabuf is inevitably relying some Linuxkpi. However, I try to not relying any other Linuxkpi except the dma-buf interface in internal implementation of udmabuf. I think that keeping the udmabuf ABI untouched is a nice-to-have, which makes modifying userspace programs easier. But since neither the native FreeBSD KPI nor the LinuxKPI currently supports flexible arrays effectively, I decide to modify the ABI. > I am currently assuming that the main benefit would be if using some > virtio-drm driver and wanting to display the guest FB locally on the host > or in a GPU VF/PF setup rather than streaming it away? But there's a > missing piece to the puzzle for me still. > I think your assumption is spot on regarding the benefit! > That said, it all sounds totally exciting :) Thanks for the encouragement! Best regards, Zishun Yi