ioprio_get on x64
get/set I/O scheduling class and priority
sys_ioprio_get(int which, int who)
| number | 252 (0xfc) |
|---|---|
| abi | common |
| entry point | sys_ioprio_get |
| since | Linux 3.3 or earlier (3.3 is the first release scanned for x64) |
| man page | ioprio_get(2) |
| source | elixir.bootlin.com |
Registers
| register | value |
|---|---|
rax | 252, the syscall number |
rdi | int which |
rsi | int who |
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 290
- arm64 31
- arm 315
- riscv64 31
- ia32 290
- x32 1073742076
- loongarch64 31
- ppc64 274
- ppc 274
- s390x 283
- mips64 5274
- mipsn32 6278
- mipso32 4315
- alpha 443
- arc 31
- blackfin 290, removed in 4.17
- cris 290, removed in 4.17
- csky 31
- frv 290, removed in 4.17
- hexagon 31
- ia64 1275, removed in 6.7
- m32r 290, removed in 4.17
- m68k 283
- metag 31, removed in 4.17
- microblaze 290
- mn10300 291, removed in 4.17
- nds32 31, removed in 5.18
- nios2 31
- openrisc 31
- parisc 268
- score 31, removed in 4.17
- sh 289
- sparc 218
- sparc64 218
- tilegx 31, removed in 4.17
- tilepro 31, removed in 4.17
- xtensa 283
Get this as JSON: https://api.syscall.sh/v2/syscalls/x64/ioprio_get