From patchwork Wed Apr 28 19:33:59 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 428610 Delivered-To: patch@linaro.org Received: by 2002:a02:c901:0:0:0:0:0 with SMTP id t1csp923193jao; Wed, 28 Apr 2021 12:36:11 -0700 (PDT) X-Google-Smtp-Source: ABdhPJydNvB7Ks1Lfsh+sFMV5ldH2DR2Q8t5ucdMfn4fTg/5jL0Wt1lAHMIVEdCTQZi/rFvWZJqb X-Received: by 2002:ae9:f30c:: with SMTP id p12mr18397913qkg.294.1619638571209; Wed, 28 Apr 2021 12:36:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1619638571; cv=none; d=google.com; s=arc-20160816; b=g9g/6WmEm1zpgFn3xHPxa19BGvcIG3KysdqHKXOMg1ZcZHk7a+08Sc5qCah2pZUIz1 i1s181NPzwV3CmaCEIOVKurtCIzVehrE1MjzczK/KK6+AxtmXsv242Cf3gNia3gFMq9a kHyGVuIq+PuqBcG4xpKChL7lbr+ytyYwW+AIafUolUjk5c/XubExCxdJqT5hRfnRVY1P SVVKDhCo9eoRz4WSp6I5IglbsxPExm55b0rDXaNlhBtcyfzJXY00CcXDBUlPxjjPuMbR Zsk5QFxfb7VrzC28OsXu2kNpUfWovz66PBrKjWNhqvf3TM0TnNI16qAGlqP9zXQ7j4MU C92g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:cc:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:to:from :dkim-signature; bh=jfZsQ4ONGBdD4XoGEls4UPD+wvPxpUSmaLIy3AFINu8=; b=bI6YFLn0UfF915vt+YMRnyxBlo/DOiVWmP88AuZxaaTbsrajLZuo1ax2WJwpJP7pjO uc13BmZaiisfbQQdJwgN40iIiqhj34d5VyqCInOYK1eoGfC7U9GHaiX5hf0PYceyPIx3 TjW7pNM+zr87XSPRta1Da8b135u/w8bymnIHNMiiNt9tBT1WQ5eNQRyLIceAb+3ao7xl qfPBQ+mE2Nr+QaRQAXiMkaTCB4LXM1+9UckRXWHpiK1vI7rsNZYMLojzcBNOJjCRIZbl lWMPl9pF7yPJsCbwTit9AOydoAGUkR8ET88pAg45SbZUMl6245qKT31ER8nDUQiPoe7b wo7g== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=Ds+4gEQT; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id e2si436327qkl.172.2021.04.28.12.36.11 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 28 Apr 2021 12:36:11 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=Ds+4gEQT; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1]:48638 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lbpyk-00063h-Oi for patch@linaro.org; Wed, 28 Apr 2021 15:36:10 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:55150) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lbpww-0005uU-JM for qemu-devel@nongnu.org; Wed, 28 Apr 2021 15:34:18 -0400 Received: from mail-pg1-x52e.google.com ([2607:f8b0:4864:20::52e]:33407) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lbpws-0004cx-Ja for qemu-devel@nongnu.org; Wed, 28 Apr 2021 15:34:18 -0400 Received: by mail-pg1-x52e.google.com with SMTP id t22so10235344pgu.0 for ; Wed, 28 Apr 2021 12:34:14 -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 :mime-version:content-transfer-encoding; bh=jfZsQ4ONGBdD4XoGEls4UPD+wvPxpUSmaLIy3AFINu8=; b=Ds+4gEQTrkeCuLjdEgQyO9IUKxOaKmQ36mruNJjJDPLOLtvVdaU/1a6Hhu/OHi+Xay FAI6LRvpKw4DW9qQED7GMzolrTngaXGh72OrgtLFOs/NbYVC39ahSlUPOx15VXvcGVGn eko0zkBufHr2BiiePSYETRhhjMlHNPiRpXVwLuHknAWUyiJyO7BlirQp/nUatEM+xDHd vqn9ictOyDdLlRIfLOl/N08jjh+xvfR2byyoYUX9vFq2rmB4WIOBV+Uy6GZr0d5jMqBk 9cvHZbk4RQzU8yGW9zTD7jYNYbTrbly6q2NS2otuMsaQJ1RvYUNEEbD8L+ECpo2+6m+n U//w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=jfZsQ4ONGBdD4XoGEls4UPD+wvPxpUSmaLIy3AFINu8=; b=IIMGyVkDbbRNp6zwkAns4kpJTp/U/+xixYMMCGbcVLarLwtG6/siUusuiNQnbi3i3N o7kCu8IaDvtrXKs0zJGcYXLGebYua2l7UdT5/Lv01rW4SJES+Re/R5Wkshuh4+0G2+Gp eCeCJcdIDPkXw1gToRnN/8AKQPEvRP67nq8hzCpjQ/GAAQoFuyZ0uarIyKT8EnzwAGqO EV3jtRw1Da+x7nWYjLsxj25b3AENqDMgWhiAIAZfLBtzaitGlG4yt/nUS3loViOdAbLS hFZE3itiRftVsd+LOfMQXl9sdcF0NFYsT7iLY1lkOnUtTpYbQkpsu7hfIkn+rJxEjHM8 nUKQ== X-Gm-Message-State: AOAM5315+/i51QzdPH4D44qeMY6tzLbTuhnooNe8yUQv0lCiRscuC2n1 CBDJxO0Ta94h/Edq2k4L8tCz/OdqPBxBRA== X-Received: by 2002:aa7:8593:0:b029:259:c31b:945b with SMTP id w19-20020aa785930000b0290259c31b945bmr29030621pfn.27.1619638453173; Wed, 28 Apr 2021 12:34:13 -0700 (PDT) Received: from localhost.localdomain ([71.212.144.24]) by smtp.gmail.com with ESMTPSA id h21sm403725pfo.211.2021.04.28.12.34.12 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 28 Apr 2021 12:34:12 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Subject: [PATCH v2 06/15] linux-user/s390x: Fix sigcontext sregs value Date: Wed, 28 Apr 2021 12:33:59 -0700 Message-Id: <20210428193408.233706-7-richard.henderson@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210428193408.233706-1-richard.henderson@linaro.org> References: <20210428193408.233706-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::52e; envelope-from=richard.henderson@linaro.org; helo=mail-pg1-x52e.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: thuth@redhat.com, qemu-s390x@nongnu.org, cohuck@redhat.com, laurent@vivier.eu, david@redhat.com Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" Using the host address of &frame->sregs is incorrect. We need the guest address. Signed-off-by: Richard Henderson --- linux-user/s390x/signal.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- 2.25.1 Reviewed-by: David Hildenbrand diff --git a/linux-user/s390x/signal.c b/linux-user/s390x/signal.c index dcc6f7bc02..f8515dd332 100644 --- a/linux-user/s390x/signal.c +++ b/linux-user/s390x/signal.c @@ -142,7 +142,7 @@ void setup_frame(int sig, struct target_sigaction *ka, save_sigregs(env, &frame->sregs); - __put_user((abi_ulong)(unsigned long)&frame->sregs, &frame->sc.sregs); + __put_user(frame_addr + offsetof(sigframe, sregs), &frame->sc.sregs); /* Set up to return from userspace. If provided, use a stub already in userspace. */