io_submit on x64
submit asynchronous I/O blocks for processing
sys_io_submit(aio_context_t ctx_id, long nr, struct iocb * *iocbpp)
| number | 209 (0xd1) |
|---|---|
| abi | 64 |
| kconfig | CONFIG_AIO |
| family | aio see the whole family on x64 |
| entry point | sys_io_submit |
| since | Linux 3.3 or earlier (3.3 is the first release scanned for x64) |
| man page | io_submit(2) |
| source | elixir.bootlin.com |
Registers
| register | value |
|---|---|
rax | 209, the syscall number |
rdi | aio_context_t ctx_id |
rsi | long nr |
rdx | struct iocb * *iocbpp |
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 248
- arm64 2
- arm 246
- riscv64 2
- ia32 248
- x32 1073742033, 1073742368
- loongarch64 2
- ppc64 230
- ppc 230
- s390x 246
- mips64 5203
- mipsn32 6203
- mipso32 4244
- alpha 401
- arc 2
- blackfin 248, removed in 4.17
- cris 248, removed in 4.17
- csky 2
- frv 248, removed in 4.17
- hexagon 2
- ia64 1241, removed in 6.7
- m32r 248, removed in 4.17
- m68k 244
- metag 2, removed in 4.17
- microblaze 248
- mn10300 248, removed in 4.17
- nds32 2, removed in 5.18
- nios2 2
- openrisc 2
- parisc 218
- score 2, removed in 4.17
- sh 248
- sparc 270
- sparc64 270
- tilegx 2, removed in 4.17
- tilepro 2, removed in 4.17
- xtensa 241
Get this as JSON: https://api.syscall.sh/v2/syscalls/x64/io_submit