sysinfo on x64
return system information
sys_sysinfo(struct sysinfo *info)
| number | 99 (0x63) |
|---|---|
| abi | common |
| entry point | sys_sysinfo |
| since | Linux 3.3 or earlier (3.3 is the first release scanned for x64) |
| man page | sysinfo(2) |
| source | elixir.bootlin.com |
Registers
| register | value |
|---|---|
rax | 99, the syscall number |
rdi | struct sysinfo *info |
rax | the return value |
Then run syscall to enter the kernel.
The syscall instruction clobbers rcx (the return address lands in rcx) and r11 (the flags land in r11).
Since Linux 5.14 the kernel reads the syscall number from eax and ignores the upper 32 bits of rax. Older kernels fail with ENOSYS when those bits are not zero, and mov eax, N clears them, so it works on both.
Same syscall on other architectures
- x86 116
- arm64 179
- arm 116
- riscv64 179
- ia32 116
- x32 1073741923
- loongarch64 179
- ppc64 116
- ppc 116
- s390x 116
- mips64 5097
- mipsn32 6097
- mipso32 4116
- alpha 318
- arc 179
- blackfin 116, removed in 4.17
- cris 116, removed in 4.17
- csky 179
- frv 116, removed in 4.17
- hexagon 179
- ia64 1127, removed in 6.7
- m32r 116, removed in 4.17
- m68k 116
- metag 179, removed in 4.17
- microblaze 116
- mn10300 116, removed in 4.17
- nds32 179, removed in 5.18
- nios2 179
- openrisc 179
- parisc 116
- score 179, removed in 4.17
- sh 116
- sparc 214
- sparc64 214
- tilegx 179, removed in 4.17
- tilepro 179, removed in 4.17
- xtensa 209
Get this as JSON: https://api.syscall.sh/v2/syscalls/x64/sysinfo