diff options
| author | Peter Maydell <peter.maydell@linaro.org> | 2022-07-26 13:29:26 +0100 |
|---|---|---|
| committer | Peter Maydell <peter.maydell@linaro.org> | 2022-07-26 13:29:26 +0100 |
| commit | d1c912b816844aa045082595eba796b5a025dbc4 (patch) | |
| tree | 8df10fa459b250ae4b50f664bc55767319efca6e /linux-user | |
| parent | 0d0275c31f00b71b49eb80bbdca2cfe244cf80fb (diff) | |
| parent | 6f200f51869ff0de7ea0343dd7104362e994b382 (diff) | |
| download | qemu-d1c912b816844aa045082595eba796b5a025dbc4.zip qemu-d1c912b816844aa045082595eba796b5a025dbc4.tar.gz qemu-d1c912b816844aa045082595eba796b5a025dbc4.tar.bz2 | |
Merge tag 'linux-user-for-7.1-pull-request' of https://gitlab.com/laurent_vivier/qemu into staging
linux-user pull request 20220726
# gpg: Signature made Tue 26 Jul 2022 10:44:29 BST
# gpg: using RSA key CD2F75DDC8E3A4DC2E4F5173F30C38BD3F2FBE3C
# gpg: issuer "laurent@vivier.eu"
# gpg: Good signature from "Laurent Vivier <lvivier@redhat.com>" [full]
# gpg: aka "Laurent Vivier <laurent@vivier.eu>" [full]
# gpg: aka "Laurent Vivier (Red Hat) <lvivier@redhat.com>" [full]
# Primary key fingerprint: CD2F 75DD C8E3 A4DC 2E4F 5173 F30C 38BD 3F2F BE3C
* tag 'linux-user-for-7.1-pull-request' of https://gitlab.com/laurent_vivier/qemu:
linux-user: Use target abi_int type for pipefd[1] in pipe()
linux-user: Unconditionally use pipe2() syscall
linux-user/hppa: Fix segfaults on page zero
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'linux-user')
| -rw-r--r-- | linux-user/hppa/cpu_loop.c | 3 | ||||
| -rw-r--r-- | linux-user/syscall.c | 13 |
2 files changed, 5 insertions, 11 deletions
diff --git a/linux-user/hppa/cpu_loop.c b/linux-user/hppa/cpu_loop.c index a576d1a..64263c3 100644 --- a/linux-user/hppa/cpu_loop.c +++ b/linux-user/hppa/cpu_loop.c @@ -143,6 +143,9 @@ void cpu_loop(CPUHPPAState *env) env->iaoq_f = env->gr[31]; env->iaoq_b = env->gr[31] + 4; break; + case EXCP_IMP: + force_sig_fault(TARGET_SIGSEGV, TARGET_SEGV_MAPERR, env->iaoq_f); + break; case EXCP_ILL: force_sig_fault(TARGET_SIGILL, TARGET_ILL_ILLOPN, env->iaoq_f); break; diff --git a/linux-user/syscall.c b/linux-user/syscall.c index 991b85e..b27a655 100644 --- a/linux-user/syscall.c +++ b/linux-user/syscall.c @@ -1586,21 +1586,12 @@ static abi_long do_ppoll(abi_long arg1, abi_long arg2, abi_long arg3, } #endif -static abi_long do_pipe2(int host_pipe[], int flags) -{ -#ifdef CONFIG_PIPE2 - return pipe2(host_pipe, flags); -#else - return -ENOSYS; -#endif -} - static abi_long do_pipe(CPUArchState *cpu_env, abi_ulong pipedes, int flags, int is_pipe2) { int host_pipe[2]; abi_long ret; - ret = flags ? do_pipe2(host_pipe, flags) : pipe(host_pipe); + ret = pipe2(host_pipe, flags); if (is_error(ret)) return get_errno(ret); @@ -1624,7 +1615,7 @@ static abi_long do_pipe(CPUArchState *cpu_env, abi_ulong pipedes, } if (put_user_s32(host_pipe[0], pipedes) - || put_user_s32(host_pipe[1], pipedes + sizeof(host_pipe[0]))) + || put_user_s32(host_pipe[1], pipedes + sizeof(abi_int))) return -TARGET_EFAULT; return get_errno(ret); } |
