Skip to content

Commit 834d01a

Browse files
committed
arm64: errata: Add newer ARM cores to the spectre_bhb_loop_affected() lists
JIRA: https://issues.redhat.com/browse/RHEL-119900 commit a595138 Author: Douglas Anderson <dianders@chromium.org> Date: Tue, 7 Jan 2025 12:06:02 -0800 arm64: errata: Add newer ARM cores to the spectre_bhb_loop_affected() lists When comparing to the ARM list [1], it appears that several ARM cores were missing from the lists in spectre_bhb_loop_affected(). Add them. NOTE: for some of these cores it may not matter since other ways of clearing the BHB may be used (like the CLRBHB instruction or ECBHB), but it still seems good to have all the info from ARM's whitepaper included. [1] https://developer.arm.com/Arm%20Security%20Center/Spectre-BHB Fixes: 558c303 ("arm64: Mitigate spectre style branch history side channels") Cc: stable@vger.kernel.org Signed-off-by: Douglas Anderson <dianders@chromium.org> Reviewed-by: James Morse <james.morse@arm.com> Link: https://lore.kernel.org/r/20250107120555.v4.5.I4a9a527e03f663040721c5401c41de587d015c82@changeid Signed-off-by: Catalin Marinas <catalin.marinas@arm.com> Signed-off-by: Waiman Long <longman@redhat.com>
1 parent 908950b commit 834d01a

File tree

1 file changed

+14
-1
lines changed

1 file changed

+14
-1
lines changed

arch/arm64/kernel/proton-pack.c

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -876,6 +876,14 @@ static u8 spectre_bhb_loop_affected(void)
876876
{
877877
u8 k = 0;
878878

879+
static const struct midr_range spectre_bhb_k132_list[] = {
880+
MIDR_ALL_VERSIONS(MIDR_CORTEX_X3),
881+
MIDR_ALL_VERSIONS(MIDR_NEOVERSE_V2),
882+
};
883+
static const struct midr_range spectre_bhb_k38_list[] = {
884+
MIDR_ALL_VERSIONS(MIDR_CORTEX_A715),
885+
MIDR_ALL_VERSIONS(MIDR_CORTEX_A720),
886+
};
879887
static const struct midr_range spectre_bhb_k32_list[] = {
880888
MIDR_ALL_VERSIONS(MIDR_CORTEX_A78),
881889
MIDR_ALL_VERSIONS(MIDR_CORTEX_A78AE),
@@ -890,6 +898,7 @@ static u8 spectre_bhb_loop_affected(void)
890898
};
891899
static const struct midr_range spectre_bhb_k24_list[] = {
892900
MIDR_ALL_VERSIONS(MIDR_CORTEX_A76),
901+
MIDR_ALL_VERSIONS(MIDR_CORTEX_A76AE),
893902
MIDR_ALL_VERSIONS(MIDR_CORTEX_A77),
894903
MIDR_ALL_VERSIONS(MIDR_NEOVERSE_N1),
895904
MIDR_ALL_VERSIONS(MIDR_QCOM_KRYO_4XX_GOLD),
@@ -905,7 +914,11 @@ static u8 spectre_bhb_loop_affected(void)
905914
{},
906915
};
907916

908-
if (is_midr_in_range_list(read_cpuid_id(), spectre_bhb_k32_list))
917+
if (is_midr_in_range_list(read_cpuid_id(), spectre_bhb_k132_list))
918+
k = 132;
919+
else if (is_midr_in_range_list(read_cpuid_id(), spectre_bhb_k38_list))
920+
k = 38;
921+
else if (is_midr_in_range_list(read_cpuid_id(), spectre_bhb_k32_list))
909922
k = 32;
910923
else if (is_midr_in_range_list(read_cpuid_id(), spectre_bhb_k24_list))
911924
k = 24;

0 commit comments

Comments
 (0)