mirror of https://github.com/xemu-project/xemu.git
linux-user pull request 20220726
-----BEGIN PGP SIGNATURE----- iQJGBAABCAAwFiEEzS913cjjpNwuT1Fz8ww4vT8vvjwFAmLft30SHGxhdXJlbnRA dml2aWVyLmV1AAoJEPMMOL0/L748/OcP/1JBgyZdkSqHCJmpxvj9VALSPhGu6d/e i3+FS7rBS7tZyVyoKHn8nNTZ8xHPWU7tucYWhhoCSxO/eLQny9NWrl11Z8hjoaUt rjaJFxa26dwpOUaeUQpN5DdAY1pUZBmmPnlgkLz4vUnfLsWFkV6QGP7G//65eS7V xMcfrsdtBUrklH/rBx/1CO/Z99poZXRVZPz6bGtFkhwMJCRyVcNc+y1eNfvgN+Tp ZpxcRETDdQsp3/z5n5GWZs41tJwhDOlgV2FeCnsy2i4j+egj/Dt3UlD9zednng3B CzCwhs/RVTruF140XiQeleBdEqAr46Nc6377oTgT1vkBNmXNSdk8O0ntYQEBpOFp ixA91oZjOBFhbKTsRLB9AkaNpbbx1O6ellwcofDeniBpdQ1/KxLU/mWRMr4CJO0l Ma4udBdsR+QkwHSrRMlUC4JPRSRb4sv1BAMkOxHSVgfvmhmU6VQjIH4qTST5wRnJ nByE1/m/xSfC7LQrehkKVb8Fqh0zyrK33KsCQYqxlWJWWlca4vcueoGduCgGm0G+ XpcZ+OwhwczxU2MxdnYIDYEK7oquu/H9KWo7LzsylDGYlD2PNtz0h81YHeX7eIHc OP1wgVFvyl2IzKDyWBbhN7JsbV+XLSiMywuB48yAUs0s2BVFF/uogwcwo2loxetF /0+CP3cS37G9 =txLL -----END PGP SIGNATURE----- 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>
This commit is contained in:
commit
d1c912b816
|
@ -143,6 +143,9 @@ void cpu_loop(CPUHPPAState *env)
|
||||||
env->iaoq_f = env->gr[31];
|
env->iaoq_f = env->gr[31];
|
||||||
env->iaoq_b = env->gr[31] + 4;
|
env->iaoq_b = env->gr[31] + 4;
|
||||||
break;
|
break;
|
||||||
|
case EXCP_IMP:
|
||||||
|
force_sig_fault(TARGET_SIGSEGV, TARGET_SEGV_MAPERR, env->iaoq_f);
|
||||||
|
break;
|
||||||
case EXCP_ILL:
|
case EXCP_ILL:
|
||||||
force_sig_fault(TARGET_SIGILL, TARGET_ILL_ILLOPN, env->iaoq_f);
|
force_sig_fault(TARGET_SIGILL, TARGET_ILL_ILLOPN, env->iaoq_f);
|
||||||
break;
|
break;
|
||||||
|
|
|
@ -1586,21 +1586,12 @@ static abi_long do_ppoll(abi_long arg1, abi_long arg2, abi_long arg3,
|
||||||
}
|
}
|
||||||
#endif
|
#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,
|
static abi_long do_pipe(CPUArchState *cpu_env, abi_ulong pipedes,
|
||||||
int flags, int is_pipe2)
|
int flags, int is_pipe2)
|
||||||
{
|
{
|
||||||
int host_pipe[2];
|
int host_pipe[2];
|
||||||
abi_long ret;
|
abi_long ret;
|
||||||
ret = flags ? do_pipe2(host_pipe, flags) : pipe(host_pipe);
|
ret = pipe2(host_pipe, flags);
|
||||||
|
|
||||||
if (is_error(ret))
|
if (is_error(ret))
|
||||||
return get_errno(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)
|
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 -TARGET_EFAULT;
|
||||||
return get_errno(ret);
|
return get_errno(ret);
|
||||||
}
|
}
|
||||||
|
|
|
@ -2026,15 +2026,6 @@ config_host_data.set('CONFIG_OPEN_BY_HANDLE', cc.links(gnu_source_prefix + '''
|
||||||
#else
|
#else
|
||||||
int main(void) { struct file_handle fh; return open_by_handle_at(0, &fh, 0); }
|
int main(void) { struct file_handle fh; return open_by_handle_at(0, &fh, 0); }
|
||||||
#endif'''))
|
#endif'''))
|
||||||
config_host_data.set('CONFIG_PIPE2', cc.links(gnu_source_prefix + '''
|
|
||||||
#include <unistd.h>
|
|
||||||
#include <fcntl.h>
|
|
||||||
|
|
||||||
int main(void)
|
|
||||||
{
|
|
||||||
int pipefd[2];
|
|
||||||
return pipe2(pipefd, O_CLOEXEC);
|
|
||||||
}'''))
|
|
||||||
config_host_data.set('CONFIG_POSIX_MADVISE', cc.links(gnu_source_prefix + '''
|
config_host_data.set('CONFIG_POSIX_MADVISE', cc.links(gnu_source_prefix + '''
|
||||||
#include <sys/mman.h>
|
#include <sys/mman.h>
|
||||||
#include <stddef.h>
|
#include <stddef.h>
|
||||||
|
|
Loading…
Reference in New Issue