summaryrefslogtreecommitdiff
path: root/arch/mipsn32/bits/signal.h
AgeCommit message (Collapse)AuthorLines
2023-02-09fix wrong sigaction syscall ABI on mips*, or1k, microblaze, riscv64Rich Felker-1/+0
we wrongly defined a dummy SA_RESTORER flag on these archs, despite the kernel interface not actually having such a feature. on archs which lack SA_RESTORER, the kernel sigaction structure also lacks the restorer function pointer member, which means the signal mask appears at a different offset. the kernel was thereby interpreting the bits of the code address as part of the signal set to be masked while handling the signal. this patch removes the erroneous SA_RESTORER definitions from archs which do not have it, makes access to the member conditional on whether SA_RESTORER is defined for the arch, and removes the now-unused asm for the affected archs. because there are reportedly versions of qemu-user which also use the wrong ABI here, the old ksigaction struct size is preserved with an unused member at the end. this is harmless and mitigates the risk of such a bug turning into a buffer overflow onto the sigaction function's stack.
2020-05-21fix incorrect SIGSTKFLT on all mips archsRich Felker-1/+1
signal 7 is SIGEMT on Linux mips* ABI according to the man pages and kernel. it's not clear where the wrong name came from but it dates back to original mips commit.
2016-04-18add mips n32 port (ILP32 ABI for mips64)Rich Felker-0/+143
based on patch submitted by Jaydeep Patil, with minor changes.