aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChen Gang <chengang@emindsoft.com.cn>2016-05-24 14:54:32 +0300
committerRiku Voipio <riku.voipio@linaro.org>2016-05-27 14:50:40 +0300
commit5b1d59d0bb2a30d9fd8e8def88cba2ead7006ece (patch)
treec045f6d3f5687366b38df75d8d1983c8be7dd420
parent166c97edd682878943f496f1a3cbed49e096d43b (diff)
downloadqemu-5b1d59d0bb2a30d9fd8e8def88cba2ead7006ece.zip
qemu-5b1d59d0bb2a30d9fd8e8def88cba2ead7006ece.tar.gz
qemu-5b1d59d0bb2a30d9fd8e8def88cba2ead7006ece.tar.bz2
linux-user/signal.c: Use s390 target space address instead of host space
The return address is in target space, so the restorer address needs to be target space, too. Signed-off-by: Chen Gang <gang.chen.5i5j@gmail.com> Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Reviewed-by: Laurent Vivier <laurent@vivier.eu>
-rw-r--r--linux-user/signal.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/linux-user/signal.c b/linux-user/signal.c
index c75fb48..28ce921 100644
--- a/linux-user/signal.c
+++ b/linux-user/signal.c
@@ -4159,8 +4159,8 @@ static void setup_frame(int sig, struct target_sigaction *ka,
env->regs[14] = (unsigned long)
ka->sa_restorer | PSW_ADDR_AMODE;
} else {
- env->regs[14] = (unsigned long)
- frame->retcode | PSW_ADDR_AMODE;
+ env->regs[14] = (frame_addr + offsetof(sigframe, retcode))
+ | PSW_ADDR_AMODE;
__put_user(S390_SYSCALL_OPCODE | TARGET_NR_sigreturn,
(uint16_t *)(frame->retcode));
}