Skip to content

Commit 4ed8c16

Browse files
krasCGQmikeNG
authored andcommitted
ARM64/errata: Ensure vulnerable CPUs are actually flagged on is_spectrev2_safe()
This updates logic introduced by commit 6deba98 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 <[email protected]> [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 <[email protected]> Change-Id: I1da47886c5e1f1331ece977813ae3ec832d13af3
1 parent 6deba98 commit 4ed8c16

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

arch/arm64/kernel/cpu_errata.c

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

888888
return !is_midr_in_range_list(read_cpuid_id(),
889-
arm64_bp_harden_smccc_cpus) ||
889+
arm64_psci_bp_harden_cpus) &&
890890
!is_midr_in_range_list(read_cpuid_id(),
891-
arm64_psci_bp_harden_cpus);
891+
arm64_bp_harden_smccc_cpus);
892892
}
893893

894894
void spectre_bhb_enable_mitigation(const struct arm64_cpu_capabilities *entry)

0 commit comments

Comments
 (0)