From patchwork Wed Apr 28 19:34:05 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 428608 Delivered-To: patch@linaro.org Received: by 2002:a02:c901:0:0:0:0:0 with SMTP id t1csp922346jao; Wed, 28 Apr 2021 12:35:12 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzPrihEAOktNsTGgwxRI85q7SkzWyzbRqkDMrxn6d7OhJLe6JxuDMxRMoaGR0QCoo4lVRXd X-Received: by 2002:a05:6602:3342:: with SMTP id c2mr25984461ioz.98.1619638512780; Wed, 28 Apr 2021 12:35:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1619638512; cv=none; d=google.com; s=arc-20160816; b=PexTyC1QTmYNp51gRQOhoQvCbKkCm8h2SFIoe4fTskBCYY9nw+C1pbxWPJyFbeMpyv 4p9g5TSDC+0d+7yKho9VVPwzcMQORYA+M6xMNFBs8XvRFSjrQLvH/8oA1/n05nR43TOo e2tj8E9yP2eZ5NVsueJMIC55WqNasenYXC+UXbG8OGmphoLc6bDngpI6wvZM7dRM7tBc 0bXy3QEj5m44vmpY4l3Yv+V640N/rrHWPlQjXbqjbOl67h8drzB7XFyKwBcEOWsFLJMA +v+yIn7rw7lchb7bKv0l6FaqgD3GhEsTxYr1nLjcVXWByx7wVl7aSebsPpblDZOWWnYH UKjg== 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=PRTcQMn0YPUCpUcreJVsTHoENIvP8EOBxAb8mB7Aw3E=; b=e1lXxsix4wEHwI1reMuF9Dv6gVfpIYACQfXyWhfKo6qvis8EpozmILQcVh8zxspuZf 18Fbj33Sifmo0eEeBIciyKaq9ir8/ZacusTIYsy/kQmkdceZ7cjeiISp2bLUdFZljWJ9 dj+tU4iKdwlPsF/4dqd3et8/INPy97InHka2XEPprM3zcf+TXnMMHDpPERR4Pqkdijev GrZSF6ynh72+3OR6q8RCAD4JIwEUzhVL14O55noqsfVAd+SH75/DuA56YNRTo/C8praB WC9tCO075gnDLT1TyVwSFrP6JqBJh97ql42mNIkeYNtLrHHl/AEYRplhSUuWISGEjoHh 6c/A== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=Wwi4WIol; 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 a12si757912iln.40.2021.04.28.12.35.12 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 28 Apr 2021 12:35:12 -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=Wwi4WIol; 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]:48942 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lbpxo-0006Dx-8b for patch@linaro.org; Wed, 28 Apr 2021 15:35:12 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:55336) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lbpxA-00062e-H7 for qemu-devel@nongnu.org; Wed, 28 Apr 2021 15:34:32 -0400 Received: from mail-pl1-x635.google.com ([2607:f8b0:4864:20::635]:46691) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lbpww-0004h0-C7 for qemu-devel@nongnu.org; Wed, 28 Apr 2021 15:34:30 -0400 Received: by mail-pl1-x635.google.com with SMTP id s20so17589415plr.13 for ; Wed, 28 Apr 2021 12:34:17 -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=PRTcQMn0YPUCpUcreJVsTHoENIvP8EOBxAb8mB7Aw3E=; b=Wwi4WIolU4dwNPk4HObG5X5wv0In4rWTpOAw992om0JNn+LVUb8RblxunApMSTQE3Z SQDSSSIetrrIP5syZ/EUnZMGndbdlDMtCzeW/LvMHmpniTtmRMM+kPvTAi4i2u/4yQRb IQTzVrQH6DkmGaonzxPgKh8Kx16XbAsTuHBj05fqQ6qyEyfxe+JzOE3KSb7gVuvP9ahO RQqY2R/4VI8UYDMIExkQau0mS7MfDQPyvxTTb7Mx45YwWrftQrMDbfaD3gujJgYKTujR mogpYPYqxZxDiQ4d8c14Qt2M9KxDFwe50HKA0scQnbtsqrdkj17GxK4YVzhLz90Ua+27 ttmg== 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=PRTcQMn0YPUCpUcreJVsTHoENIvP8EOBxAb8mB7Aw3E=; b=nT3gr/QX9rDp/eBUQx+AfQ/oNxOJUfdqZgB8WoLJYlmKpiTtFhJNGjrH+FpCH6aPsz yH4MhOzq16b31x4FQ1rmv4MNUkSYa/5pJF/atzBl0eoVwkLRfpU/340PfmlH1bz2XWKC 8mdwOnQLL3B5T/nN/E0KjI7Vl898h4yCQ+3Mm89khnl6KTBm9XXfRyywAt7kbE3P8dvz VY3f3lIHhzS71VLlDKLZEZPnndqqBCmjnk+7JID66JqJiAUFaUwBhdy4pEnMYABLs1tL n1O9wwAXUJWUgB1Ic5hwBwiuRIjrvNNShQDQUjDHqXyfgT80XrTTWtJb2FtFkKeAiLGs oGzg== X-Gm-Message-State: AOAM5303B4bW4okKi10gmsMXmT4+6qJ9UQmhQGpcdO2IZDsiM3Xgr85p /F713c0R/Spjh3tvXD8piAuWFuPm6qaE6A== X-Received: by 2002:a17:90a:8816:: with SMTP id s22mr5384598pjn.25.1619638457028; Wed, 28 Apr 2021 12:34:17 -0700 (PDT) Received: from localhost.localdomain ([71.212.144.24]) by smtp.gmail.com with ESMTPSA id h21sm403725pfo.211.2021.04.28.12.34.16 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 28 Apr 2021 12:34:16 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Subject: [PATCH v2 12/15] linux-user/s390x: Fix frame_addr corruption in setup_frame Date: Wed, 28 Apr 2021 12:34:05 -0700 Message-Id: <20210428193408.233706-13-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::635; envelope-from=richard.henderson@linaro.org; helo=mail-pl1-x635.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" The original value of frame_addr is still required for its use in the call to unlock_user_struct below. 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 bc41b01c5d..81ba59b46a 100644 --- a/linux-user/s390x/signal.c +++ b/linux-user/s390x/signal.c @@ -168,7 +168,7 @@ void setup_frame(int sig, struct target_sigaction *ka, env->psw.addr = ka->_sa_handler; env->regs[2] = sig; - env->regs[3] = frame_addr += offsetof(typeof(*frame), sc); + env->regs[3] = frame_addr + offsetof(typeof(*frame), sc); /* * We forgot to include these in the sigcontext.