From: Chen Gang Date: Tue, 24 May 2016 11:54:32 +0000 (+0300) Subject: linux-user/signal.c: Use s390 target space address instead of host space X-Git-Tag: TizenStudio_2.0_p4.0~6^2~12^2~6^2~244^2~1 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=5b1d59d0bb2a30d9fd8e8def88cba2ead7006ece;p=sdk%2Femulator%2Fqemu.git 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 Reviewed-by: Peter Maydell Reviewed-by: Laurent Vivier --- 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)); }