faccessat2 on x64
check user's permissions for a file
sys_faccessat2(int dfd, const char *filename, int mode, int flags)
| number | 439 (0x1b7) |
|---|---|
| abi | common |
| entry point | sys_faccessat2 |
| since | Linux 5.8 |
| man page | faccessat2(2) |
| source | elixir.bootlin.com |
Registers
| register | value |
|---|---|
rax | 439, the syscall number |
rdi | int dfd |
rsi | const char *filename |
rdx | int mode |
r10 | 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 439
- arm64 439
- arm 439
- riscv64 439
- ia32 439
- x32 1073742263
- loongarch64 439
- ppc64 439
- ppc 439
- s390x 439
- mips64 5439
- mipsn32 6439
- mipso32 4439
- alpha 549
- arc 439
- csky 439
- hexagon 439
- ia64 1463, removed in 6.7
- m68k 439
- microblaze 439
- nds32 439, removed in 5.18
- nios2 439
- openrisc 439
- parisc 439
- sh 439
- sparc 439
- sparc64 439
- xtensa 439
Get this as JSON: https://api.syscall.sh/v2/syscalls/x64/faccessat2