ioprio_set on x64
get/set I/O scheduling class and priority
sys_ioprio_set(int which, int who, int ioprio)
| number | 251 (0xfb) |
|---|---|
| abi | common |
| entry point | sys_ioprio_set |
| since | Linux 3.3 or earlier (3.3 is the first release scanned for x64) |
| man page | ioprio_set(2) |
| source | elixir.bootlin.com |
Registers
| register | value |
|---|---|
rax | 251, the syscall number |
rdi | int which |
rsi | int who |
rdx | int ioprio |
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 289
- arm64 30
- arm 314
- riscv64 30
- ia32 289
- x32 1073742075
- loongarch64 30
- ppc64 273
- ppc 273
- s390x 282
- mips64 5273
- mipsn32 6277
- mipso32 4314
- alpha 442
- arc 30
- blackfin 289, removed in 4.17
- cris 289, removed in 4.17
- csky 30
- frv 289, removed in 4.17
- hexagon 30
- ia64 1274, removed in 6.7
- m32r 289, removed in 4.17
- m68k 282
- metag 30, removed in 4.17
- microblaze 289
- mn10300 290, removed in 4.17
- nds32 30, removed in 5.18
- nios2 30
- openrisc 30
- parisc 267
- score 30, removed in 4.17
- sh 288
- sparc 196
- sparc64 196
- tilegx 30, removed in 4.17
- tilepro 30, removed in 4.17
- xtensa 282
Get this as JSON: https://api.syscall.sh/v2/syscalls/x64/ioprio_set