fremovexattr on x64
remove an extended attribute
sys_fremovexattr(int fd, const char *name)
| number | 199 (0xc7) |
|---|---|
| abi | common |
| entry point | sys_fremovexattr |
| since | Linux 3.3 or earlier (3.3 is the first release scanned for x64) |
| man page | fremovexattr(2) |
| source | elixir.bootlin.com |
Registers
| register | value |
|---|---|
rax | 199, the syscall number |
rdi | int fd |
rsi | const char *name |
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 237
- arm64 16
- arm 237
- riscv64 16
- ia32 237
- x32 1073742023
- loongarch64 16
- ppc64 220
- ppc 220
- s390x 235
- mips64 5191
- mipsn32 6191
- mipso32 4235
- alpha 393
- arc 16
- blackfin 237, removed in 4.17
- cris 237, removed in 4.17
- csky 16
- frv 237, removed in 4.17
- hexagon 16
- ia64 1228, removed in 6.7
- m32r 237, removed in 4.17
- m68k 234
- metag 16, removed in 4.17
- microblaze 237
- mn10300 237, removed in 4.17
- nds32 16, removed in 5.18
- nios2 16
- openrisc 16
- parisc 249
- score 16, removed in 4.17
- sh 237
- sparc 186
- sparc64 186
- tilegx 16, removed in 4.17
- tilepro 16, removed in 4.17
- xtensa 79
Get this as JSON: https://api.syscall.sh/v2/syscalls/x64/fremovexattr