open_tree_attr on x64
open path or create detached mount object and attach to fd
sys_open_tree_attr(int dfd, const char *path, unsigned flags, struct mount_attr *uattr, size_t usize)
| number | 467 (0x1d3) |
|---|---|
| abi | common |
| entry point | sys_open_tree_attr |
| since | Linux 6.15 |
| man page | open_tree_attr(2) |
| source | elixir.bootlin.com |
Registers
| register | value |
|---|---|
rax | 467, the syscall number |
rdi | int dfd |
rsi | const char *path |
rdx | unsigned flags |
r10 | struct mount_attr *uattr |
r8 | size_t usize |
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 467
- arm64 467
- arm 467
- riscv64 467
- ia32 467
- x32 1073742291
- loongarch64 467
- ppc64 467
- ppc 467
- s390x 467
- mips64 5467
- mipsn32 6467
- mipso32 4467
- alpha 577
- arc 467
- csky 467
- hexagon 467
- m68k 467
- microblaze 467
- nios2 467
- openrisc 467
- parisc 467
- sh 467
- sparc 467
- sparc64 467
- xtensa 467
Get this as JSON: https://api.syscall.sh/v2/syscalls/x64/open_tree_attr