lsm_get_self_attr on x64
sys_lsm_get_self_attr(unsigned int attr, struct lsm_ctx *ctx, u32 *size, u32 flags)
| number | 459 (0x1cb) |
|---|---|
| abi | common |
| entry point | sys_lsm_get_self_attr |
| since | Linux 6.8 |
| source | elixir.bootlin.com |
Registers
| register | value |
|---|---|
rax | 459, the syscall number |
rdi | unsigned int attr |
rsi | struct lsm_ctx *ctx |
rdx | u32 *size |
r10 | u32 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 459
- arm64 459
- arm 459
- riscv64 459
- ia32 459
- x32 1073742283
- loongarch64 459
- ppc64 459
- ppc 459
- s390x 459
- mips64 5459
- mipsn32 6459
- mipso32 4459
- alpha 569
- arc 459
- csky 459
- hexagon 459
- m68k 459
- microblaze 459
- nios2 459
- openrisc 459
- parisc 459
- sh 459
- sparc 459
- sparc64 459
- xtensa 459
Get this as JSON: https://api.syscall.sh/v2/syscalls/x64/lsm_get_self_attr