Received: by 2002:a05:7412:ba23:b0:fa:4c10:6cad with SMTP id jp35csp296111rdb; Thu, 18 Jan 2024 04:03:06 -0800 (PST) X-Google-Smtp-Source: AGHT+IFZ+zjySiD6Ry2Rxqt5Sw0Pxd3o9nJLai3OF+hG4G3MmBc2WlfdXK8I9ObnT8vj8llVWQ9b X-Received: by 2002:a05:622a:1449:b0:42a:110a:9d7a with SMTP id v9-20020a05622a144900b0042a110a9d7amr832081qtx.24.1705579386061; Thu, 18 Jan 2024 04:03:06 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1705579386; cv=pass; d=google.com; s=arc-20160816; b=VwuHUmhkdZEqLqbkn3g7/5l9eFCgzsMrk4lX57ZQcYTwd/S1aE+LISJ20csssSpNox k3j8FuhaoGU/TtjKDOzy1CEIgjtVEd8QLcVjyxur2dKQSy6zWKNflwmi4kVXuU2VqE6f oegKN7+aZ1YJGwN5UbYwiXY/Z8T5ByJia9rpIT3cebtLJzbn5qHsvUlBUAE8ZbeCLUe2 MWz/ccY144sUg03cDWwBrA2ExGmTYlhT1rNyBIZSa6HD+X0IIgo/HW6bWtNmd3ySwxcn Slvs4d9p80S0JdQsWFb9gAd+rxC/kztjlTwXjTnpUNgFLQmk8YlFme3IFY9Jqv3friaj HR+A== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=E7wjafAE9a8tWGNDvXn7/PlfW83OKh+Jl9MAbIpfyRc=; fh=nL/J4t7ugnQy99TrDb/rrvmuna7RtbMVxI3dH1jaz40=; b=a2TuRagTxfasva+ofzg9TTZX2ycQjAk/So3jcVcqgt29aaC/5exx1NbSxPRpvbO1xg rlZtPpLJLdmlp2EPduGPw4aDfEbVPHaO4uwi+qTlVjGt8hnFuZTmfVIBXRVKZkAPDvx4 gCl0kb9ZVNatS++Lj14yXNIwGch0/PLzvt0EMa5lRNwgAJgn2hI+xSmhwt2D4JcQb/lW lP4K8X+7QBZZPPec4aBdwy+p3r/XJvZs8rSshchqyHSxBmHgQT4JH315t8jlEFSHOrJP 4VWxdgplw/ku3+NDiztz3yme13Pbl7vxlyZMYRFygngTy6sUvPjqD1ajQUTcurfDTRaZ mflQ== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=qUEnWzIa; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-30075-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-30075-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id 9-20020ac85909000000b00429c5e93c3esi13475889qty.637.2024.01.18.04.03.05 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 18 Jan 2024 04:03:06 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-30075-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=qUEnWzIa; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-30075-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-30075-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id CCEEA1C20DE9 for ; Thu, 18 Jan 2024 12:03:05 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 475BB250E7; Thu, 18 Jan 2024 12:02:38 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="qUEnWzIa" Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 7165D24B4F; Thu, 18 Jan 2024 12:02:37 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1705579357; cv=none; b=rwGZWgR/9zYb7fBptjaElpPDGvVKMx7e8zSaidTYKzCEcUapRwo03mOxy5AJagb+Nc2PtScrMEKynbErIaEuNVqejD67nOr0obIbGun1pmzexqvJLWo75Cnxtj8CLRm8mO4tmCPaWAGaivDoDmBkjqFFULdQYa3976hKmErrvPg= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1705579357; c=relaxed/simple; bh=4JjInX8GTRaVqwI9r9CiIei88hE6LnBe4PZYIuppOAg=; h=Received:DKIM-Signature:From:To:Cc:Subject:Date:Message-Id: X-Mailer:In-Reply-To:References:MIME-Version:Content-Type: Content-Transfer-Encoding; b=ODUJYgfy30cJzuWy7J9DO56l9+tpaFgWhyA/MJKFRV4f4vOcLdaNAxR7GK7ORctcug7NeAJYRRLm8734y3HWc4ligsAHDYwyMPtFgWypq2WZJjkCld3nUuOmFZ+C0uxtFvnkTd888ZA0Iu7A0hDVk9Uk1R/b0J1u9cawlqqtuKQ= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=qUEnWzIa; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 57540C43390; Thu, 18 Jan 2024 12:02:35 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1705579357; bh=4JjInX8GTRaVqwI9r9CiIei88hE6LnBe4PZYIuppOAg=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=qUEnWzIaeit0wB9zixIV3kKPPCENsvoitIKnlvEGyqyNAm5qXRvPAY0eN74IeMzOj crRrZV4r8Eh9CfMDWOfFI2aydM9ZLo9F52Kv3xCzD9gTsoI3tIRMdr6VIISXkQkMtc 6nZVNANGrRndi5zTwbPywguISBqwk83iyGk4dMp7MrSXRilgS4tQDn0NZ78NnhOcj0 zf0XC+Aw5dFiWPTtrTsh+MrMgNA7uY4O/PH97jateHtmEdtwgZcdv97sUuAwlu1k1X K3bbCmcXVa5RVo8/LL2y4GFKLdSWtPUmvL80p4J4lNdtiS0khAISQcZEpepHpeZKnB YjpvcnEGgPX2A== From: Will Deacon To: Mark Brown , Catalin Marinas Cc: kernel-team@android.com, Will Deacon , stable@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Dave Martin Subject: Re: [PATCH] arm64/sme: Always exit sme_alloc() early with existing storage Date: Thu, 18 Jan 2024 12:02:25 +0000 Message-Id: <170557595437.3201963.17750438476514444044.b4-ty@kernel.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20240115-arm64-sme-flush-v1-1-7472bd3459b7@kernel.org> References: <20240115-arm64-sme-flush-v1-1-7472bd3459b7@kernel.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit On Mon, 15 Jan 2024 20:15:46 +0000, Mark Brown wrote: > When sme_alloc() is called with existing storage and we are not flushing we > will always allocate new storage, both leaking the existing storage and > corrupting the state. Fix this by separating the checks for flushing and > for existing storage as we do for SVE. > > Callers that reallocate (eg, due to changing the vector length) should > call sme_free() themselves. > > [...] Applied to arm64 (for-next/core), thanks! [1/1] arm64/sme: Always exit sme_alloc() early with existing storage https://git.kernel.org/arm64/c/dc7eb8755797 Cheers, -- Will https://fixes.arm64.dev https://next.arm64.dev https://will.arm64.dev