From: "Thomas Weißschuh" <thomas@t-8ch.de>
To: qemu-devel@nongnu.org, Laurent Vivier <laurent@vivier.eu>
Cc: "Thomas Weißschuh" <thomas@t-8ch.de>
Subject: [PATCH] linux-user/riscv: Disable unsupported SA_RESTORER
Date: Sun, 02 Feb 2025 23:57:58 +0100 [thread overview]
Message-ID: <20250202-riscv-sa-restorer-v1-1-6f4bf814a1dd@t-8ch.de> (raw)
Linux on riscv does not support SA_RESTORER.
Currently QEMU thinks there is a field 'sa_restorer' in the middle of
'struct sigaction' which does not actually exist.
This leads to corrupted data and out-of-bounds accesses.
Signed-off-by: Thomas Weißschuh <thomas@t-8ch.de>
---
linux-user/riscv/target_signal.h | 1 +
1 file changed, 1 insertion(+)
diff --git a/linux-user/riscv/target_signal.h b/linux-user/riscv/target_signal.h
index 6c0470f0bc82c6330ce50cb662f2039cf1fab288..258945770b674c0b6b66a94659d9c93fbabffdfb 100644
--- a/linux-user/riscv/target_signal.h
+++ b/linux-user/riscv/target_signal.h
@@ -4,5 +4,6 @@
#include "../generic/signal.h"
#define TARGET_ARCH_HAS_SIGTRAMP_PAGE 1
+#undef TARGET_SA_RESTORER
#endif /* RISCV_TARGET_SIGNAL_H */
---
base-commit: 6fccaa2fba391815308a746d68f7fa197bc93586
change-id: 20250202-riscv-sa-restorer-edd3dfa7790f
Best regards,
--
Thomas Weißschuh <thomas@t-8ch.de>
next reply other threads:[~2025-02-02 22:59 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-02-02 22:57 Thomas Weißschuh [this message]
2025-02-24 3:41 ` [PATCH] linux-user/riscv: Disable unsupported SA_RESTORER Alistair Francis
2025-02-24 4:10 ` Alistair Francis
2025-02-25 6:41 ` Thomas Weißschuh
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20250202-riscv-sa-restorer-v1-1-6f4bf814a1dd@t-8ch.de \
--to=thomas@t-8ch.de \
--cc=laurent@vivier.eu \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).