musl/arch/mips/bits
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
..
alltypes.h.in move time_t and suseconds_t definitions to common alltypes.h.in 2019-11-02 18:30:56 -04:00
errno.h remove mips-only EINIT and EREMDEV errnos 2015-01-30 21:58:11 -05:00
fcntl.h move O_PATH definition back to arch bits 2015-04-01 19:31:06 -04:00
fenv.h
float.h fix FLT_ROUNDS to reflect the current rounding mode 2015-03-07 12:05:28 -05:00
hwcap.h mips: add hwcap bits from linux v5.4 2019-12-30 18:14:08 -05:00
ioctl.h switch all existing 32-bit archs to 64-bit time_t 2019-11-02 18:30:56 -04:00
ipcstat.h switch all existing 32-bit archs to 64-bit time_t 2019-11-02 18:30:56 -04:00
mman.h add MAP_SYNC and MAP_SHARED_VALIDATE from linux v4.15 2018-02-22 18:48:58 -05:00
msg.h switch all existing 32-bit archs to 64-bit time_t 2019-11-02 18:30:56 -04:00
poll.h fix POLLWRNORM and POLLWRBAND on mips 2015-03-04 12:09:37 -05:00
posix.h
ptrace.h add support for arch-specific ptrace command macros 2018-07-17 22:25:08 -04:00
reg.h
resource.h fix RLIMIT_ constants for mips 2014-04-15 19:17:52 -04:00
sem.h switch all existing 32-bit archs to 64-bit time_t 2019-11-02 18:30:56 -04:00
setjmp.h fix size of mips jmp_buf 2014-03-18 21:52:24 -04:00
shm.h switch all existing 32-bit archs to 64-bit time_t 2019-11-02 18:30:56 -04:00
signal.h fix wrong sigaction syscall ABI on mips*, or1k, microblaze, riscv64 2023-02-09 12:33:35 -05:00
socket.h move time64 socket options from arch bits to top-level sys/socket.h 2019-11-02 18:30:56 -04:00
stat.h switch all existing 32-bit archs to 64-bit time_t 2019-11-02 18:30:56 -04:00
statfs.h
stdint.h
syscall.h.in bits/syscall.h: add landlock syscalls from linux v5.13 2022-03-08 17:21:14 -05:00
termios.h fix conflicting mips and powerpc definitions for TIOCSER_TEMT macro 2019-07-10 17:09:49 -04:00
user.h