qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Helge Deller <deller@gmx.de>
To: Laurent Vivier <laurent@vivier.eu>, qemu-devel@nongnu.org
Cc: dave.anglin@bell.net
Subject: [PATCH] linux-user: Adjust child_tidptr on set_tid_address() syscall
Date: Fri, 27 May 2022 17:46:32 +0200	[thread overview]
Message-ID: <YpDyWAr/MYl3mizU@p100> (raw)

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:


             reply	other threads:[~2022-05-27 16:14 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-05-27 15:46 Helge Deller [this message]
2022-05-27 20:44 ` [PATCH v2] linux-user: Adjust child_tidptr on set_tid_address() syscall Helge Deller
2022-05-27 22:32   ` Richard Henderson

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=YpDyWAr/MYl3mizU@p100 \
    --to=deller@gmx.de \
    --cc=dave.anglin@bell.net \
    --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).