From nobody Thu Nov 28 00:34:34 2024 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 8CE511D2F70; Mon, 7 Oct 2024 12:20:40 +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=1728303642; cv=none; b=tkjEDyBWz3akUKDDUY5Gxpu2HV7vW22t/6P4h0L1NEuh6U4sz50O3WACtVtDoqlt+bdKLNvqHjjwu0dmFAMNr+/X2UaCyrvWFRHLEKRtdl2eS+9cIT/5hLMHD2ZQHV3nIxR3+RnV+pz6/2nPi9d82Tr1hwtBSIhvnyIPnIcwMU4= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1728303642; c=relaxed/simple; bh=jLwEKllM/sb6JWUEG11kxHlbe/nOhGNsO6vcVWEhSns=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=VrngtZ7fU4UfZXFQdRBmAkr4Yy4uJ6eWF5BSZ3QLP2YomJ+F9U4iTPfFlte4cK/JP12eMEbKrbRLvLu5q6Fp626X+FDdF8msDqALFwiQ9Xm4JfCcC8HyxIi2PX+HCGuR8Z8LZFf/25A9fz+rS3MwujugojOXF38xYGrF6+PWKQc= 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 8AEAAFEC; Mon, 7 Oct 2024 05:21:09 -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 9A6333F640; Mon, 7 Oct 2024 05:20:38 -0700 (PDT) From: Mark Rutland To: stable@vger.kernel.org Cc: anshuman.khandual@arm.com, catalin.marinas@arm.com, james.morse@arm.com, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, mark.rutland@arm.com, suzuki.poulose@arm.com, will@kernel.org Subject: [PATCH 4.19 3/3] arm64: errata: Expand speculative SSBS workaround once more Date: Mon, 7 Oct 2024 13:20:28 +0100 Message-Id: <20241007122028.548836-4-mark.rutland@arm.com> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20241007122028.548836-1-mark.rutland@arm.com> References: <20241007122028.548836-1-mark.rutland@arm.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" [ Upstream commit 081eb7932c2b244f63317a982c5e3990e2c7fbdd ] A number of Arm Ltd CPUs suffer from errata whereby an MSR to the SSBS special-purpose register does not affect subsequent speculative instructions, permitting speculative store bypassing for a window of time. We worked around this for a number of CPUs in commits: * 7187bb7d0b5c7dfa ("arm64: errata: Add workaround for Arm errata 3194386 a= nd 3312417") * 75b3c43eab594bfb ("arm64: errata: Expand speculative SSBS workaround") * 145502cac7ea70b5 ("arm64: errata: Expand speculative SSBS workaround (aga= in)") Since then, a (hopefully final) batch of updates have been published, with two more affected CPUs. For the affected CPUs the existing mitigation is sufficient, as described in their respective Software Developer Errata Notice (SDEN) documents: * Cortex-A715 (MP148) SDEN v15.0, erratum 3456084 https://developer.arm.com/documentation/SDEN-2148827/1500/ * Neoverse-N3 (MP195) SDEN v5.0, erratum 3456111 https://developer.arm.com/documentation/SDEN-3050973/0500/ Enable the existing mitigation by adding the relevant MIDRs to erratum_spec_ssbs_list, and update silicon-errata.rst and the Kconfig text accordingly. Signed-off-by: Mark Rutland Cc: James Morse Cc: Will Deacon Link: https://lore.kernel.org/r/20240930111705.3352047-3-mark.rutland@arm.c= om Signed-off-by: Catalin Marinas [ Mark: fix conflict in silicon-errata.rst, handle move and rename ] Signed-off-by: Mark Rutland --- Documentation/arm64/silicon-errata.txt | 2 ++ arch/arm64/Kconfig | 2 ++ arch/arm64/kernel/cpu_errata.c | 2 ++ 3 files changed, 6 insertions(+) diff --git a/Documentation/arm64/silicon-errata.txt b/Documentation/arm64/s= ilicon-errata.txt index eab3b0cf0dbe9..a67ba12ffa035 100644 --- a/Documentation/arm64/silicon-errata.txt +++ b/Documentation/arm64/silicon-errata.txt @@ -66,6 +66,7 @@ stable kernels. | ARM | Cortex-A78 | #3324344 | ARM64_ERRATUM_31943= 86 | | ARM | Cortex-A78C | #3324346,3324347| ARM64_ERRATUM_31943= 86 | | ARM | Cortex-A710 | #3324338 | ARM64_ERRATUM_31943= 86 | +| ARM | Cortex-A715 | #3456084 | ARM64_ERRATUM_31943= 86 | | ARM | Cortex-A720 | #3456091 | ARM64_ERRATUM_31943= 86 | | ARM | Cortex-A725 | #3456106 | ARM64_ERRATUM_31943= 86 | | ARM | Cortex-X1 | #3324344 | ARM64_ERRATUM_31943= 86 | @@ -77,6 +78,7 @@ stable kernels. | ARM | Neoverse-N1 | #1542419 | ARM64_ERRATUM_15424= 19 | | ARM | Neoverse-N1 | #3324349 | ARM64_ERRATUM_31943= 86 | | ARM | Neoverse-N2 | #3324339 | ARM64_ERRATUM_31943= 86 | +| ARM | Neoverse-N3 | #3456111 | ARM64_ERRATUM_31943= 86 | | ARM | Neoverse-V1 | #3324341 | ARM64_ERRATUM_31943= 86 | | ARM | Neoverse-V2 | #3324336 | ARM64_ERRATUM_31943= 86 | | ARM | Neoverse-V3 | #3312417 | ARM64_ERRATUM_31943= 86 | diff --git a/arch/arm64/Kconfig b/arch/arm64/Kconfig index 15c7a2b6e491e..5fa1b1d3172e9 100644 --- a/arch/arm64/Kconfig +++ b/arch/arm64/Kconfig @@ -543,6 +543,7 @@ config ARM64_ERRATUM_3194386 * ARM Cortex-A78C erratum 3324346 * ARM Cortex-A78C erratum 3324347 * ARM Cortex-A710 erratam 3324338 + * ARM Cortex-A715 errartum 3456084 * ARM Cortex-A720 erratum 3456091 * ARM Cortex-A725 erratum 3456106 * ARM Cortex-X1 erratum 3324344 @@ -553,6 +554,7 @@ config ARM64_ERRATUM_3194386 * ARM Cortex-X925 erratum 3324334 * ARM Neoverse-N1 erratum 3324349 * ARM Neoverse N2 erratum 3324339 + * ARM Neoverse-N3 erratum 3456111 * ARM Neoverse-V1 erratum 3324341 * ARM Neoverse V2 erratum 3324336 * ARM Neoverse-V3 erratum 3312417 diff --git a/arch/arm64/kernel/cpu_errata.c b/arch/arm64/kernel/cpu_errata.c index e87f8d60075d7..a92530a8d7fcd 100644 --- a/arch/arm64/kernel/cpu_errata.c +++ b/arch/arm64/kernel/cpu_errata.c @@ -714,6 +714,7 @@ static const struct midr_range erratum_spec_ssbs_list[]= =3D { MIDR_ALL_VERSIONS(MIDR_CORTEX_A78), MIDR_ALL_VERSIONS(MIDR_CORTEX_A78C), MIDR_ALL_VERSIONS(MIDR_CORTEX_A710), + MIDR_ALL_VERSIONS(MIDR_CORTEX_A715), MIDR_ALL_VERSIONS(MIDR_CORTEX_A720), MIDR_ALL_VERSIONS(MIDR_CORTEX_A725), MIDR_ALL_VERSIONS(MIDR_CORTEX_X1), @@ -724,6 +725,7 @@ static const struct midr_range erratum_spec_ssbs_list[]= =3D { MIDR_ALL_VERSIONS(MIDR_CORTEX_X925), MIDR_ALL_VERSIONS(MIDR_NEOVERSE_N1), MIDR_ALL_VERSIONS(MIDR_NEOVERSE_N2), + MIDR_ALL_VERSIONS(MIDR_NEOVERSE_N3), MIDR_ALL_VERSIONS(MIDR_NEOVERSE_V1), MIDR_ALL_VERSIONS(MIDR_NEOVERSE_V2), MIDR_ALL_VERSIONS(MIDR_NEOVERSE_V3), --=20 2.30.2