diff options
| author | Peter Maydell <peter.maydell@linaro.org> | 2024-03-12 21:33:15 +0000 |
|---|---|---|
| committer | Peter Maydell <peter.maydell@linaro.org> | 2024-03-12 21:33:16 +0000 |
| commit | a1932d7cd6507d4d9db2044a54731fff3e749bac (patch) | |
| tree | e72adcccf83fe80770fdd51e1ff6b0a6d7d671e1 /linux-user/syscall.c | |
| parent | 7e52d0b7c1daa96be317cb2b0f410d024fe46844 (diff) | |
| parent | 4fe19bbbea2cb9f1ec28cfd40cdc7f61e95a790e (diff) | |
| download | focaccia-qemu-a1932d7cd6507d4d9db2044a54731fff3e749bac.tar.gz focaccia-qemu-a1932d7cd6507d4d9db2044a54731fff3e749bac.zip | |
Merge tag 'pull-tcg-20240312' of https://gitlab.com/rth7680/qemu into staging
linux-user: Add FIFREEZE and FITHAW ioctls
linux-user: Implement PR_*_{CHILD_SUBREAPER,SPECULATION_CTRL,TID_ADDRESS}
linux-user/elfload: Fixes for two Coverity CIDs
tcg/aarch64: Fixes for two TCG_COND_TST{EQ,NE} bugs
# -----BEGIN PGP SIGNATURE-----
#
# iQFRBAABCgA7FiEEekgeeIaLTbaoWgXAZN846K9+IV8FAmXwoYwdHHJpY2hhcmQu
# aGVuZGVyc29uQGxpbmFyby5vcmcACgkQZN846K9+IV99KwgAlUxbn0dPTXKmCkIE
# X+FAUllPYCZJwpTCa1h3P8taczLLeAocI4/iJxUudBE77I0HY7jv4FRnWrrdHr/V
# rQXjNkpQUByWr0Y4MB6Gl1+AKYo2SNqVHNP5AI4DdgDeSASXhP1aSlT5h4V4gdeX
# 1OwSnTQfONInJaoOQ7QQRf3JShKSYZSO7/sjMlJrubgGJBP8ivPxyPKiGbX3zUBS
# 6fI/ICLewC/g1fLPKaMHmqdrPK30ubPSGtnKdcz0q5NsT3hy6QWgtrQs5WAf3Liz
# 9WKGbq/y+qaFyLHat2tBpDnzT1Jso1SlIMkxL8kau3g6Pvk91E/pZjF5K3JOG8By
# PR4uQA==
# =FckT
# -----END PGP SIGNATURE-----
# gpg: Signature made Tue 12 Mar 2024 18:40:12 GMT
# gpg: using RSA key 7A481E78868B4DB6A85A05C064DF38E8AF7E215F
# gpg: issuer "richard.henderson@linaro.org"
# gpg: Good signature from "Richard Henderson <richard.henderson@linaro.org>" [full]
# Primary key fingerprint: 7A48 1E78 868B 4DB6 A85A 05C0 64DF 38E8 AF7E 215F
* tag 'pull-tcg-20240312' of https://gitlab.com/rth7680/qemu:
tcg/aarch64: Fix tcg_out_brcond for test comparisons
tcg/aarch64: Fix tcg_out_cmp for test comparisons
linux-user/elfload: Fully initialize struct target_elf_prpsinfo
linux-user/elfload: Don't close an unopened file descriptor
linux-user: Implement PR_GET_TID_ADDRESS
linux-user: Implement PR_{GET,SET}_SPECULATION_CTRL
linux-user: Implement PR_{GET,SET}_CHILD_SUBREAPER
linux-user: Add FIFREEZE and FITHAW ioctls
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'linux-user/syscall.c')
| -rw-r--r-- | linux-user/syscall.c | 22 |
1 files changed, 17 insertions, 5 deletions
diff --git a/linux-user/syscall.c b/linux-user/syscall.c index 597bdf0c2d..e12d969c2e 100644 --- a/linux-user/syscall.c +++ b/linux-user/syscall.c @@ -6450,16 +6450,28 @@ static abi_long do_prctl(CPUArchState *env, abi_long option, abi_long arg2, case PR_SET_NO_NEW_PRIVS: case PR_GET_IO_FLUSHER: case PR_SET_IO_FLUSHER: + case PR_SET_CHILD_SUBREAPER: + case PR_GET_SPECULATION_CTRL: + case PR_SET_SPECULATION_CTRL: /* Some prctl options have no pointer arguments and we can pass on. */ return get_errno(prctl(option, arg2, arg3, arg4, arg5)); case PR_GET_CHILD_SUBREAPER: - case PR_SET_CHILD_SUBREAPER: - case PR_GET_SPECULATION_CTRL: - case PR_SET_SPECULATION_CTRL: + { + int val; + ret = get_errno(prctl(PR_GET_CHILD_SUBREAPER, &val, + arg3, arg4, arg5)); + if (!is_error(ret) && put_user_s32(val, arg2)) { + return -TARGET_EFAULT; + } + return ret; + } + 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: |