llistxattr on x64
list extended attribute names
sys_llistxattr(const char *path, char *list, size_t size)
| number | 195 (0xc3) |
|---|---|
| abi | common |
| entry point | sys_llistxattr |
| since | Linux 3.3 or earlier (3.3 is the first release scanned for x64) |
| man page | llistxattr(2) |
| source | elixir.bootlin.com |
Registers
| register | value |
|---|---|
rax | 195, the syscall number |
rdi | const char *path |
rsi | char *list |
rdx | size_t size |
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 233
- arm64 12
- arm 233
- riscv64 12
- ia32 233
- x32 1073742019
- loongarch64 12
- ppc64 216
- ppc 216
- s390x 231
- mips64 5187
- mipsn32 6187
- mipso32 4231
- alpha 389
- arc 12
- blackfin 233, removed in 4.17
- cris 233, removed in 4.17
- csky 12
- frv 233, removed in 4.17
- hexagon 12
- ia64 1224, removed in 6.7
- m32r 233, removed in 4.17
- m68k 230
- metag 12, removed in 4.17
- microblaze 233
- mn10300 233, removed in 4.17
- nds32 12, removed in 5.18
- nios2 12
- openrisc 12
- parisc 245
- score 12, removed in 4.17
- sh 233
- sparc 179
- sparc64 179
- tilegx 12, removed in 4.17
- tilepro 12, removed in 4.17
- xtensa 74
Get this as JSON: https://api.syscall.sh/v2/syscalls/x64/llistxattr