From: Richard Henderson <richard.henderson@linaro.org>
To: qemu-devel@nongnu.org
Cc: pbonzini@redhat.com
Subject: [PATCH 3/3] linux-user: Implement PR_GET_TID_ADDRESS
Date: Fri, 1 Mar 2024 15:06:27 -1000 [thread overview]
Message-ID: <20240302010627.12998-4-richard.henderson@linaro.org> (raw)
In-Reply-To: <20240302010627.12998-1-richard.henderson@linaro.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
---
linux-user/syscall.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/linux-user/syscall.c b/linux-user/syscall.c
index efa200878f..a50a18b008 100644
--- a/linux-user/syscall.c
+++ b/linux-user/syscall.c
@@ -6468,8 +6468,10 @@ static abi_long do_prctl(CPUArchState *env, abi_long option, abi_long arg2,
}
case PR_GET_TID_ADDRESS:
- /* TODO */
- return -TARGET_EINVAL;
+ {
+ TaskState *ts = env_cpu(env)->opaque;
+ return put_user_ual(ts->child_tidptr, arg2);
+ }
case PR_GET_FPEXC:
case PR_SET_FPEXC:
--
2.34.1
next prev parent reply other threads:[~2024-03-02 4:13 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-03-02 1:06 [PATCH 0/3] linux-user: Implement some prctls Richard Henderson
2024-03-02 1:06 ` [PATCH 1/3] linux-user: Implement PR_{GET,SET}_CHILD_SUBREAPER Richard Henderson
2024-03-04 17:24 ` Peter Maydell
2024-03-02 1:06 ` [PATCH 2/3] linux-user: Implement PR_{GET,SET}_SPECULATION_CTRL Richard Henderson
2024-03-04 17:25 ` Peter Maydell
2024-03-02 1:06 ` Richard Henderson [this message]
2024-03-04 17:27 ` [PATCH 3/3] linux-user: Implement PR_GET_TID_ADDRESS Peter Maydell
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=20240302010627.12998-4-richard.henderson@linaro.org \
--to=richard.henderson@linaro.org \
--cc=pbonzini@redhat.com \
--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).