SchOS/kernel/sys
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Nexoniarz b411836478 libinput, seatd and libseat; sockets from accept() can pass descriptors
Alpine's libinput, libseat, seatd, xf86-input-libinput and usbutils join the
image, and seatd runs from schinit. libinput lists the keyboard and pointer as
an ordinary user, Xorg now drives both through libinput, and a program linked
to libseat running as schos opens seat0 through seatd, is handed
/dev/input/event0 and reads its name through the descriptor.

Two kernel bugs stood in the way, and both would have stopped a Wayland
compositor too. The socket connect() queues for a listener was allocated with
its domain at zero, so sendmsg refused SCM_RIGHTS on the accepted end: a server
could receive descriptors and never send one. And sendmsg treated a control
buffer longer than its messages as an error, where Linux takes a following
header too short to be one as the end; seatd passes a zeroed CMSG_SPACE array
with one descriptor at the front.

Found with /proc/strace and a temporary kinfo in sendmsg's EINVAL sites.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01EVRhxi9zpdW2uDUN4FVcao
2026-10-26 16:51:39 +01:00
..
linux_abi.c include: one folder per subsystem, and includes that name it 2026-10-23 15:05:12 +02:00
sys_compat.c Threads 2026-10-25 03:03:50 +01:00
sys_event.c epoll: edge-triggered descriptors lost their edges on more than one CPU 2026-10-25 11:59:12 +01:00
sys_fs.c Users and permissions: accounts, login, enforced file permissions, setuid, su, passwd, doas 2026-10-26 13:16:07 +01:00
sys_mem.c docs: README, plan, guides and the site describe what is built now 2026-10-26 08:08:05 +01:00
sys_net.c libinput, seatd and libseat; sockets from accept() can pass descriptors 2026-10-26 16:51:39 +01:00
sys_poll.c epoll: edge-triggered descriptors lost their edges on more than one CPU 2026-10-25 11:59:12 +01:00
sys_proc.c Users and permissions: accounts, login, enforced file permissions, setuid, su, passwd, doas 2026-10-26 13:16:07 +01:00
sys_sig.c Threads 2026-10-25 03:03:50 +01:00
sys_time.c Job control, function keys, and real sleeps 2026-10-25 02:37:45 +01:00
syscall.c Pseudo-terminals, and what tmux and htop needed around them 2026-10-25 02:11:10 +01:00
table.inc docs: README, plan, guides and the site describe what is built now 2026-10-26 08:08:05 +01:00