From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id EDB47C3DA7D for ; Tue, 27 Dec 2022 17:13:58 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:Cc:To:In-Reply-To:References:Message-Id :MIME-Version:Subject:Date:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=dl9XarBki4dnHRqzceI0sGJPogrTM/tpx8bao6wyS6Q=; b=yAA11FhrxlA4bb Pda0U8DDKCJWtUqOvR/ys0J6WQKfiTPRHBLpnVXpPJdStp2DBN/wDJyGoB8WwoqPUmqbxpMN6TqDb iOW2jlidNzbbaKByYkLeRYDKH8YxLFnJpbOaJb5vdmIHNyysRhSWJE4xBOfvl8n3dcl4UH4ZH2Fj7 6c9jgzFTY5VeLyNUGt5l0cU5Z0DifTTBQs6dLNVCpSoD2jin18apogFE0TaL1ZsHAdfWLLfjJk27Q 3GK62MMULbk3zjYtRzsDgNyWJ1vWWOks8QXvE5D0MH0pCOp1d/qebOkDQAnav/ji35yA6NB69Maow NO4KglvLMJT8UwBqwO1w==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1pADVT-00Eom3-VN; Tue, 27 Dec 2022 17:12:52 +0000 Received: from dfw.source.kernel.org ([2604:1380:4641:c500::1]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1pADUu-00EoTr-K6 for linux-arm-kernel@lists.infradead.org; Tue, 27 Dec 2022 17:12:18 +0000 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 36B8B611BB; Tue, 27 Dec 2022 17:12:16 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 07699C433F1; Tue, 27 Dec 2022 17:12:14 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1672161136; bh=y3164RAa4GAJK+ExZ2/S3KK+MOI4ibggAts6atd3mYQ=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=sVn7GqyoQ5m+Gfp85YWXlOSOCt5/w+V6ljZ0awnFB3ED5BeaAbBjWusCNavqwmKR3 gGcw6yPuyRK1SrTqyI47CEjVMaF5u/zH3tInsGgmwQwX3R0u2IdLeyW523qRzE2hZe Ab1jk091gwIsQ+XwC4ebCgt7kLm9vFEJ9ZnJ/u+ouxLrzHNlgZTJo5jYBqwUSEsnxZ Xnt58Keyf3OZYx0HP9MLYDJuVv9KeEiJdXRQY3qqpyrERkhBkzSiNMMlc2bl1M/3rk GIsoXLlFzG4sO5UbTC8ZHfghxAtV0O5CYvfZmNZjkTws1Zu9/dcWICaRzlwTOyMnX6 sE95Pkwo31FrA== From: Mark Brown Date: Tue, 27 Dec 2022 17:12:05 +0000 Subject: [PATCH 2/3] arm64/signal: Always accept SVE signal frames on SME only systems MIME-Version: 1.0 Message-Id: <20221223-arm64-fix-sme-only-v1-2-938d663f69e5@kernel.org> References: <20221223-arm64-fix-sme-only-v1-0-938d663f69e5@kernel.org> In-Reply-To: <20221223-arm64-fix-sme-only-v1-0-938d663f69e5@kernel.org> To: Catalin Marinas , Will Deacon Cc: linux-arm-kernel@lists.infradead.org, Mark Brown X-Mailer: b4 0.12-dev-7ab1d X-Developer-Signature: v=1; a=openpgp-sha256; l=1269; i=broonie@kernel.org; h=from:subject:message-id; bh=y3164RAa4GAJK+ExZ2/S3KK+MOI4ibggAts6atd3mYQ=; b=owEBbQGS/pANAwAKASTWi3JdVIfQAcsmYgBjqydqhtQIszq22xdCXjoJTHwJyvYprg0Y0ON6zDxu ehF/jDWJATMEAAEKAB0WIQSt5miqZ1cYtZ/in+ok1otyXVSH0AUCY6snagAKCRAk1otyXVSH0G7GB/ 9iYX+AqsxuUWyx6RqFLx5GJK4gp8cJx7m55yY7GmmynfrulN16D3ugyHKv4ELMGe8Rbyxq3vn9W9XC WL9wXjPzYlVjI/JivhHPgGgQgKWp2L7hfKdClQOpK4gmpHLKkrzqhXcuWUogMQWeXuomGSwmkPUpvZ EHq0A73dnF3up8InXkiawaa3+sjVlLbp5NxLWM+QhnjaWjlbr/+70CtrizDrZod1p6TnxDWXiIH7CV Sd8E4cJNUCdxo15TFUF/ON7wvlrV6vS9Vu9sPOrn+/dv2WfPturjw9ITaufCC4Q9or+ZBaxJQMiKML m+xE15S3hBHSguxITTN2EoJonDa9d4 X-Developer-Key: i=broonie@kernel.org; a=openpgp; fpr=3F2568AAC26998F9E813A1C5C3F436CA30F5D8EB X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20221227_091216_873567_F20DF491 X-CRM114-Status: GOOD ( 14.23 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Currently we reject an attempt to restore a SVE signal frame on a system with SME but not SVE supported. This means that it is not possible to disable streaming mode via signal return as this is configured via the flags in the SVE signal context. Instead accept the signal frame, we will require it to have a vector length of 0 specified and no payload since the task will have no SVE vector length configured. Fixes: 85ed24dad29 ("arm64/sme: Implement streaming SVE signal handling") Signed-off-by: Mark Brown --- arch/arm64/kernel/signal.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/arch/arm64/kernel/signal.c b/arch/arm64/kernel/signal.c index e0d09bf5b01b..f90ee2dc413c 100644 --- a/arch/arm64/kernel/signal.c +++ b/arch/arm64/kernel/signal.c @@ -281,7 +281,12 @@ static int restore_sve_fpsimd_context(struct user_ctxs *user) vl = task_get_sme_vl(current); } else { - if (!system_supports_sve()) + /* + * A SME only system use SVE for streaming mode so can + * have a SVE formatted context with a zero VL and no + * payload data. + */ + if (!system_supports_sve() && !system_supports_sme()) return -EINVAL; vl = task_get_sve_vl(current); -- 2.30.2 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel