From patchwork Mon Jul 11 13:57:43 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Maydell X-Patchwork-Id: 589388 Delivered-To: patch@linaro.org Received: by 2002:a05:7000:bb16:0:0:0:0 with SMTP id jd22csp3320723mab; Mon, 11 Jul 2022 07:58:13 -0700 (PDT) X-Google-Smtp-Source: AGRyM1ta9A3Htl//gKMILlVVvZXYW+mi6xQqOdcl4sM9O7CzePE5ttKQc7Z8ZCelZZBNXmHEbS2G X-Received: by 2002:ac8:5807:0:b0:31e:b997:d832 with SMTP id g7-20020ac85807000000b0031eb997d832mr1515362qtg.16.1657551493217; Mon, 11 Jul 2022 07:58:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1657551493; cv=none; d=google.com; s=arc-20160816; b=C9YqFRJDpB16qyZGIK2EX1pod5tA6RHv5Ag9B+2IIZbKfR/LbFmseuY6dOe7iBNiVj +AkLpLJrOgjeSBMygas+aIy6TXTexe/9uhHBw4sM0//UWSHo3CQiwt8+8j9HAN3q35r4 SKyj9cKlSeK9Omk1sNN466fJCR4VoB37uQzqpdT6VAASsDRnb3iOT2245QnQQUKI4yCb oo0mZhey+NN4Cl0HyY5Pmt0LBRhKXf4bp9JZez3+IbUr1HISLaQVCE+jibyAg1UdCK5S t8BxEefBnX0CKZnsw1pcJWneLzpyUTlzQS8OnbtYNk/2lrR67fM31W76v9300GbLnZZ1 gl5w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to: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=RcIdbbXzpewsExSM+4LX7uPRbT+xi+nVqfYtgmho4n4=; b=QeJvTbqUZhQTlTEcbgPishB+Cbh0gWNU2saNBJ00CPSi8AHJbRwmQj0tBSkUg3inSx g1oWXGDwKHUXHlTnwX2CoS3/153U9RCy86RiPfrVkLo5xDMwN/oGFltVppITnZGAXg03 v976P7nEFftOeOTrK30VUnjWTPmLGCcNcsmosxe6LwJ/uMnfa1vSB1cYqzuhLAs/Zy6h lWC0L43JVYqeNRkis+9394Hd4lewFVYbN6YcsBpGuX+vMPLlW7TEwrDludOiEWOhWJjI YkiA8vuj81H5VBbjy2FIu311syJ4tuJg6zR15808/0uTvlKjoqgqtUUcD/5p1rgtv2SZ wo9g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=QEind2Jf; 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=pass (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 h2-20020a05622a170200b0031e7910acd0si4355385qtk.780.2022.07.11.07.58.13 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 11 Jul 2022 07:58:13 -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=pass header.i=@linaro.org header.s=google header.b=QEind2Jf; 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=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1]:40448 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oAurU-0003bt-Ly for patch@linaro.org; Mon, 11 Jul 2022 10:58:12 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:43266) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oAtvp-0006nw-7j for qemu-devel@nongnu.org; Mon, 11 Jul 2022 09:58:37 -0400 Received: from mail-wr1-x431.google.com ([2a00:1450:4864:20::431]:46673) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oAtve-0002ud-Sf for qemu-devel@nongnu.org; Mon, 11 Jul 2022 09:58:36 -0400 Received: by mail-wr1-x431.google.com with SMTP id v16so7100932wrd.13 for ; Mon, 11 Jul 2022 06:58:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:subject:date:message-id:in-reply-to:references:mime-version :content-transfer-encoding; bh=RcIdbbXzpewsExSM+4LX7uPRbT+xi+nVqfYtgmho4n4=; b=QEind2Jf9dCdgO4FuxMA77M1WMoHKJ21n7EvqoZNhvq5DGNRw5CJZRWz0yTMh8y3c9 kETjkJBfM6KFBD7GBkEyTNS25l//lGry3ga3+lFmZPk5B4HH9iLX8Am/0pXkywsJ2pZ7 HQFtx0YfrTArFxcXg3l4/8Ahk2monl2mAuc5/RS/e17C3QDsOrNgNTP49W8kBcoL7WV+ LsbSuxg4zrm5dEK2E3vS5jyLC69lNLGIr47PBEhwWidOLknxaa/XY4Xx+qDmyz+V8HSW 8NPza4Rz5XhPBIzviUHCtJHhkmTx4898GEIRMgzKZclY+5yMkiOqDP1t6drdt6WzzczE MKHg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=RcIdbbXzpewsExSM+4LX7uPRbT+xi+nVqfYtgmho4n4=; b=O3hPq974EGhISWg4kJFJoSsnqYa6Dfl6k7DF6Ao2kUJ++QfWxi4cswt833n0ZRp5Gk UNdywLJ7y+/T7X0z55iB26fXyV+ybfzTYNOn0HuxPIdwV1xt3HHZWua/po/Gmxu19KDc WrgdGWDIvIUJpcQmvnrpsk3N9dInSMYbS2h55QUtZKS++85vfX/sjrmFBhIzQY2ukIFC OTS4Fol2JgwFyjSMiiA/p6mozhsc9lUVz/mk/d9iHv6Yj8i4OI6IzHDWsmcKA6k69eS7 n8R4+gEInGHKucxc7o8dHkZak65Y9pmniqXZ6G/yOCqtn+HXFjPyTAKgdnbJznqB6yhy LCmA== X-Gm-Message-State: AJIora82x6Hd5SBtF1fo/0uWZ8njpoaIrc//HAiTvJ+XEVErmrx4/h+N 0ng5OQZfAPV9R/s2OE6kmyga1quJal50Qg== X-Received: by 2002:adf:fbc6:0:b0:21d:3fc3:99e with SMTP id d6-20020adffbc6000000b0021d3fc3099emr17159923wrs.550.1657547903776; Mon, 11 Jul 2022 06:58:23 -0700 (PDT) Received: from orth.archaic.org.uk (orth.archaic.org.uk. [2001:8b0:1d0::2]) by smtp.gmail.com with ESMTPSA id q123-20020a1c4381000000b00397402ae674sm7595596wma.11.2022.07.11.06.58.23 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 11 Jul 2022 06:58:23 -0700 (PDT) From: Peter Maydell To: qemu-devel@nongnu.org Subject: [PULL 38/45] linux-user/aarch64: Verify extra record lock succeeded Date: Mon, 11 Jul 2022 14:57:43 +0100 Message-Id: <20220711135750.765803-39-peter.maydell@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220711135750.765803-1-peter.maydell@linaro.org> References: <20220711135750.765803-1-peter.maydell@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::431; envelope-from=peter.maydell@linaro.org; helo=mail-wr1-x431.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, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" From: Richard Henderson Reviewed-by: Peter Maydell Signed-off-by: Richard Henderson Message-id: 20220708151540.18136-39-richard.henderson@linaro.org Signed-off-by: Peter Maydell --- linux-user/aarch64/signal.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/linux-user/aarch64/signal.c b/linux-user/aarch64/signal.c index 8fbe98d72f2..9ff79da4be0 100644 --- a/linux-user/aarch64/signal.c +++ b/linux-user/aarch64/signal.c @@ -340,6 +340,9 @@ static int target_restore_sigframe(CPUARMState *env, __get_user(extra_size, &((struct target_extra_context *)ctx)->size); extra = lock_user(VERIFY_READ, extra_datap, extra_size, 0); + if (!extra) { + return 1; + } break; default: