From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:37637) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1b6HOG-0007zI-JA for qemu-devel@nongnu.org; Fri, 27 May 2016 09:01:28 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1b6HOC-0001O3-97 for qemu-devel@nongnu.org; Fri, 27 May 2016 09:01:24 -0400 Received: from mail-lf0-x230.google.com ([2a00:1450:4010:c07::230]:34381) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1b6HOB-0001Ng-GA for qemu-devel@nongnu.org; Fri, 27 May 2016 09:01:20 -0400 Received: by mail-lf0-x230.google.com with SMTP id k98so45672834lfi.1 for ; Fri, 27 May 2016 06:01:19 -0700 (PDT) From: riku.voipio@linaro.org Date: Fri, 27 May 2016 16:00:28 +0300 Message-Id: <5b1d59d0bb2a30d9fd8e8def88cba2ead7006ece.1464353863.git.riku.voipio@linaro.org> In-Reply-To: References: Subject: [Qemu-devel] [PULL v2 37/38] linux-user/signal.c: Use s390 target space address instead of host space List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Chen Gang From: Chen Gang 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 --- linux-user/signal.c | 4 ++-- 1 file 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)); } -- 2.1.4