X_ShmAttachFd with a character device fails
For Qubes OS, I am trying to pass Xen grant references to the X server via X_ShmAttachFd. To do this, I passed the X server a file descriptor pointing to /dev/xen/gntdev
. However, I always got a BadMatch
error back. The problem turned out to be https://gitlab.freedesktop.org/xorg/xserver/-/blob/master/Xext/shm.c#L1153-1184: /dev/xen/gntdev
has size 0, which results in this error.