times on x64
get process times
sys_times(struct tms *tbuf)
| number | 100 (0x64) |
|---|---|
| abi | common |
| entry point | sys_times |
| since | Linux 3.3 or earlier (3.3 is the first release scanned for x64) |
| man page | times(2) |
| source | elixir.bootlin.com |
Registers
| register | value |
|---|---|
rax | 100, the syscall number |
rdi | struct tms *tbuf |
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 43
- arm64 153
- arm 43
- riscv64 153
- ia32 43
- x32 1073741924
- loongarch64 153
- ppc64 43
- ppc 43
- s390x 43
- mips64 5098
- mipsn32 6098
- mipso32 4043
- alpha 323
- arc 153
- blackfin 43, removed in 4.17
- cris 43, removed in 4.17
- csky 153
- frv 43, removed in 4.17
- hexagon 153
- ia64 1059, removed in 6.7
- m32r 43, removed in 4.17
- m68k 43
- metag 153, removed in 4.17
- microblaze 43
- mn10300 43, removed in 4.17
- nds32 153, removed in 5.18
- nios2 153
- openrisc 153
- parisc 43
- score 153, removed in 4.17
- sh 43
- sparc 43
- sparc64 43
- tilegx 153, removed in 4.17
- tilepro 153, removed in 4.17
- xtensa 154
Get this as JSON: https://api.syscall.sh/v2/syscalls/x64/times