Show HN: I've updated my Linux System Call website and API

Hacker News by 4 min read 71x views
Show HN: I've updated my Linux System Call website and API

Share Post

Every Linux syscall array in one place, grouped by architecture: scheme calls for 27 architectures alongside their numbers, arguments and registers, from Linux 3.3 to 7.3.

Architectures

Every architecture's table, alongside the complete former of whenever all syscall appeared and whenever it was dropped, is additionally a plain JSON document at /<arch>/syscalls.json, for example /x64/syscalls.json.

Calling conventions

Number in NR, arguments in ARG0 to ARG5, afterward the instruction. The outcome comes rear in RETURN.

ARCHINSTRUCTIONNRRETURNARG0ARG1ARG2ARG3ARG4ARG5
x64syscallraxrax rdirsirdxr10r8r9
x86int 0x80eaxeax ebxecxedxesiediebp
arm64svc #0x8x0 x0x1x2x3x4x5
armsvc #0r7r0 r0r1r2r3r4r5
riscv64ecalla7a0 a0a1a2a3a4a5
ia32int 0x80eaxeax ebxecxedxesiediebp
x32syscallraxrax rdirsirdxr10r8r9
loongarch64syscall 0a7a0 a0a1a2a3a4a5
ppc64scr0r3 r3r4r5r6r7r8
ppcscr0r3 r3r4r5r6r7r8
s390xsvc 0r1r2 r2r3r4r5r6r7
mips64syscallv0v0 a0a1a2a3a4a5
mipsn32syscallv0v0 a0a1a2a3a4a5
mipso32syscallv0v0 a0a1a2a3sp+16sp+20
alphacallsysv0v0 a0a1a2a3a4a5
arctrap0r8r0 r0r1r2r3r4r5
cskytrap 0r7a0 a0a1a2a3r4r5
hexagontrap0(#1)r6r0 r0r1r2r3r4r5
m68ktrap #0d0d0 d1d2d3d4d5a0
microblazebrki r14,8r12r3 r5r6r7r8r9r10
nios2trapr2r2 r4r5r6r7r8r9
openriscl.sys 1r11r11 r3r4r5r6r7r8
pariscble 0x100(%sr2, %r0)r20r28 r26r25r24r23r22r21
shtrapa #31r3r0 r4r5r6r7r0r1
sparct 0x10g1o0 o0o1o2o3o4o5
sparc64t 0x6dg1o0 o0o1o2o3o4o5
xtensasyscalla2a2 a6a3a4a5a8a9

API

curl https://api.syscall.sh/v2/syscalls/x64/read

Any kernel release, diffs between releases and additional in the API docs.

Syscall tables throughout kernel versions

Entries get added and, rarely, removed between releases. Each architecture leaf has a kernel selector, and its JSON download records whenever all admission archetypal appeared (since) and whenever it was dropped (removed_in).

Removed entries remain visible: choice "all, alongside removed" in the kernel selector and all dropped syscall is marked alongside the publish that dropped it.

Where the data comes from

Everything on this location is peruse from the kernel origin itself. For all architecture, the generator walks the syscall array and the SYSCALL_DEFINE macros of all mainline publish it scans, so these are the numbers the kernel really dispatches on.

It additionally records all architecture's calling convention, the education that enters the kernel, so all syscall array shows exactly anywhere the figure and the arguments go.

A syscall whose since equals the archetypal publish scanned for its architecture was already there rear then, and may be much older.

Descriptions and complete history

The abbreviated descriptions arrive from the Linux man pages project, and the io_uring ones from liburing. Whenever the data changes, the location is rebuilt from the syscall API.

Other Article Hacker News
↑
Close Right Ads
Close Left Ads