* [PATCH] linux-user/mips/o32: Drop sa_restorer functionality
@ 2025-07-09 20:57 Thomas Weißschuh
2025-07-10 6:42 ` Philippe Mathieu-Daudé
2025-07-10 18:26 ` Richard Henderson
0 siblings, 2 replies; 3+ messages in thread
From: Thomas Weißschuh @ 2025-07-09 20:57 UTC (permalink / raw)
To: qemu-devel, Laurent Vivier, Philippe Mathieu-Daudé,
Jiaxun Yang
Cc: Benjamin Berg, Willy Tarreau, Thomas Weißschuh
The Linux kernel dropped support for sa_restorer on O32 MIPS in the
release 2.5.48 because it was unused. See the comment in
arch/mips/include/uapi/asm/signal.h.
Applications using the kernels UAPI headers will not reserve enough
space for qemu-user to copy the sigaction.sa_restorer field to.
Unrelated data may be overwritten.
Align qemu-user with the kernel by also dropping sa_restorer support.
Signed-off-by: Thomas Weißschuh <thomas@t-8ch.de>
---
linux-user/mips/target_signal.h | 1 -
linux-user/syscall_defs.h | 4 ----
2 files changed, 5 deletions(-)
diff --git a/linux-user/mips/target_signal.h b/linux-user/mips/target_signal.h
index fa542c1f4e2eff4efb79989fb8edb2bf44310b60..4481426b99f084a703ea29a965a9af70f1feca98 100644
--- a/linux-user/mips/target_signal.h
+++ b/linux-user/mips/target_signal.h
@@ -64,7 +64,6 @@ typedef struct target_sigaltstack {
#define TARGET_SA_NODEFER 0x40000000
#define TARGET_SA_RESTART 0x10000000
#define TARGET_SA_RESETHAND 0x80000000
-#define TARGET_SA_RESTORER 0x04000000 /* Only for O32 */
#define TARGET_MINSIGSTKSZ 2048
diff --git a/linux-user/syscall_defs.h b/linux-user/syscall_defs.h
index 5d22759992423ada408e51d4c08f3faee7a7f2d9..df26a2d28f2556dae5466c029ec8f630186a73bd 100644
--- a/linux-user/syscall_defs.h
+++ b/linux-user/syscall_defs.h
@@ -515,10 +515,6 @@ struct target_sigaction {
abi_ulong _sa_handler;
#endif
target_sigset_t sa_mask;
-#ifdef TARGET_ARCH_HAS_SA_RESTORER
- /* ??? This is always present, but ignored unless O32. */
- abi_ulong sa_restorer;
-#endif
};
#else
struct target_old_sigaction {
---
base-commit: df6fe2abf2e990f767ce755d426bc439c7bba336
change-id: 20250709-mips-sa-restorer-42943dfab13b
Best regards,
--
Thomas Weißschuh <thomas@t-8ch.de>
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] linux-user/mips/o32: Drop sa_restorer functionality
2025-07-09 20:57 [PATCH] linux-user/mips/o32: Drop sa_restorer functionality Thomas Weißschuh
@ 2025-07-10 6:42 ` Philippe Mathieu-Daudé
2025-07-10 18:26 ` Richard Henderson
1 sibling, 0 replies; 3+ messages in thread
From: Philippe Mathieu-Daudé @ 2025-07-10 6:42 UTC (permalink / raw)
To: Thomas Weißschuh, qemu-devel, Laurent Vivier, Jiaxun Yang
Cc: Benjamin Berg, Willy Tarreau
On 9/7/25 22:57, Thomas Weißschuh wrote:
> The Linux kernel dropped support for sa_restorer on O32 MIPS in the
> release 2.5.48 because it was unused. See the comment in
> arch/mips/include/uapi/asm/signal.h.
>
> Applications using the kernels UAPI headers will not reserve enough
> space for qemu-user to copy the sigaction.sa_restorer field to.
> Unrelated data may be overwritten.
>
> Align qemu-user with the kernel by also dropping sa_restorer support.
>
> Signed-off-by: Thomas Weißschuh <thomas@t-8ch.de>
> ---
> linux-user/mips/target_signal.h | 1 -
> linux-user/syscall_defs.h | 4 ----
> 2 files changed, 5 deletions(-)
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] linux-user/mips/o32: Drop sa_restorer functionality
2025-07-09 20:57 [PATCH] linux-user/mips/o32: Drop sa_restorer functionality Thomas Weißschuh
2025-07-10 6:42 ` Philippe Mathieu-Daudé
@ 2025-07-10 18:26 ` Richard Henderson
1 sibling, 0 replies; 3+ messages in thread
From: Richard Henderson @ 2025-07-10 18:26 UTC (permalink / raw)
To: qemu-devel
On 7/9/25 14:57, Thomas Weißschuh wrote:
> The Linux kernel dropped support for sa_restorer on O32 MIPS in the
> release 2.5.48 because it was unused. See the comment in
> arch/mips/include/uapi/asm/signal.h.
>
> Applications using the kernels UAPI headers will not reserve enough
> space for qemu-user to copy the sigaction.sa_restorer field to.
> Unrelated data may be overwritten.
>
> Align qemu-user with the kernel by also dropping sa_restorer support.
>
> Signed-off-by: Thomas Weißschuh <thomas@t-8ch.de>
> ---
> linux-user/mips/target_signal.h | 1 -
> linux-user/syscall_defs.h | 4 ----
> 2 files changed, 5 deletions(-)
Queued, thanks.
r~
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2025-07-10 18:55 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-07-09 20:57 [PATCH] linux-user/mips/o32: Drop sa_restorer functionality Thomas Weißschuh
2025-07-10 6:42 ` Philippe Mathieu-Daudé
2025-07-10 18:26 ` Richard Henderson
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).