inotify_init on x64
initialize an inotify instance
sys_inotify_init(void)
| number | 253 (0xfd) |
|---|---|
| abi | common |
| kconfig | CONFIG_INOTIFY_USER |
| family | inotify see the whole family on x64 |
| entry point | sys_inotify_init |
| since | Linux 3.3 or earlier (3.3 is the first release scanned for x64) |
| man page | inotify_init(2) |
| source | elixir.bootlin.com |
Registers
| register | value |
|---|---|
rax | 253, the syscall number |
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 291
- arm 316
- ia32 291
- x32 1073742077
- ppc64 275
- ppc 275
- s390x 284
- mips64 5243
- mipsn32 6247
- mipso32 4284
- alpha 444
- blackfin 291, removed in 4.17
- cris 291, removed in 4.17
- frv 291, removed in 4.17
- ia64 1277, removed in 6.7
- m32r 291, removed in 4.17
- m68k 284
- microblaze 291
- mn10300 292, removed in 4.17
- parisc 269
- score 1043, removed in 4.17
- sh 290
- sparc 151
- sparc64 151
- xtensa 276
Get this as JSON: https://api.syscall.sh/v2/syscalls/x64/inotify_init