map_shadow_stack on x64
sys_map_shadow_stack(unsigned long addr, unsigned long size, unsigned int flags)
| number | 453 (0x1c5) |
|---|---|
| abi | common |
| entry point | sys_map_shadow_stack |
| since | Linux 6.6 |
| source | elixir.bootlin.com |
Registers
| register | value |
|---|---|
rax | 453, the syscall number |
rdi | unsigned long addr |
rsi | unsigned long size |
rdx | unsigned int 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 453
- arm64 453
- arm 453
- riscv64 453
- ia32 453
- x32 1073742277
- loongarch64 453
- s390x 453
- mips64 5453
- mipsn32 6453
- mipso32 4453
- alpha 563
- arc 453
- csky 453
- hexagon 453
- m68k 453
- microblaze 453
- nios2 453
- openrisc 453
- parisc 453
- sh 453
- sparc 453
- sparc64 453
- xtensa 453
Get this as JSON: https://api.syscall.sh/v2/syscalls/x64/map_shadow_stack