rt_sigreturn on x64
return from signal handler and cleanup stack frame
sys_rt_sigreturn(void)
| number | 15 (0xf) |
|---|---|
| abi | 64 |
| entry point | sys_rt_sigreturn |
| since | Linux 3.3 or earlier (3.3 is the first release scanned for x64) |
| man page | rt_sigreturn(2) |
| source | elixir.bootlin.com |
Registers
| register | value |
|---|---|
rax | 15, the syscall number |
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 173
- arm64 139
- arm 173
- riscv64 139
- ia32 173
- x32 1073742337
- loongarch64 139
- ppc64 172
- ppc 172
- s390x 173
- mips64 5211
- mipsn32 6211
- mipso32 4193
- alpha 351
- arc 139
- blackfin 173, removed in 4.17
- cris 173, removed in 4.17
- csky 139
- frv 173, removed in 4.17
- hexagon 139
- ia64 1181, removed in 6.7
- m32r 173, removed in 4.17
- m68k 173
- metag 139, removed in 4.17
- microblaze 173
- mn10300 173, removed in 4.17
- nds32 139, removed in 5.18
- nios2 139
- openrisc 139
- parisc 173
- score 139, removed in 4.17
- sh 173
- sparc 101
- sparc64 101
- tilegx 139, removed in 4.17
- tilepro 139, removed in 4.17
- xtensa 225
Get this as JSON: https://api.syscall.sh/v2/syscalls/x64/rt_sigreturn