Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by smtp.subspace.kernel.org (Postfix) with ESMTP id E2E79EADA for ; Fri, 9 Aug 2024 10:09:45 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=217.140.110.172 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1723198187; cv=none; b=P/GrGeyTONmxjDhwHVkKm3/A7bmYlxIqDD95rdprVx+A7QXxmlzoY+7Owne5Oq2H7jwcq00RayYCevWe80Jk70dqG9m763AA0sg8c2LcG6NBS9UkQ9cxGQFnI3Cw4HBcTF8JHRIDjAU5UVIyqrG3VUYK2W8QpPyTdOUzHEGCbOg= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1723198187; c=relaxed/simple; bh=VUjlZUfZHLR1o7dLoK+6Oq8kMdduC6p7dLn2hjx21tA=; h=From:To:Cc:Subject:Date:Message-Id:MIME-Version; b=WdfK5yMOdWMUsiQOFsOO9nQSc0lYc0ZvaXFA2oUJs0+cnPcR1X+6+yJukrveB/XNq7106Co+J+J3aV6dwMPzbEAg4kWY1OcxZJeTw82h4XqfWolvyWj9TT3/UxHKD1ZbYGaXpTMJTTH3YuQH/4SIVjaCg6DtArdff/r+EN6D8dw= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=arm.com; spf=pass smtp.mailfrom=arm.com; arc=none smtp.client-ip=217.140.110.172 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=arm.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=arm.com Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 0726F13D5; Fri, 9 Aug 2024 03:10:11 -0700 (PDT) Received: from lakrids.cambridge.arm.com (usa-sjc-imap-foss1.foss.arm.com [10.121.207.14]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id AA58A3F766; Fri, 9 Aug 2024 03:09:43 -0700 (PDT) From: Mark Rutland To: stable@vger.kernel.org Cc: anshuman.khandual@arm.com, bwicaksono@nvidia.com, catalin.marinas@arm.com, james.clark@arm.com, james.morse@arm.com, mark.rutland@arm.com, suzuki.poulose@arm.com, will@kernel.org Subject: [PATCH 5.15.y 00/14] arm64: errata: Speculative SSBS workaround Date: Fri, 9 Aug 2024 11:09:20 +0100 Message-Id: <20240809100934.3477192-1-mark.rutland@arm.com> X-Mailer: git-send-email 2.30.2 Precedence: bulk X-Mailing-List: stable@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Hi, This series is a v5.15-only backport (based on v5.15.164) of the upstream workaround for SSBS errata on Arm Ltd CPUs, as affected parts are likely to be used with stable kernels. This does not apply to earlier stable trees, which will receive a separate backport. The errata mean that an MSR to the SSBS special-purpose register does not affect subsequent speculative instructions, permitting speculative store bypassing for a window of time. The upstream support was original posted as: * https://lore.kernel.org/linux-arm-kernel/20240508081400.235362-1-mark.rutland@arm.com/ "arm64: errata: Add workaround for Arm errata 3194386 and 3312417" Present in v6.10 * https://lore.kernel.org/linux-arm-kernel/20240603111812.1514101-1-mark.rutland@arm.com/ "arm64: errata: Expand speculative SSBS workaround" Present in v6.11-rc1 * https://lore.kernel.org/linux-arm-kernel/20240801101803.1982459-1-mark.rutland@arm.com/ "arm64: errata: Expand speculative SSBS workaround (again)" Present in v6.11-rc2 This backport applies the patches which are not present in v5.15.y, and as prerequisites backports HWCAP detection based on user-visible id register values, the addition of Neoverse-V2 MIDR values, and the restoration of the spec_bar() macro. I have tested the backport (when applied to v5.15.164), ensuring that the detection logic works and that the HWCAP and string in /proc/cpuinfo are both hidden when the relevant errata are detected. Mark. Besar Wicaksono (1): arm64: Add Neoverse-V2 part James Morse (1): arm64: cpufeature: Force HWCAP to be based on the sysreg visible to user-space Mark Rutland (12): arm64: barrier: Restore spec_bar() macro arm64: cputype: Add Cortex-X4 definitions arm64: cputype: Add Neoverse-V3 definitions arm64: errata: Add workaround for Arm errata 3194386 and 3312417 arm64: cputype: Add Cortex-X3 definitions arm64: cputype: Add Cortex-A720 definitions arm64: cputype: Add Cortex-X925 definitions arm64: errata: Unify speculative SSBS errata logic arm64: errata: Expand speculative SSBS workaround arm64: cputype: Add Cortex-X1C definitions arm64: cputype: Add Cortex-A725 definitions arm64: errata: Expand speculative SSBS workaround (again) Documentation/arm64/silicon-errata.rst | 36 +++++++++++++++++++ arch/arm64/Kconfig | 38 ++++++++++++++++++++ arch/arm64/include/asm/barrier.h | 4 +++ arch/arm64/include/asm/cputype.h | 16 +++++++++ arch/arm64/kernel/cpu_errata.c | 31 +++++++++++++++++ arch/arm64/kernel/cpufeature.c | 48 ++++++++++++++++++++++---- arch/arm64/kernel/proton-pack.c | 12 +++++++ arch/arm64/tools/cpucaps | 1 + 8 files changed, 179 insertions(+), 7 deletions(-) -- 2.30.2