From patchwork Fri May 27 13:00:28 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Riku Voipio X-Patchwork-Id: 9138383 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 689FD60467 for ; Fri, 27 May 2016 13:37:14 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 5890F28061 for ; Fri, 27 May 2016 13:37:14 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 4D59528159; Fri, 27 May 2016 13:37:14 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, FSL_HELO_HOME, RCVD_IN_DNSWL_HI, T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 7361628061 for ; Fri, 27 May 2016 13:37:13 +0000 (UTC) Received: from localhost ([::1]:45866 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1b6Hwu-0000it-Jr for patchwork-qemu-devel@patchwork.kernel.org; Fri, 27 May 2016 09:37:12 -0400 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) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=zRWckhh7MHla34G/xdS/kLfDRrj76YOfrqyxAxNrYBY=; b=i1KWSMWkk56b1qq76d3l0jwUkG3tJY+VfKpY/xjJb8Aa3zBdD2b9EB7ZC05R6kZ8mh 4gkBivMNmKV0RCUUdIOshdFa878mG+cbbwZKwySmU9wlb5WB/F24BQVOzeiwZH84jCQr +prIqtbdNMb47LAGO/0j7vfqnrGdBq7IS6SiU= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=zRWckhh7MHla34G/xdS/kLfDRrj76YOfrqyxAxNrYBY=; b=Vmd051uSyNF2dH4aCrifxubwyxO3kv8dplKN+1jM4dnAlkRha/q8gXUyuDWhiM/Uu6 5wm2XCOy8HTp0Y8ImxdMdOkfnC5twxcxXHXiBABdWPG+ED2qovvxFCMGDtxsv9bsrdEu 8ulML4QrloHJeB7btlzLQj0blr6pUt/UWjHgOge8aMRJAGnjLU6nlFsWg9lQeXVmoQVq WqLnFCEn5QJN8ttZdhnYh/2R28Yy908V9Lzl6Sast5bRAoyNmMg5sRE2oaqjWPKYtxQH P9wK+Qdg06aUhbOwGrJeai/YJhucNDdgAth81HEDXuzGQxoIm5zsVkiqsR25kfHko9hm diWw== X-Gm-Message-State: ALyK8tI+E8m5OMB2ujAkBk+0mGd0PwD6kdcLXM/8qq4pEaf3f1gQYi975mh7VmSsUbrlHSnj X-Received: by 10.25.16.27 with SMTP id f27mr4286874lfi.114.1464354078687; Fri, 27 May 2016 06:01:18 -0700 (PDT) Received: from beaming.home (91-157-168-132.elisa-laajakaista.fi. [91.157.168.132]) by smtp.gmail.com with ESMTPSA id n16sm2281066lfg.31.2016.05.27.06.01.17 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 27 May 2016 06:01:17 -0700 (PDT) From: riku.voipio@linaro.org To: qemu-devel@nongnu.org Date: Fri, 27 May 2016 16:00:28 +0300 Message-Id: <5b1d59d0bb2a30d9fd8e8def88cba2ead7006ece.1464353863.git.riku.voipio@linaro.org> X-Mailer: git-send-email 2.1.4 In-Reply-To: References: X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2a00:1450:4010:c07::230 Subject: [Qemu-devel] [PULL v2 37/38] linux-user/signal.c: Use s390 target space address instead of host space X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Chen Gang Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" X-Virus-Scanned: ClamAV using ClamSMTP 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)); }