linux-user: Move TARGET_SA_RESTORER out of generic/signal.h
authorAndreas Schwab <schwab@suse.de>
Mon, 10 Feb 2025 12:59:34 +0000 (13:59 +0100)
committerRichard Henderson <richard.henderson@linaro.org>
Tue, 18 Feb 2025 16:29:03 +0000 (08:29 -0800)
commit513823e7521a09ed7ad1e32e6454bac3b2cbf52d
treee74159bedbfedd2fff8ca72a9142aab9aff217c8
parent4b7b20a3b72c5000ea71bef505c16e6e628268b6
linux-user: Move TARGET_SA_RESTORER out of generic/signal.h

SA_RESTORER and the associated sa_restorer field of struct sigaction are
an obsolete feature, not expected to be used by future architectures.
They are also absent on RISC-V, LoongArch, Hexagon and OpenRISC, but
defined due to their use of generic/signal.h.  This leads to corrupted
data and out-of-bounds accesses.

Move the definition of TARGET_SA_RESTORER out of generic/signal.h into the
target_signal.h files that need it.  Note that m68k has the sa_restorer
field, but does not use it and does not define SA_RESTORER.

Reported-by: Thomas Weißschuh <thomas@t-8ch.de>
Signed-off-by: Andreas Schwab <schwab@suse.de>
Reviewed-by: Thomas Weißschuh <thomas@t-8ch.de>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Message-ID: <mvmed060xc9.fsf@suse.de>
linux-user/aarch64/target_signal.h
linux-user/arm/target_signal.h
linux-user/generic/signal.h
linux-user/i386/target_signal.h
linux-user/m68k/target_signal.h
linux-user/microblaze/target_signal.h
linux-user/ppc/target_signal.h
linux-user/s390x/target_signal.h
linux-user/sh4/target_signal.h
linux-user/x86_64/target_signal.h
linux-user/xtensa/target_signal.h