Linux User/Kernel ABI: the realities of how C and C++ programs really talk to the OS
summary
Explains how Linux really moves between user and kernel space: syscalls via int 0x80, sysenter and the vdso/vsyscall page, error mapping as negated errno values, and how signals can cause syscalls to return -ERESTARTSYS or be auto‑restarted via restart blocks. Notes pthreads as clone-based thread groups, futexes as tricky fast paths, and ptrace unwinding syscalls so a stopped tracee is already back in user space. Demonstrates that getpid moved back into a syscall in glibc 2.26 and that KPTI for Meltdown roughly doubles syscall cost.
AI-written summary · about
chapters (15)
- 0:00Start
- 0:28Linux Kernel User Api
- 2:38The Kernel Abi
- 3:36Hello World Program
- 12:20What Do We Mean by a Kernel
- 15:28Clear Interrupts
- 31:54Cache Invalidation
- 44:51Posix Threads
- 46:34Cloned Thread
- 47:32Futex System Call
- 53:35Signals
- 1:07:36Restart Block
- 1:09:30Restart System Call
- 1:17:51The P Trace Api
- 1:25:03Binary Compatibility
related talks
37mThe history of a linux kernel design flaw
39mThe Beginner's Guide to Linux Syscalls
26mDesigning Syscalls for Extensibility
23mUsing unsafe.Pointer to explore Linux system calls
57mModern Linux C++ debugging tools - under the covers
24mAdding C library wrappers for all Linux syscalls
01h 01mHow to start a program
37mBreaking and Fixing the Kernel: Crashes, Debugging & Performance Tun...
