From patchwork Wed May 25 10:32:08 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Riku Voipio X-Patchwork-Id: 9135169 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 6B671607D7 for ; Wed, 25 May 2016 11:07:23 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 5E33B28164 for ; Wed, 25 May 2016 11:07:23 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 530FE282D7; Wed, 25 May 2016 11:07:23 +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 D4E9028164 for ; Wed, 25 May 2016 11:07:22 +0000 (UTC) Received: from localhost ([::1]:58971 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1b5Weo-0007Ur-1e for patchwork-qemu-devel@patchwork.kernel.org; Wed, 25 May 2016 07:07:22 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:42130) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1b5W7W-0001bg-5q for qemu-devel@nongnu.org; Wed, 25 May 2016 06:33:05 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1b5W7M-0003Ve-2f for qemu-devel@nongnu.org; Wed, 25 May 2016 06:32:58 -0400 Received: from mail-lb0-x22d.google.com ([2a00:1450:4010:c04::22d]:35927) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1b5W7L-0003Ur-BJ for qemu-devel@nongnu.org; Wed, 25 May 2016 06:32:48 -0400 Received: by mail-lb0-x22d.google.com with SMTP id h1so14015078lbj.3 for ; Wed, 25 May 2016 03:32:47 -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=HAm12rQz8nCguRnLrhmAFWcIxQ4tE3eYcd21qrbvC3s=; b=TUegXQ4GAAbkiLalK530MQCx+LPToLB7OsbTQXximzKsKtMI0IyX4c4drvGhhESIx2 mkxmkcBj2chkdWxRutI21uU3P0oHLyx6RiQ+o6R6QPT/ILtSrnQws+0KlrD3Seay4g9Q x1mOb3aBR5DisMK5cYAqsWQcRohZ02DfLbZ0o= 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=HAm12rQz8nCguRnLrhmAFWcIxQ4tE3eYcd21qrbvC3s=; b=OlrkYXS/DtPBK6jLb5mrXVj/P3wbOcZh3iTJtFp+J6rz2WtlYivaYlOqofvnvMWCBE RjatudLX9p87LuoEPVMJtUi6GdNR4BfLEiDD8ATzE61dIlLMXNbmBjIg3yVSfafd/D3V XQkqTAGfDwMd/5ygO/lRK54u1denTB+k21+YNDl79PwpEIrIFXBZjnd4wctX0s0Z9R8R 59nexJh9tf57DVgjjyUjCd1tTrseIWmXn4aGTm4nHPMPX6Ghs/ZaatGR+h4wQ4upQWUz ap30411bngIK5F13cL1ReAY+A1ovx3GCuDYvf443H0FSecSjndklT537f8QGZBVVl7uc D9nA== X-Gm-Message-State: ALyK8tKUy+I1aZ+VMVsXPmKO3fdq8WwZY9HY3F62A/G2jjh+UTs/TUDLhd+8w4EeA3OkuFTd X-Received: by 10.112.131.71 with SMTP id ok7mr582350lbb.7.1464172366567; Wed, 25 May 2016 03:32:46 -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.45 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 25 May 2016 03:32:45 -0700 (PDT) From: riku.voipio@linaro.org To: qemu-devel@nongnu.org Date: Wed, 25 May 2016 13:32:08 +0300 Message-Id: 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::22d Subject: [Qemu-devel] [PULL 36/38] linux-user/signal.c: Use target address instead of host address for microblaze restorer 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 Signed-off-by: Riku Voipio --- linux-user/signal.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/linux-user/signal.c b/linux-user/signal.c index a072fa6..c75fb48 100644 --- a/linux-user/signal.c +++ b/linux-user/signal.c @@ -3573,7 +3573,8 @@ static void setup_frame(int sig, struct target_sigaction *ka, /* Return from sighandler will jump to the tramp. Negative 8 offset because return is rtsd r15, 8 */ - env->regs[15] = ((unsigned long)frame->tramp) - 8; + env->regs[15] = frame_addr + offsetof(struct target_signal_frame, tramp) + - 8; } /* Set up registers for signal handler */