rt_sigaction on x64
examine and change a signal action
sys_rt_sigaction(int sig, const struct sigaction *act, struct sigaction *oact, size_t sigsetsize)
| number | 13 (0xd) |
|---|---|
| abi | 64 |
| entry point | sys_rt_sigaction |
| since | Linux 3.3 or earlier (3.3 is the first release scanned for x64) |
| man page | rt_sigaction(2) |
| source | elixir.bootlin.com |
Registers
| register | value |
|---|---|
rax | 13, the syscall number |
rdi | int sig |
rsi | const struct sigaction *act |
rdx | struct sigaction *oact |
r10 | size_t sigsetsize |
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 174
- arm64 134
- arm 174
- riscv64 134
- ia32 174
- x32 1073742336
- loongarch64 134
- ppc64 173
- ppc 173
- s390x 174
- mips64 5013
- mipsn32 6013
- mipso32 4194
- alpha 352
- arc 134
- blackfin 174, removed in 4.17
- cris 174, removed in 4.17
- csky 134
- frv 174, removed in 4.17
- hexagon 134
- ia64 1177, removed in 6.7
- m32r 174, removed in 4.17
- m68k 174
- metag 134, removed in 4.17
- microblaze 174
- mn10300 174, removed in 4.17
- nds32 134, removed in 5.18
- nios2 134
- openrisc 134
- parisc 174
- score 134, removed in 4.17
- sh 174
- sparc 102
- sparc64 102
- tilegx 134, removed in 4.17
- tilepro 134, removed in 4.17
- xtensa 226
Get this as JSON: https://api.syscall.sh/v2/syscalls/x64/rt_sigaction