Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Userspace

The userspace is the place where user programs run. It is meant to have an interface close to Linux.

A program running in userspace is initialized using the System V ABI specification (see external documentation).

System call

System calls are the main way for programs to communicate with the kernel.

The system call table can be found at the root of the module kernel::syscall.

ABI by architecture

Note: the end bound of errno ranges are exclusive

x86 (32 bits)

Instructionint 0x80
Syscall IDeax
Argumentsebx, ecx, edx, esi, edi, ebp
Return valueeax
Errno range-4095..0

x86_64

Instructionint 0x80, syscall
Syscall IDrax
Argumentsrdi, rsi, rdx, r10, r8, r9
Return valuerax
Errno range-4095..0

Compatibility mode

The kernel supports running 32-bit programs on 64-bit kernels. The ABI is the same as kernels compiled for 32-bit.