inotify_init1 on x64
initialize an inotify instance
sys_inotify_init1(int flags)
| number | 294 (0x126) |
|---|---|
| abi | common |
| kconfig | CONFIG_INOTIFY_USER |
| family | inotify see the whole family on x64 |
| entry point | sys_inotify_init1 |
| since | Linux 3.3 or earlier (3.3 is the first release scanned for x64) |
| man page | inotify_init1(2) |
| source | elixir.bootlin.com |
Registers
| register | value |
|---|---|
rax | 294, the syscall number |
rdi | int flags |
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 332
- arm64 26
- arm 360
- riscv64 26
- ia32 332
- x32 1073742118
- loongarch64 26
- ppc64 318
- ppc 318
- s390x 324
- mips64 5288
- mipsn32 6292
- mipso32 4329
- alpha 489
- arc 26
- blackfin 365, removed in 4.17
- cris 332, removed in 4.17
- csky 26
- frv 332, removed in 4.17
- hexagon 26
- ia64 1318, removed in 6.7
- m68k 328
- metag 26, removed in 4.17
- microblaze 344
- mn10300 333, removed in 4.17
- nds32 26, removed in 5.18
- nios2 26
- openrisc 26
- parisc 314
- score 26, removed in 4.17
- sh 332
- sparc 322
- sparc64 322
- tilegx 26, removed in 4.17
- tilepro 26, removed in 4.17
- xtensa 279
Get this as JSON: https://api.syscall.sh/v2/syscalls/x64/inotify_init1