lremovexattr on x64
remove an extended attribute
sys_lremovexattr(const char *path, const char *name)
| number | 198 (0xc6) |
|---|---|
| abi | common |
| entry point | sys_lremovexattr |
| since | Linux 3.3 or earlier (3.3 is the first release scanned for x64) |
| man page | lremovexattr(2) |
| source | elixir.bootlin.com |
Registers
| register | value |
|---|---|
rax | 198, 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 236
- arm64 15
- arm 236
- riscv64 15
- ia32 236
- x32 1073742022
- loongarch64 15
- ppc64 219
- ppc 219
- s390x 234
- mips64 5190
- mipsn32 6190
- mipso32 4234
- alpha 392
- arc 15
- blackfin 236, removed in 4.17
- cris 236, removed in 4.17
- csky 15
- frv 236, removed in 4.17
- hexagon 15
- ia64 1227, removed in 6.7
- m32r 236, removed in 4.17
- m68k 233
- metag 15, removed in 4.17
- microblaze 236
- mn10300 236, removed in 4.17
- nds32 15, removed in 5.18
- nios2 15
- openrisc 15
- parisc 248
- score 15, removed in 4.17
- sh 236
- sparc 182
- sparc64 182
- tilegx 15, removed in 4.17
- tilepro 15, removed in 4.17
- xtensa 75
Get this as JSON: https://api.syscall.sh/v2/syscalls/x64/lremovexattr