Skip to content

Commit 29cfe99

Browse files
committed
arm64: errata: Mitigate TLBI errata on various Arm CPUs
cve cve-2025-10263 commit-author Mark Rutland <mark.rutland@arm.com> commit - commit-source-sha cfd391e commit-source arm64 upstream-diff silicon-errata.rst at different path (Documentation/arm64/ vs Documentation/arch/arm64/) and required manual conflict resolution due to condensed table formatting and missing entries in our branch. Content is identical. On 4.18, arm64_repeat_tlbi_cpus[] is a flat struct midr_range array, not struct arm64_cpu_capabilities[]. Upstream uses a nested ERRATA_MIDR_RANGE_LIST() with inline array initialization, which sets .type, .matches, and .midr_range_list fields that do not exist on struct midr_range. Flattened to direct MIDR_ALL_VERSIONS() entries in the array. A number of CPUs developed by Arm suffer from errata whereby a broadcast TLBI;DSB sequence may complete before the global observation of writes which are translated by an affected TLB entry. These errata ONLY affect the completion of memory accesses which have been translated by an invalidated TLB entry, and these errata DO NOT affect the actual invalidation of TLB entries. TLB entries are removed correctly. This issue has been assigned CVE ID CVE-2025-10263. To mitigate this issue, Arm recommends that software follows any affected TLBI;DSB sequence with an additional TLBI;DSB, which will ensure that all memory write effects affected by the first TLBI have been globally observed. The additional TLBI can use any operation that is broadcast to affected CPUs, and the additional DSB can use any option that is sufficient to complete the additional TLBI. The ARM64_WORKAROUND_REPEAT_TLBI workaround is sufficient to mitigate the issue. Enable this workaround for affected CPUs, and update the silicon errata documentation accordingly. Note that due to the manner in which Arm develops IP and tracks errata, some CPUs share a common erratum number. Signed-off-by: Mark Rutland <mark.rutland@arm.com> Cc: Catalin Marinas <catalin.marinas@arm.com> Cc: Will Deacon <will@kernel.org> Signed-off-by: Will Deacon <will@kernel.org> (cherry picked from commit cfd391e) Signed-off-by: Jonathan Maple <jmaple@ciq.com> (cherry picked from commit a96d5f4) Signed-off-by: Jonathan Maple <jmaple@ciq.com> add to arm64: errata: Mitigate TLBI arm64: errata: Mitigate TLBI errata on various Arm CPUs cve cve-2025-10263 commit-author Mark Rutland <mark.rutland@arm.com> commit - commit-source-sha cfd391e commit-source arm64 upstream-diff silicon-errata.rst at different path (Documentation/arm64/ vs Documentation/arch/arm64/) and required manual conflict resolution due to condensed table formatting and missing entries in our branch. A number of CPUs developed by Arm suffer from errata whereby a broadcast TLBI;DSB sequence may complete before the global observation of writes which are translated by an affected TLB entry. These errata ONLY affect the completion of memory accesses which have been translated by an invalidated TLB entry, and these errata DO NOT affect the actual invalidation of TLB entries. TLB entries are removed correctly. This issue has been assigned CVE ID CVE-2025-10263. To mitigate this issue, Arm recommends that software follows any affected TLBI;DSB sequence with an additional TLBI;DSB, which will ensure that all memory write effects affected by the first TLBI have been globally observed. The additional TLBI can use any operation that is broadcast to affected CPUs, and the additional DSB can use any option that is sufficient to complete the additional TLBI. The ARM64_WORKAROUND_REPEAT_TLBI workaround is sufficient to mitigate the issue. Enable this workaround for affected CPUs, and update the silicon errata documentation accordingly. Note that due to the manner in which Arm develops IP and tracks errata, some CPUs share a common erratum number. Signed-off-by: Mark Rutland <mark.rutland@arm.com> Cc: Catalin Marinas <catalin.marinas@arm.com> Cc: Will Deacon <will@kernel.org> Signed-off-by: Will Deacon <will@kernel.org> (cherry picked from commit cfd391e) Signed-off-by: Jonathan Maple <jmaple@ciq.com> (cherry picked from commit a96d5f4) Signed-off-by: Jonathan Maple <jmaple@ciq.com>
1 parent e17d0a3 commit 29cfe99

1 file changed

Lines changed: 27 additions & 22 deletions

File tree

arch/arm64/kernel/cpu_errata.c

Lines changed: 27 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -686,27 +686,32 @@ static const struct arm64_cpu_capabilities arm64_repeat_tlbi_list[] = {
686686
},
687687
#endif
688688
#ifdef CONFIG_ARM64_ERRATUM_4118414
689-
MIDR_ALL_VERSIONS(MIDR_C1_PREMIUM),
690-
MIDR_ALL_VERSIONS(MIDR_C1_ULTRA),
691-
MIDR_ALL_VERSIONS(MIDR_CORTEX_A76),
692-
MIDR_ALL_VERSIONS(MIDR_CORTEX_A76AE),
693-
MIDR_ALL_VERSIONS(MIDR_CORTEX_A77),
694-
MIDR_ALL_VERSIONS(MIDR_CORTEX_A78),
695-
MIDR_ALL_VERSIONS(MIDR_CORTEX_A78AE),
696-
MIDR_ALL_VERSIONS(MIDR_CORTEX_A78C),
697-
MIDR_ALL_VERSIONS(MIDR_CORTEX_A710),
698-
MIDR_ALL_VERSIONS(MIDR_CORTEX_X1),
699-
MIDR_ALL_VERSIONS(MIDR_CORTEX_X1C),
700-
MIDR_ALL_VERSIONS(MIDR_CORTEX_X2),
701-
MIDR_ALL_VERSIONS(MIDR_CORTEX_X3),
702-
MIDR_ALL_VERSIONS(MIDR_CORTEX_X4),
703-
MIDR_ALL_VERSIONS(MIDR_CORTEX_X925),
704-
MIDR_ALL_VERSIONS(MIDR_NEOVERSE_N1),
705-
MIDR_ALL_VERSIONS(MIDR_NEOVERSE_N2),
706-
MIDR_ALL_VERSIONS(MIDR_NEOVERSE_V1),
707-
MIDR_ALL_VERSIONS(MIDR_NEOVERSE_V2),
708-
MIDR_ALL_VERSIONS(MIDR_NEOVERSE_V3),
709-
MIDR_ALL_VERSIONS(MIDR_NEOVERSE_V3AE),
689+
{
690+
ERRATA_MIDR_RANGE_LIST(((const struct midr_range[]) {
691+
MIDR_ALL_VERSIONS(MIDR_C1_PREMIUM),
692+
MIDR_ALL_VERSIONS(MIDR_C1_ULTRA),
693+
MIDR_ALL_VERSIONS(MIDR_CORTEX_A76),
694+
MIDR_ALL_VERSIONS(MIDR_CORTEX_A76AE),
695+
MIDR_ALL_VERSIONS(MIDR_CORTEX_A77),
696+
MIDR_ALL_VERSIONS(MIDR_CORTEX_A78),
697+
MIDR_ALL_VERSIONS(MIDR_CORTEX_A78AE),
698+
MIDR_ALL_VERSIONS(MIDR_CORTEX_A78C),
699+
MIDR_ALL_VERSIONS(MIDR_CORTEX_A710),
700+
MIDR_ALL_VERSIONS(MIDR_CORTEX_X1),
701+
MIDR_ALL_VERSIONS(MIDR_CORTEX_X1C),
702+
MIDR_ALL_VERSIONS(MIDR_CORTEX_X2),
703+
MIDR_ALL_VERSIONS(MIDR_CORTEX_X3),
704+
MIDR_ALL_VERSIONS(MIDR_CORTEX_X4),
705+
MIDR_ALL_VERSIONS(MIDR_CORTEX_X925),
706+
MIDR_ALL_VERSIONS(MIDR_NEOVERSE_N1),
707+
MIDR_ALL_VERSIONS(MIDR_NEOVERSE_N2),
708+
MIDR_ALL_VERSIONS(MIDR_NEOVERSE_V1),
709+
MIDR_ALL_VERSIONS(MIDR_NEOVERSE_V2),
710+
MIDR_ALL_VERSIONS(MIDR_NEOVERSE_V3),
711+
MIDR_ALL_VERSIONS(MIDR_NEOVERSE_V3AE),
712+
{}
713+
})),
714+
},
710715
#endif
711716
{},
712717
};
@@ -861,7 +866,7 @@ const struct arm64_cpu_capabilities arm64_errata[] = {
861866
{
862867
/* Cortex-A57 r0p0 - r1p2 */
863868
.desc = "ARM erratum 834220",
864-
.capability = ARM64_WORKAROUND_834220,
869+
.capability = ARM64_WORKA/UND_834220,
865870
ERRATA_MIDR_RANGE(MIDR_CORTEX_A57,
866871
0, 0,
867872
1, 2),

0 commit comments

Comments
 (0)