~/syscall · the GNU/Linux programmer’s bookshelf

Linux System Call Reference

The small interface between your program and the kernel.

System call numbers, C signatures, and calling conventions, collected directly from Linux source.
Choose an architecture, look up a call, and follow it back to the kernel.

x86-64 Table →ARM64 Table →All architectures ↓Calling conventionsHow this reference is made

Architectures

Calling conventions

Architectures ↑
  1. Put the syscall number in the NR register.
  2. Pass the arguments in the listed locations and execute the entry instruction.
  3. Read the return value from the RET register.

These are the raw kernel conventions. The C library provides its own wrappers.

The table is organized by the Linux userspace ABI. CPUs that run the same ABI share syscall numbers: Intel Core and AMD Ryzen running x86-64 Linux both use x64.

Linux calling conventions by ABI
ArchitectureInstructionNRRETArgument locationsError flag

On ARM EABI, some 64-bit arguments require an aligned register pair. MIPS o32 passes argument slots 5 and 6 on the user stack. See the architecture notes in syscall(2) before writing assembly.

A reference for programs, too

Architectures ↑

The same data is published as static JSON files. No account, key, or running API server is needed.

curl '/syscall/data/v7.3/x64.json'
GET /api/v1/index.json
API index, license information, and relative paths to each snapshot.
GET /api/v1/architectures.json
Supported architectures and their calling conventions.
GET /api/v1/versions.json
Available kernel snapshots, newest first.
GET /data/{version}/{arch}.json
A complete table with C declarations, licensing, source locations, and file hashes.
GET /data/{version}/sources.json
Input source files, original licenses, and checksums.

Search and release comparison run in your browser. For a single entry, open its details and choose “Download entry JSON”. Programs can filter the table locally, for example:

curl '/syscall/data/v7.3/x64.json' | jq '.syscalls[] | select(.name == "read")'

Download the manifest and the selected table for bulk use. Query parameters do not filter the static JSON files.

About this little reference

Architectures ↑

The tables are generated from the Linux kernel source. Architecture-specific .tbl files supply numbers and entry points. include/linux/syscalls.h, compat.h, and architecture headers supply C declarations. ABI selection follows the kernel’s Makefile.syscalls. Register conventions are documented in Linux man-pages.

The short explanations are maintained separately from the kernel tables. They describe typical uses; follow the manual and the selected kernel source for flags, limits and ABI differences.

The details panel shows arguments as a table and offers a downloadable C template. Call numbers and declarations come from the selected kernel snapshot; valid pointers, flags and object lifetimes cannot be inferred from prototypes alone. Templates for write and getpid provide hand-written usage examples; other supported 64-bit calls get a TODO skeleton. Unresolved signatures, unimplemented slots and 32-bit ABIs do not get speculative code.

Each release is a separate snapshot. Comparison marks differences between those snapshots; it does not claim the exact release in which a call first appeared. Configuration-dependent calls and assembly-only signatures require consulting the linked source. Related calls can share a manual page; some entries have no manual page.

Source files and checksums

Updating from the kernel source

From this repository, run the importer with Python 3.9 or newer:

python3 scripts/sync_kernel.py --refs v7.3

# Or read an existing Linux checkout, without network access:
python3 scripts/sync_kernel.py --refs v7.3 --kernel-tree /path/to/linux

No kernel build is required. The repository includes ready-to-use snapshots, so ordinary browsing works offline.