Received: by 2002:a05:6358:7058:b0:131:369:b2a3 with SMTP id 24csp9941426rwp; Thu, 20 Jul 2023 12:03:11 -0700 (PDT) X-Google-Smtp-Source: APBJJlGMdQzS4THyZCFkUXuPB063cKbJZQzEhHKbygg1hPm/ku8ubv2jAub0UJBpWzI1lk7+hc3T X-Received: by 2002:a05:6402:1a49:b0:51e:34d5:a23f with SMTP id bf9-20020a0564021a4900b0051e34d5a23fmr6309248edb.23.1689879790656; Thu, 20 Jul 2023 12:03:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1689879790; cv=none; d=google.com; s=arc-20160816; b=J36Qc+3MG4hDYu+HwIdJg8vCyFuVeKFlu+qbEMaZSx7AjI46gNDnelcKckLWyKFUlt 0YphJbH/bIDRqyBhaq9bsey1q+VIC2Q7V5Z4+RX38paizq7foFhqxxn1Q1vBmeSOZ6b5 BDIfwDebUlBaSm1Wy9OfuwGXuypwC0Skx1EU6YhV/QLok5uwT/ziEexNX8se7VI7Yw+q fGTw191jpa4OdwZAg7R7UNRsa4Ddc+JE6xs7jvfme53kRrSQF+5GYJwqE9aNyHF7toAZ 3BxXVGwhhhH2gkncobmqDkIkR9tMCEfm20B4lLRI130GLOXUAb/Qzm01zLDvwLDcnIzf HbOg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:content-transfer-encoding:mime-version :message-id:date:subject:from:dkim-signature; bh=Enj6fhfJSLke7KV2wkeGQ4dpZc/g65qfIj+wLNjWidY=; fh=eAwvipdyyyYdmsySDyKsFrOCIxDGQqxuKlB9C5LjGoQ=; b=n8fYOGEnvsQedxrCYmv6xgVRf978Cy5h/PrrZ2QDwJiCe8M4IiK1nPRGtEows4G7yv E97b3kVuFB+TL7YZzHBahGsM99dry+iHGI6XpoSpBrAN6yv34cDjF1fOR9tLu9o8oOgM m0tnsBK7x3Ro1Oyy40ZYULIaHRWvLjPNLbwz1IXRdXW7FIor9qb3bAryO4SEMQdbURuO L+hbrAb87qENFGXv/Mts8upd79wo1glDJxog4gkDWk5jSh2SXMfpETd2QJ90oGIPd5yT TwCB2yfr/yf4PLHqTVphgLKNZgf1d0fKdMK6qHYX/7Zo0iyTrIPtwEVOv7mq1YeIOjHf o3kg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=Ewmy2d4C; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id d6-20020aa7c1c6000000b0051e1837d5c8si1182155edp.394.2023.07.20.12.02.45; Thu, 20 Jul 2023 12:03:10 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=Ewmy2d4C; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229805AbjGTSjQ (ORCPT + 99 others); Thu, 20 Jul 2023 14:39:16 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40902 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232144AbjGTSjN (ORCPT ); Thu, 20 Jul 2023 14:39:13 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9D28CE47; Thu, 20 Jul 2023 11:39:09 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 0150661BDC; Thu, 20 Jul 2023 18:39:09 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id DABCDC433C8; Thu, 20 Jul 2023 18:39:05 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1689878348; bh=8e4Akz9WsSzK3omseih/f3BlHrS7YZVf/pCD/Nyk1eQ=; h=From:Subject:Date:To:Cc:From; b=Ewmy2d4CrOmRkGnbIlFIwR646fvj+Mc70TquhXJF7AezIplBXG+Cds6X39iY69S3x k6+LNcLz1Pth3g8qDfKqAY92whF5WvvPT0pP+EjW2L/0vQ1ISHugJcGMypVfCwkd7G A9fykN3xwBbWkcNyqLl6/fNZ1oY2VnoT+WVsvuPk4CAGBi9V2TR2+GmLFOIr8FAzBs BRz291uQbbj2Ep4ooVtwr/plEdTmrh5Vl0mUr+HPYuP9rAP+IKQ1A4mRfh3YAw/uQi jraTu5Y3xct0CZdLt5Jhqp7KA9bQ7sNahsY8bZx2tHHiLRdoG1yvQNTjQFVOZBjqNa KS3oEQbsx7D5A== From: Mark Brown Subject: [PATCH v2 0/3] arm64/fpsimd: Fix use after free in SME when changing SVE VL Date: Thu, 20 Jul 2023 19:38:57 +0100 Message-Id: <20230720-arm64-fix-sve-sme-vl-change-v2-0-8eea06b82d57@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit X-B4-Tracking: v=1; b=H4sIAEF/uWQC/42NQQ6CMBBFr0Jm7ZhOS4q68h6GRbUDNAI1U9NoC He3Eg/g8v28vL9AYgmc4FQtIJxDCnEuoHcV3AY394zBFwattFENGXQy2Rq78MKUGdPEmEf8qVb xlTpnXaMaKIWHcBG3+qUtPIT0jPLezjJ91/+6mVAh6aP3B0tUkznfWWYe91F6aNd1/QDz9Rv8x wAAAA== To: Catalin Marinas , Will Deacon , Shuah Khan Cc: David Spickett , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-kselftest@vger.kernel.org, Mark Brown , stable@vger.kernel.org X-Mailer: b4 0.13-dev-099c9 X-Developer-Signature: v=1; a=openpgp-sha256; l=1137; i=broonie@kernel.org; h=from:subject:message-id; bh=8e4Akz9WsSzK3omseih/f3BlHrS7YZVf/pCD/Nyk1eQ=; b=owEBbQGS/pANAwAKASTWi3JdVIfQAcsmYgBkuX9GAwk8cEP4Cn+OXwPxHcGTGJ7cz3SxsouNWVRq N3lFxD6JATMEAAEKAB0WIQSt5miqZ1cYtZ/in+ok1otyXVSH0AUCZLl/RgAKCRAk1otyXVSH0GV2B/ wJ+AgIoXIuJXZ/qt5peMxjTojQ6I7eEnXd+mopSLM46ZK2Mfhh04sfNMkwFFgMGWja4sN4Zl98st9Y 1yt6eY2A+ScPHWnnKatZd/1k3s+mooNA9ic34Em0+KyLx62ZJA1Gwg25CyQN7Yh8zwfyNJwZV2FPTV TT0ply8+G4pehCpqMGuSnQZ+YZgml1j5hsbxCRoagBEp5jwY4jnHTJBLTIkfmf4IkcpDESDRLwIF03 s0pBC5vfiUz7D1af1qPKgqoPki3UPZe3Vxw8gByxqU4Z4tNK0EvesulJlbHUuECM/ua95UJbFFv35W LWznzerBRZXmcIGf6CKkwix/pFHAp1 X-Developer-Key: i=broonie@kernel.org; a=openpgp; fpr=3F2568AAC26998F9E813A1C5C3F436CA30F5D8EB X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF, RCVD_IN_DNSWL_BLOCKED,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This series fixes an issue which David Spickett found where if we change the SVE VL while SME is in use we can end up attempting to save state to an unallocated buffer and adds testing coverage for that plus a bit more coverage of VL changes, just for paranioa. Signed-off-by: Mark Brown --- Changes in v2: - Always reallocate the SVE state. - Rebase onto v6.5-rc2. - Link to v1: https://lore.kernel.org/r/20230713-arm64-fix-sve-sme-vl-change-v1-0-129dd8611413@kernel.org --- Mark Brown (3): arm64/fpsimd: Ensure SME storage is allocated after SVE VL changes kselftest/arm64: Add a test case for SVE VL changes with SME active kselftest/arm64: Validate that changing one VL type does not affect another arch/arm64/kernel/fpsimd.c | 33 +++++-- tools/testing/selftests/arm64/fp/vec-syscfg.c | 127 +++++++++++++++++++++++++- 2 files changed, 148 insertions(+), 12 deletions(-) --- base-commit: 06785562d1b99ff6dc1cd0af54be5e3ff999dc02 change-id: 20230713-arm64-fix-sve-sme-vl-change-60eb1fa6a707 Best regards, -- Mark Brown