musl/arch/microblaze
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 refactor internal atomic.h 2016-01-21 19:08:54 +00:00
crt_arch.h add .text section directive to all crt_arch.h files missing it 2015-05-22 01:50:05 -04:00
kstat.h decouple struct stat from kernel type 2019-07-18 19:38:12 -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 remove use of endian.h from arch reloc.h headers, clean up 2019-10-17 16:06:12 -04:00
syscall_arch.h prefer new socket syscalls, fallback to SYS_socketcall only if needed 2020-08-08 20:59:26 -04:00