Designing Syscalls for Extensibility
summary
Examines a practical syscall extensibility pattern used by openat2, clone3 and new BPF calls: userland passes a struct plus its size and the kernel uses append-only fields semantics where new fields must have zero mean old behavior. Implementation uses copy_struct_from_user to zero-fill unknown trailing bytes or reject nonzero unknown fields (E2BIG style). Proposes a check_fields flag to let userland probe which fields and flags the running kernel actually supports.
AI-written summary · about
chapters (14)
- 0:00Introduction
- 0:20Why Extensibility
- 2:59Bitflags
- 5:09Fixed Size Structures
- 6:43Extensible Structures
- 8:33Rules
- 10:52Example
- 11:19Improvements
- 12:49Flag support
- 14:05Check fields flag
- 16:05Check fields example
- 16:54Some caveats
- 18:41Questions
- 22:27Ideal world
related talks
01h 26mLinux User/Kernel ABI: the realities of how C and C++ programs really talk to the OS
24mAdding C library wrappers for all Linux syscalls
37mThe history of a linux kernel design flaw
26mReinventing Seccomp for Fun and Profiles
28mUnderstanding programmable system call security with Secomp-eBPF in Linux.
23mUsing unsafe.Pointer to explore Linux system calls
52mWelcome & Opening Remarks & Meaningful Bounds Checking in the Linux Kernel
39mThe Beginner's Guide to Linux Syscalls
