qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] linux-user: Adjust child_tidptr on set_tid_address() syscall
@ 2022-05-27 15:46 Helge Deller
  2022-05-27 20:44 ` [PATCH v2] " Helge Deller
  0 siblings, 1 reply; 3+ messages in thread
From: Helge Deller @ 2022-05-27 15:46 UTC (permalink / raw)
  To: Laurent Vivier, qemu-devel; +Cc: dave.anglin

Keep track of the new child tidptr given by a set_tid_address() syscall.

Signed-off-by: Helge Deller <deller@gmx.de>

diff --git a/linux-user/syscall.c b/linux-user/syscall.c
index f65045efe6..fdf5c1c03e 100644
--- a/linux-user/syscall.c
+++ b/linux-user/syscall.c
@@ -12202,7 +12202,11 @@ static abi_long do_syscall1(void *cpu_env, int num, abi_long arg1,

 #if defined(TARGET_NR_set_tid_address) && defined(__NR_set_tid_address)
     case TARGET_NR_set_tid_address:
-        return get_errno(set_tid_address((int *)g2h(cpu, arg1)));
+    {
+        TaskState *ts = cpu->opaque;
+        ts->child_tidptr = arg1;
+        return get_errno(set_tid_address((int *)g2h(cpu, ts->child_tidptr)));
+    }
 #endif

     case TARGET_NR_tkill:


^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2022-05-27 22:37 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-05-27 15:46 [PATCH] linux-user: Adjust child_tidptr on set_tid_address() syscall Helge Deller
2022-05-27 20:44 ` [PATCH v2] " Helge Deller
2022-05-27 22:32   ` 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).