Show HN: I've updated my Linux System Call website and API syscall.sh · 192 poin...
HN Best 30 @best30
Show HN: I've updated my Linux System Call website and API syscall.sh · 192 points · 48 comments · HN thread
TL;DR The author has updated syscall.sh, a reference site listing Linux system call tables per architecture, now with more architectures, a kernel-version selector, syscall descriptions, and a JSON API at api.syscall.sh. The site states its data is generated from kernel source (syscall tables and SYSCALL_DEFINE macros across mainline releases), and the descriptions come from man pages and liburing. The post was a Show HN with 192 points and 48 comments.
- The site lists syscall tables for about two dozen architectures (x64, x86, arm64, riscv64, ppc64, s390x, mips variants, sparc, m68k, xtensa and others) with each architecture's calling convention: entry instruction, syscall number register, return register and argument registers.
- Each architecture has a JSON file (e.g. /x64/syscalls.json) recording when each syscall first appeared (since) and when it was dropped (removed_in), with an option to show removed entries.
- The data is said to be read from kernel source by a generator that walks the syscall table and SYSCALL_DEFINE macros of every scanned mainline release.
- Short descriptions come from the Linux man pages project, and io_uring descriptions from liburing.
- The API is available at api.syscall.sh, for example /v2/syscalls/x64/read, and the frontend is rebuilt weekly from it via cron.
- The author says the site was stale for years because the generation step was manual; it is now automated.
Links in the post
- syscall.sh API: The site's API endpoint serving syscall data as JSON; the page could not be read, so its contents are unknown.
Discussion The thread mixes praise for the resource with corrections and a long digression. Early comments point out a fix: on x86-64 the syscall number is taken from eax, not rax, and the author agreed to add a note. Commenters also debated why syscall numbers differ across architectures (answered as historical per-port assignment and a frozen ABI) and whether Linux's roughly 400-450 syscalls are a meaningful count, since variants like pipe/pipe2 and read/readv or ioctl subcommands blur the boundary. The mood is mostly friendly and appreciative, with some technical nitpicking and a long argument over counting.
- Useful, accurate reference; thanks for the update (many): Many commenters welcome the site as a handy resource for learning assembly or syscall ABIs, and note it is more trustworthy than older pages such as the Chromium syscall table, which one commenter called outdated.
- Syscall count is a misleading metric (some): Several commenters argue that the number of Linux syscalls (around 400 to 450 on x86-64) overstates distinct functionality, because of obsolete variants like pipe/pipe2 and open/openat, and because ioctl hides thousands of subcommands.
- Site should flag deprecated or superseded syscalls (some): Commenters suggest a warning or banner for obsolete syscalls and a section listing similar syscalls on the same architecture, with one suggesting an LLM could help find similarities.
- Kernel reads only eax on x86-64 for syscall numbers (a few): One commenter corrected the x64 convention: the kernel uses eax and ignores the upper 32 bits of rax; the author agreed and said they would document it, noting that behaviour changed across kernel versions.
- Syscall numbering differs per architecture for historical reasons (a few): Commenters explained that the kernel API is the same everywhere but the ABI differs; numbers were assigned independently by each port and are now a frozen ABI, while the C library wraps these details into POSIX.
- Kernel should add length-carrying string syscall variants (a few): One commenter suggested duplicating string-taking syscalls with pointer, capacity and length arguments to help programs in modern languages; this is an aside from the main thread.
Links from the comments
- Kernel mailing list thread cited on how the kernel's handling of the upper 32 bits of rax on x86-64 has changed over time.
- Windows syscall tables shared to compare syscall counts across operating systems.
- Another Windows syscall reference, cited alongside the tables above for comparison.
- Chromium OS table of Linux syscall numbers, mentioned as an older alternative reference.