uname on x64
get name and information about current kernel
sys_newuname(struct new_utsname *name)
| number | 63 (0x3f) |
|---|---|
| abi | common |
| entry point | sys_newuname |
| since | Linux 3.3 or earlier (3.3 is the first release scanned for x64) |
| man page | uname(2) |
| source | elixir.bootlin.com |
Registers
| register | value |
|---|---|
rax | 63, the syscall number |
rdi | struct new_utsname *name |
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 122
- arm64 160
- arm 122
- riscv64 160
- ia32 122
- x32 1073741887
- loongarch64 160
- ppc64 122
- ppc 122
- s390x 122
- mips64 5061
- mipsn32 6061
- mipso32 4122
- alpha 339
- arc 160
- blackfin 122, removed in 4.17
- cris 122, removed in 4.17
- csky 160
- frv 122, removed in 4.17
- hexagon 160
- ia64 1130, removed in 6.7
- m32r 122, removed in 4.17
- m68k 122
- metag 160, removed in 4.17
- microblaze 122
- mn10300 122, removed in 4.17
- nds32 160, removed in 5.18
- nios2 160
- openrisc 160
- parisc 59
- score 160, removed in 4.17
- sh 122
- sparc 189
- sparc64 189
- tilegx 160, removed in 4.17
- tilepro 160, removed in 4.17
- xtensa 208
Get this as JSON: https://api.syscall.sh/v2/syscalls/x64/uname