[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PULL 03/15] linux-user/hppa: Fix cpu_clone_regs
From: |
riku . voipio |
Subject: |
[Qemu-devel] [PULL 03/15] linux-user/hppa: Fix cpu_clone_regs |
Date: |
Mon, 20 Nov 2017 23:21:31 +0200 |
From: Richard Henderson <address@hidden>
By failing to return from the syscall in the child, the child
issues another clone syscall and hilarity ensues.
Signed-off-by: Richard Henderson <address@hidden>
Signed-off-by: Riku Voipio <address@hidden>
---
linux-user/hppa/target_cpu.h | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/linux-user/hppa/target_cpu.h b/linux-user/hppa/target_cpu.h
index 1a5cecad3c..e50522eae9 100644
--- a/linux-user/hppa/target_cpu.h
+++ b/linux-user/hppa/target_cpu.h
@@ -24,7 +24,11 @@ static inline void cpu_clone_regs(CPUHPPAState *env,
target_ulong newsp)
if (newsp) {
env->gr[30] = newsp;
}
+ /* Indicate child in return value. */
env->gr[28] = 0;
+ /* Return from the syscall. */
+ env->iaoq_f = env->gr[31];
+ env->iaoq_b = env->gr[31] + 4;
}
static inline void cpu_set_tls(CPUHPPAState *env, target_ulong newtls)
--
2.14.2
- [Qemu-devel] [PULL 00/15] late linux-user fixes for 2.11, riku . voipio, 2017/11/20
- [Qemu-devel] [PULL 01/15] linux-user: Restrict usage of sa_restorer, riku . voipio, 2017/11/20
- [Qemu-devel] [PULL 03/15] linux-user/hppa: Fix cpu_clone_regs,
riku . voipio <=
- [Qemu-devel] [PULL 04/15] linux-user/hppa: Fix typo for TARGET_NR_epoll_wait, riku . voipio, 2017/11/20
- [Qemu-devel] [PULL 02/15] linux-user/hppa: Fix TARGET_SA_* defines, riku . voipio, 2017/11/20
- [Qemu-devel] [PULL 05/15] linux-user/hppa: Fix TARGET_MAP_TYPE, riku . voipio, 2017/11/20
- [Qemu-devel] [PULL 06/15] linux-user/hppa: Fix TARGET_F_RDLCK, TARGET_F_WRLCK, TARGET_F_UNLCK, riku . voipio, 2017/11/20
- [Qemu-devel] [PULL 08/15] linux-user/syscall.c: Handle SH4's exceptional alignment for p{read, write}64, riku . voipio, 2017/11/20
- [Qemu-devel] [PULL 11/15] linux-user/s390x: Mask si_addr for SIGSEGV, riku . voipio, 2017/11/20
- [Qemu-devel] [PULL 07/15] linux-user: Handle TARGET_MAP_STACK and TARGET_MAP_HUGETLB, riku . voipio, 2017/11/20
- [Qemu-devel] [PULL 09/15] linux-user: fix 'finshed' typo in comment, riku . voipio, 2017/11/20
- [Qemu-devel] [PULL 10/15] linux-user: return EINVAL from prctl(PR_*_SECCOMP), riku . voipio, 2017/11/20
- [Qemu-devel] [PULL 12/15] linux-user/ppc: Report correct fault address for data faults, riku . voipio, 2017/11/20