~/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 ↑- Put the syscall number in the NR register.
- Pass the arguments in the listed locations and execute the entry instruction.
- 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.
| Architecture | Instruction | NR | RET | Argument locations | Error 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.
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/linuxNo kernel build is required. The repository includes ready-to-use snapshots, so ordinary browsing works offline.
The syscall tables
Arguments below are C prototype parameters, not a register-by-register assembly recipe. On 32-bit ABIs, 64-bit values may occupy multiple registers and require alignment; assembly wrappers may reorder them. See syscall(2).
| What it does | ARG1 | ARG2 | ARG3 | ARG4 | ARG5 | ARG6 |
|---|
No system calls match this search.
ARG1–ARG6 contain kernel C parameters in order. Register headings apply to 64-bit ABIs. A dash means no argument; “not resolved” means the declaration is unavailable in the parsed headers. “Defined” indicates a table entry, not availability in every kernel configuration.