[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH 3/7] linux-user/hppa: Fix cpu_clone_regs
From: |
Richard Henderson |
Subject: |
[Qemu-devel] [PATCH 3/7] linux-user/hppa: Fix cpu_clone_regs |
Date: |
Tue, 31 Oct 2017 13:53:54 +0100 |
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>
---
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.13.6
- [Qemu-devel] [PATCH 0/7] linux-user fixes, mostly for hppa, Richard Henderson, 2017/10/31
- [Qemu-devel] [PATCH 1/7] linux-user: Restrict usage of sa_restorer, Richard Henderson, 2017/10/31
- [Qemu-devel] [PATCH 2/7] linux-user/hppa: Fix TARGET_SA_* defines, Richard Henderson, 2017/10/31
- [Qemu-devel] [PATCH 3/7] linux-user/hppa: Fix cpu_clone_regs,
Richard Henderson <=
- [Qemu-devel] [PATCH 4/7] linux-user/hppa: Fix typo for TARGET_NR_epoll_wait, Richard Henderson, 2017/10/31
- [Qemu-devel] [PATCH 5/7] linux-user/hppa: Fix TARGET_MAP_TYPE, Richard Henderson, 2017/10/31
- [Qemu-devel] [PATCH 6/7] linux-user/hppa: Fix TARGET_F_RDLCK, TARGET_F_WRLCK, TARGET_F_UNLCK, Richard Henderson, 2017/10/31
- [Qemu-devel] [PATCH 7/7] linux-user: Handle TARGET_MAP_STACK and TARGET_MAP_HUGETLB, Richard Henderson, 2017/10/31