rt_sigprocmask on x64
examine and change blocked signals
sys_rt_sigprocmask(int how, sigset_t *nset, sigset_t *oset, size_t sigsetsize)
| number | 14 (0xe) |
|---|---|
| abi | common |
| entry point | sys_rt_sigprocmask |
| since | Linux 3.3 or earlier (3.3 is the first release scanned for x64) |
| man page | rt_sigprocmask(2) |
| source | elixir.bootlin.com |
Registers
| register | value |
|---|---|
rax | 14, the syscall number |
rdi | int how |
rsi | sigset_t *nset |
rdx | sigset_t *oset |
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 175
- arm64 135
- arm 175
- riscv64 135
- ia32 175
- x32 1073741838
- loongarch64 135
- ppc64 174
- ppc 174
- s390x 175
- mips64 5014
- mipsn32 6014
- mipso32 4195
- alpha 353
- arc 135
- blackfin 175, removed in 4.17
- cris 175, removed in 4.17
- csky 135
- frv 175, removed in 4.17
- hexagon 135
- ia64 1179, removed in 6.7
- m32r 175, removed in 4.17
- m68k 175
- metag 135, removed in 4.17
- microblaze 175
- mn10300 175, removed in 4.17
- nds32 135, removed in 5.18
- nios2 135
- openrisc 135
- parisc 175
- score 135, removed in 4.17
- sh 175
- sparc 103
- sparc64 103
- tilegx 135, removed in 4.17
- tilepro 135, removed in 4.17
- xtensa 227
Get this as JSON: https://api.syscall.sh/v2/syscalls/x64/rt_sigprocmask