file_setattr on x64
sys_file_setattr(int dfd, const char *filename, struct file_attr *attr, size_t usize, unsigned int at_flags)
| number | 469 (0x1d5) |
|---|---|
| abi | common |
| entry point | sys_file_setattr |
| since | Linux 6.17 |
| source | elixir.bootlin.com |
Registers
| register | value |
|---|---|
rax | 469, the syscall number |
rdi | int dfd |
rsi | const char *filename |
rdx | struct file_attr *attr |
r10 | size_t usize |
r8 | unsigned int at_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 469
- arm64 469
- arm 469
- riscv64 469
- ia32 469
- x32 1073742293
- loongarch64 469
- ppc64 469
- ppc 469
- s390x 469
- mips64 5469
- mipsn32 6469
- mipso32 4469
- alpha 579
- arc 469
- csky 469
- hexagon 469
- m68k 469
- microblaze 469
- nios2 469
- openrisc 469
- parisc 469
- sh 469
- sparc 469
- sparc64 469
- xtensa 469
Get this as JSON: https://api.syscall.sh/v2/syscalls/x64/file_setattr