listmount on x64
get a list of mount ID's
sys_listmount(const struct mnt_id_req *req, u64 *mnt_ids, size_t nr_mnt_ids, unsigned int flags)
| number | 458 (0x1ca) |
|---|---|
| abi | common |
| entry point | sys_listmount |
| since | Linux 6.8 |
| man page | listmount(2) |
| source | elixir.bootlin.com |
Registers
| register | value |
|---|---|
rax | 458, the syscall number |
rdi | const struct mnt_id_req *req |
rsi | u64 *mnt_ids |
rdx | size_t nr_mnt_ids |
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 458
- arm64 458
- arm 458
- riscv64 458
- ia32 458
- x32 1073742282
- loongarch64 458
- ppc64 458
- ppc 458
- s390x 458
- mips64 5458
- mipsn32 6458
- mipso32 4458
- alpha 568
- arc 458
- csky 458
- hexagon 458
- m68k 458
- microblaze 458
- nios2 458
- openrisc 458
- parisc 458
- sh 458
- sparc 458
- sparc64 458
- xtensa 458
Get this as JSON: https://api.syscall.sh/v2/syscalls/x64/listmount