Skip to content

Commit c9e448a

Browse files
krasCGQmikeNG
authored andcommitted
ARM64/errata: Ensure vulnerable CPUs are actually flagged on is_spectrev2_safe()
This updates logic introduced by commit 6deba989 to ensure affected CPUs are properly flagged as affected by Spectre BHB, either by SMCCC or PSCI methods of detection. Signed-off-by: Albert I <kras@raphielgang.org> [jjpprrrr: change !(A || B) to (!B && !A) to take advantage of short circuit when B (PSCI) is the more likely case] Signed-off-by: Chenyang Zhong <zhongcy95@gmail.com> Change-Id: I1da47886c5e1f1331ece977813ae3ec832d13af3
1 parent 3d6e362 commit c9e448a

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

arch/arm64/kernel/cpu_errata.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -892,9 +892,9 @@ static bool is_spectrev2_safe(void)
892892
};
893893

894894
return !is_midr_in_range_list(read_cpuid_id(),
895-
arm64_bp_harden_smccc_cpus) ||
895+
arm64_psci_bp_harden_cpus) &&
896896
!is_midr_in_range_list(read_cpuid_id(),
897-
arm64_psci_bp_harden_cpus);
897+
arm64_bp_harden_smccc_cpus);
898898
}
899899

900900
void spectre_bhb_enable_mitigation(const struct arm64_cpu_capabilities *entry)

0 commit comments

Comments
 (0)