removexattr on x64
remove an extended attribute
sys_removexattr(const char *path, const char *name)
| number | 197 (0xc5) |
|---|---|
| abi | common |
| entry point | sys_removexattr |
| since | Linux 3.3 or earlier (3.3 is the first release scanned for x64) |
| man page | removexattr(2) |
| source | elixir.bootlin.com |
Registers
| register | value |
|---|---|
rax | 197, the syscall number |
rdi | const char *path |
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 235
- arm64 14
- arm 235
- riscv64 14
- ia32 235
- x32 1073742021
- loongarch64 14
- ppc64 218
- ppc 218
- s390x 233
- mips64 5189
- mipsn32 6189
- mipso32 4233
- alpha 391
- arc 14
- blackfin 235, removed in 4.17
- cris 235, removed in 4.17
- csky 14
- frv 235, removed in 4.17
- hexagon 14
- ia64 1226, removed in 6.7
- m32r 235, removed in 4.17
- m68k 232
- metag 14, removed in 4.17
- microblaze 235
- mn10300 235, removed in 4.17
- nds32 14, removed in 5.18
- nios2 14
- openrisc 14
- parisc 247
- score 14, removed in 4.17
- sh 235
- sparc 181
- sparc64 181
- tilegx 14, removed in 4.17
- tilepro 14, removed in 4.17
- xtensa 71
Get this as JSON: https://api.syscall.sh/v2/syscalls/x64/removexattr