From patchwork Tue Jun 28 04:21:10 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 585497 Delivered-To: patch@linaro.org Received: by 2002:a05:7000:5036:0:0:0:0 with SMTP id e22csp442556mab; Mon, 27 Jun 2022 22:36:17 -0700 (PDT) X-Google-Smtp-Source: AGRyM1shaUUnbLEsws9QKHXPDLmhc1Txh36hk2A9HeRml9zwRU4NKNSeRAWMIZnkUWHwaVYNP1Ux X-Received: by 2002:ae9:ed07:0:b0:6ae:f47e:9dc7 with SMTP id c7-20020ae9ed07000000b006aef47e9dc7mr10106175qkg.95.1656394577129; Mon, 27 Jun 2022 22:36:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1656394577; cv=none; d=google.com; s=arc-20160816; b=iUie5LeLA7cl0tyDgEzx2bgf4OeR+ayXg1Jo2VFOaucLB+iJrBmDClzBbqDZo78+iy Q3PC6n7rOO3ThwvIF09vDDp0Rx8QtXDieE01JKAmL+274fhmF8eD7Y+KocnSpG+aAPgT BPZvgfz1I9A2nUZypSX1W28ZYaeQX+xFyi8ixAHdspBwZDrNyWyzDLr0XgCz7rG23GUj Dq1fTFQFyYbv0piOy8Uz8nW2hW6AeuLpT0FuHwQ440mjnSssGpv7Zp8IzBcMf7dP0pkk 4s1hsn55Yi9HnZY6e11KdZABti8SSUmRYJZifYs5hsYmr6VGdUnZy04ooxEGZQLajNC4 vvSw== 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:cc:to :from:dkim-signature; bh=jX6jS4dtrhW1QeYx18wps/PVKx5vjATldMSj/oHyJlI=; b=XRJPxd4uKpZm1wwB8qbG/AB8d+3OyoMvrcPZBAWjXdVID/l65S89l3KW24O1qPTTgm jiu2WrlU2SUN8ixIAbbcjUWKDF5mXGwc+oHQE6b5v0aBj7kI9UNwqXi5EcdNfZpMISWb 87zbIJttahetyjoMg1zWQyCA58c3alemTgMfvana3AXf7trRMZiz41/NL/mr3b4RbvXR J1a1Xcj1y/jTLLn9WsWb3N/0lqieHyY3mOZYoZE+JYSx6npAOAqyjgwnOqr7t2cwo4BL iRx8J2TOMXXdpFX5p/LlCWuTtp+Mnu+9jyE9mDZl4C/cwc2FaeJTKNAupPSqL5YC3aMC zGEg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=KkzG5unN; 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 l9-20020a05622a050900b0031777a143e3si6770939qtx.170.2022.06.27.22.36.17 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 27 Jun 2022 22:36:17 -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=KkzG5unN; 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]:44558 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1o63tY-0005oi-Kx for patch@linaro.org; Tue, 28 Jun 2022 01:36:16 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:38014) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1o62kZ-0002sL-DL for qemu-devel@nongnu.org; Tue, 28 Jun 2022 00:22:56 -0400 Received: from mail-pf1-x42f.google.com ([2607:f8b0:4864:20::42f]:41679) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1o62kX-0003nj-Jh for qemu-devel@nongnu.org; Tue, 28 Jun 2022 00:22:54 -0400 Received: by mail-pf1-x42f.google.com with SMTP id i64so10876758pfc.8 for ; Mon, 27 Jun 2022 21:22:53 -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=jX6jS4dtrhW1QeYx18wps/PVKx5vjATldMSj/oHyJlI=; b=KkzG5unNDbsqkQe32WPx+Gpnue9qZLtJai7j2WrSPKNJ2nlKuCS95wbB8M+ALIHdKx a2nFrEu2ltHiulHhzk9ihToBp9JyvOA8E8uNFKCL9ptwbzaVHcDjOw1vHG2vGIU1tHVS LqUsuqxqMCGu9DdsGBJPOOMtY/dPDDwDm3OKP3ikETCmXqbHcpLh3Q/Bmu4a6VaDzDWH FKue1db7oxu7UK/1PK9/wPSkxbK8EsLt7Wh+h7/x+7YZeD+PaMm8TW655yURXAPiibC2 jr3Di67r8SscoiAHM5Pw8kASzSJ4sdnidW+PY4+rFq9AxKUsJ+6De0Y/CzIf7bk9xJlj FVvA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=jX6jS4dtrhW1QeYx18wps/PVKx5vjATldMSj/oHyJlI=; b=UwdzmVOQJcd4hirm01Mq1Uowdzuxzrip91hlYY3bZHsTsEblanfLYMDOBi3uVgTmaX V6j0Us88A7wxV+e7LWVYtOxh4FZ+jhSzn6jXUjG1/kVJl89cYO85NLqj93fdqgPue3dX 1zV9t+TG9g4HcFd+5Ye4QYiob0LgxAPv91F4gxKALeNFSeKoxCWq7y1AMonej7m7H0Fz /fqNO25NApISMuX7JD5zQddVCxKOr39v3LIQmlm/cg0ZX3hLuUnGMDsE2LVebYMxgWQP koiRwTBu1ws12siq7AHmPx9FSZwYu4z61tUo2Ytq/IXU/p94UgW8cCzqBt5UttaVKxc3 xtdA== X-Gm-Message-State: AJIora8oqllczRLJYPeRItLpQifPz8iqGOO3FaJBNM0dHIboIQ42rqvC ZZ8vDJTxR2jMv59oGKVx1aiPxOrkKYIm9A== X-Received: by 2002:a63:149:0:b0:40c:f753:2fb0 with SMTP id 70-20020a630149000000b0040cf7532fb0mr15687906pgb.172.1656390172716; Mon, 27 Jun 2022 21:22:52 -0700 (PDT) Received: from stoup.. ([122.255.60.245]) by smtp.gmail.com with ESMTPSA id jg6-20020a17090326c600b0016a087cfad8sm7994929plb.264.2022.06.27.21.22.50 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 27 Jun 2022 21:22:52 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Cc: qemu-arm@nongnu.org Subject: [PATCH v4 38/45] linux-user/aarch64: Verify extra record lock succeeded Date: Tue, 28 Jun 2022 09:51:10 +0530 Message-Id: <20220628042117.368549-39-richard.henderson@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220628042117.368549-1-richard.henderson@linaro.org> References: <20220628042117.368549-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::42f; envelope-from=richard.henderson@linaro.org; helo=mail-pf1-x42f.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" Signed-off-by: Richard Henderson Reviewed-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 8fbe98d72f..9ff79da4be 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: