musl/arch
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
..
aarch64 bits/syscall.h: add landlock syscalls from linux v5.13 2022-03-08 17:21:14 -05:00
arm re-enable vdso clock_gettime on arm (32-bit) with workaround 2022-09-19 13:21:54 -04:00
generic make generic bits/fcntl.h shareable with 64-bit archs 2020-09-03 17:58:17 -04:00
i386 bits/syscall.h: add landlock syscalls from linux v5.13 2022-03-08 17:21:14 -05:00
m68k bits/syscall.h: add landlock syscalls from linux v5.13 2022-03-08 17:21:14 -05:00
microblaze fix wrong sigaction syscall ABI on mips*, or1k, microblaze, riscv64 2023-02-09 12:33:35 -05:00
mips fix wrong sigaction syscall ABI on mips*, or1k, microblaze, riscv64 2023-02-09 12:33:35 -05:00
mips64 fix wrong sigaction syscall ABI on mips*, or1k, microblaze, riscv64 2023-02-09 12:33:35 -05:00
mipsn32 fix wrong sigaction syscall ABI on mips*, or1k, microblaze, riscv64 2023-02-09 12:33:35 -05:00
or1k fix wrong sigaction syscall ABI on mips*, or1k, microblaze, riscv64 2023-02-09 12:33:35 -05:00
powerpc bits/syscall.h: add landlock syscalls from linux v5.13 2022-03-08 17:21:14 -05:00
powerpc64 bits/syscall.h: add landlock syscalls from linux v5.13 2022-03-08 17:21:14 -05:00
riscv64 fix wrong sigaction syscall ABI on mips*, or1k, microblaze, riscv64 2023-02-09 12:33:35 -05:00
s390x bits/syscall.h: add landlock syscalls from linux v5.13 2022-03-08 17:21:14 -05:00
sh bits/syscall.h: add landlock syscalls from linux v5.13 2022-03-08 17:21:14 -05:00
x32 fix __WORDSIZE on x32 sys/user.h 2022-03-08 17:21:49 -05:00
x86_64 bits/syscall.h: add landlock syscalls from linux v5.13 2022-03-08 17:21:14 -05:00