From patchwork Wed May 25 10:32:09 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Riku Voipio X-Patchwork-Id: 9135165 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 068706075C for ; Wed, 25 May 2016 11:04:30 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id EEF16252D5 for ; Wed, 25 May 2016 11:04:29 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id E3DC9282A2; Wed, 25 May 2016 11:04:29 +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 B0A78252D5 for ; Wed, 25 May 2016 11:04:28 +0000 (UTC) Received: from localhost ([::1]:58957 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1b5Wbz-0004rk-Eh for patchwork-qemu-devel@patchwork.kernel.org; Wed, 25 May 2016 07:04:27 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:42139) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1b5W7W-0001bu-CN for qemu-devel@nongnu.org; Wed, 25 May 2016 06:33:07 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1b5W7M-0003W2-S1 for qemu-devel@nongnu.org; Wed, 25 May 2016 06:32:58 -0400 Received: from mail-lb0-x22b.google.com ([2a00:1450:4010:c04::22b]:33073) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1b5W7M-0003Vk-IM for qemu-devel@nongnu.org; Wed, 25 May 2016 06:32:48 -0400 Received: by mail-lb0-x22b.google.com with SMTP id k7so14062956lbm.0 for ; Wed, 25 May 2016 03:32:48 -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=gvVpJaPE7I0MA667EuWWHuPT0R0E1vt+8qlzDU7AE5G6iEmz55UkqDI/HkEkStHG4u ghyHA6O4cwvrfIQyW+kLc/fdVsXkBzv1IDi1UhoFXDNQ7YeqtLmJYEqSx71GrT6CZaIg 7oRqw5KjHTxqWKbChD15NN8FmgATcSqllJbeI= 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=ETwQ8u6WpEY09JyRygtt12rwYEhPjvxjgPItK0uwIH7lzXbIEKnEHQQZ513V6/t9Xt qHErqU7StAMBEgjC8OGib02umGkjm4Xbjn75jBTop3s+PAa4yQr5+3tbswJWJZyFEQBl nGNFI8ecuWsxf4DlHxiu/0Pp4TvqDw0esPwSdkky9I4o45f1gSfUzXc3yWimslqIFXhw f9Hslo0Lr7B6V9HNCx8JVwFPeRoA8ang/bdEGrC+l430jsTKIHoG4Wuj+qmDHx+U1l9f 2QJUi6vQiXN1gX+lnEt+hPYij/Q4j8W+3tTWo9DsP5/2aQkI9V0Av9NLNyg4fssLNDVh ARAg== X-Gm-Message-State: ALyK8tLZKCn/QPpf67g8t5U2ZLLX9qQQkpI1T+bPxrDVbI339B+afWIvEXyoT7WkLKulLoSm X-Received: by 10.112.139.71 with SMTP id qw7mr956249lbb.40.1464172367780; Wed, 25 May 2016 03:32:47 -0700 (PDT) Received: from beaming.home (91-157-168-132.elisa-laajakaista.fi. [91.157.168.132]) by smtp.gmail.com with ESMTPSA id o75sm1379610lfi.9.2016.05.25.03.32.46 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 25 May 2016 03:32:46 -0700 (PDT) From: riku.voipio@linaro.org To: qemu-devel@nongnu.org Date: Wed, 25 May 2016 13:32:09 +0300 Message-Id: <1b924deb2ff634aca3bdea02c602b4c7b91559e3.1464153942.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:c04::22b Subject: [Qemu-devel] [PULL 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)); }