set_robust_list on x64
get/set list of robust futexes
sys_set_robust_list(struct robust_list_head *head, size_t len)
| number | 273 (0x111) |
|---|---|
| abi | 64 |
| entry point | sys_set_robust_list |
| since | Linux 3.3 or earlier (3.3 is the first release scanned for x64) |
| man page | set_robust_list(2) |
| source | elixir.bootlin.com |
Registers
| register | value |
|---|---|
rax | 273, the syscall number |
rdi | struct robust_list_head *head |
rsi | size_t len |
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 311
- arm64 99
- arm 338
- riscv64 99
- ia32 311
- x32 1073742354
- loongarch64 99
- ppc64 300
- ppc 300
- s390x 304
- mips64 5268
- mipsn32 6272
- mipso32 4309
- alpha 466
- arc 99
- blackfin 354, removed in 4.17
- cris 311, removed in 4.17
- csky 99
- frv 311, removed in 4.17
- hexagon 99
- ia64 1298, removed in 6.7
- m32r 311, removed in 4.17
- m68k 304
- metag 99, removed in 4.17
- microblaze 311
- mn10300 312, removed in 4.17
- nds32 99, removed in 5.18
- nios2 99
- openrisc 99
- parisc 289
- score 99, removed in 4.17
- sh 311
- sparc 300
- sparc64 300
- tilegx 99, removed in 4.17
- tilepro 99, removed in 4.17
- xtensa 284
Get this as JSON: https://api.syscall.sh/v2/syscalls/x64/set_robust_list