Basic Concepts for Code Everything is a system call All the OS kernel offers, code-wise, is system calls A program is a linear sequence of instructions and system calls And a program is nothing more than a data file being run The system call interface is very simple and low-level It relies on some hardware mechanism for privilege escalation All arguments are passed through registers Errors are standardized in a few dozens integer codes Most other items are integers as well: __NR_*, fd, uid, time, ... Complex parameter passing, if any, happens through pointers Mechanism, not policy Any user-visible mapping of those integers is policy The kernel interface includes as little policy as possible All policy choices (and blame) are left to upper levels