statmount on x64
get a mount status
sys_statmount(const struct mnt_id_req *req, struct statmount *buf, size_t bufsize, unsigned int flags)
| number | 457 (0x1c9) |
|---|---|
| abi | common |
| entry point | sys_statmount |
| since | Linux 6.8 |
| man page | statmount(2) |
| source | elixir.bootlin.com |
Registers
| register | value |
|---|---|
rax | 457, the syscall number |
rdi | const struct mnt_id_req *req |
rsi | struct statmount *buf |
rdx | size_t bufsize |
r10 | unsigned 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 457
- arm64 457
- arm 457
- riscv64 457
- ia32 457
- x32 1073742281
- loongarch64 457
- ppc64 457
- ppc 457
- s390x 457
- mips64 5457
- mipsn32 6457
- mipso32 4457
- alpha 567
- arc 457
- csky 457
- hexagon 457
- m68k 457
- microblaze 457
- nios2 457
- openrisc 457
- parisc 457
- sh 457
- sparc 457
- sparc64 457
- xtensa 457
Get this as JSON: https://api.syscall.sh/v2/syscalls/x64/statmount