Hi Andreas,

On 2025-02-10 13:59:34+0100, Andreas Schwab wrote:
> 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 <tho...@t-8ch.de>
> Signed-off-by: Andreas Schwab <sch...@suse.de>

Thanks for fixing this properly.

Reviewed-by: Thomas Weißschuh <tho...@t-8ch.de>

> ---
>  linux-user/aarch64/target_signal.h    | 2 ++
>  linux-user/arm/target_signal.h        | 2 ++
>  linux-user/generic/signal.h           | 1 -
>  linux-user/i386/target_signal.h       | 2 ++
>  linux-user/m68k/target_signal.h       | 1 +
>  linux-user/microblaze/target_signal.h | 2 ++
>  linux-user/ppc/target_signal.h        | 2 ++
>  linux-user/s390x/target_signal.h      | 2 ++
>  linux-user/sh4/target_signal.h        | 2 ++
>  linux-user/x86_64/target_signal.h     | 2 ++
>  linux-user/xtensa/target_signal.h     | 2 ++
>  11 files changed, 19 insertions(+), 1 deletion(-)

...

Reply via email to