musl/arch/mips64
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
atomic_arch.h add support for mips and mips64 r6 isa 2016-04-03 10:42:37 +00:00
crt_arch.h add mips64 port 2016-03-06 17:41:56 +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 deduplicate __pthread_self thread pointer adjustment out of each arch 2020-08-27 18:36:45 -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 work around negated error code bug on some mips kernels 2020-03-14 21:23:37 -04:00