listns on x64
sys_listns(const struct ns_id_req *req, u64 *ns_ids, size_t nr_ns_ids, unsigned int flags)
| number | 470 (0x1d6) |
|---|---|
| abi | common |
| entry point | sys_listns |
| since | Linux 6.19 |
| source | elixir.bootlin.com |
Registers
| register | value |
|---|---|
rax | 470, the syscall number |
rdi | const struct ns_id_req *req |
rsi | u64 *ns_ids |
rdx | size_t nr_ns_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 470
- arm64 470
- arm 470
- riscv64 470
- ia32 470
- x32 1073742294
- loongarch64 470
- ppc64 470
- ppc 470
- s390x 470
- mips64 5470
- mipsn32 6470
- mipso32 4470
- alpha 580
- arc 470
- csky 470
- hexagon 470
- m68k 470
- microblaze 470
- nios2 470
- openrisc 470
- parisc 470
- sh 470
- sparc 470
- sparc64 470
- xtensa 470
Get this as JSON: https://api.syscall.sh/v2/syscalls/x64/listns