musl/arch/mips
Rich Felker 269d193820 fix wrong sigaction syscall ABI on mips*, or1k, microblaze, riscv64
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.
2023-02-09 12:33:35 -05:00
..
bits fix wrong sigaction syscall ABI on mips*, or1k, microblaze, riscv64 2023-02-09 12:33:35 -05:00
arch.mak switch all existing 32-bit archs to 64-bit time_t 2019-11-02 18:30:56 -04:00
atomic_arch.h add support for mips and mips64 r6 isa 2016-04-03 10:42:37 +00:00
crt_arch.h remove workaround for broken mips assemblers 2016-02-08 21:07:09 +00:00
ksigaction.h fix wrong sigaction syscall ABI on mips*, or1k, microblaze, riscv64 2023-02-09 12:33:35 -05:00
kstat.h remove mips/n32/64 stat struct hacks from syscall machinery 2019-07-18 19:38:37 -04:00
pthread_arch.h fix excessively slow TLS performance on some mips models 2021-08-12 18:07:44 -04:00
reloc.h fix debugger tracking of shared libraries on mips with PIE main program 2023-01-18 10:32:14 -05:00
syscall_arch.h prefer new socket syscalls, fallback to SYS_socketcall only if needed 2020-08-08 20:59:26 -04:00