mirror of
https://github.com/speed47/spectre-meltdown-checker.git
synced 2026-04-07 09:13:20 +02:00
fix: CPUs affected by MSBDS but not MDS (fix #351)
This commit is contained in:
@@ -124,6 +124,11 @@ is_cpu_affected() {
|
|||||||
_infer_immune mlpds
|
_infer_immune mlpds
|
||||||
_infer_immune mdsum
|
_infer_immune mdsum
|
||||||
pr_debug "is_cpu_affected: cpu not affected by Microarchitectural Data Sampling"
|
pr_debug "is_cpu_affected: cpu not affected by Microarchitectural Data Sampling"
|
||||||
|
elif is_cpu_msbds_only; then
|
||||||
|
_infer_immune mfbds
|
||||||
|
_infer_immune mlpds
|
||||||
|
_infer_immune mdsum
|
||||||
|
pr_debug "is_cpu_affected: cpu only affected by MSBDS, not MFBDS/MLPDS/MDSUM"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if is_cpu_taa_free; then
|
if is_cpu_taa_free; then
|
||||||
|
|||||||
@@ -85,6 +85,37 @@ is_cpu_mds_free() {
|
|||||||
return 1
|
return 1
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# Check whether the CPU is known to be affected by MSBDS only (not MFBDS/MLPDS/MDSUM)
|
||||||
|
# These CPUs have a different microarchitecture that is only susceptible to
|
||||||
|
# Microarchitectural Store Buffer Data Sampling, not the other MDS variants.
|
||||||
|
# Returns: 0 if MSBDS-only, 1 otherwise
|
||||||
|
is_cpu_msbds_only() {
|
||||||
|
# source: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/arch/x86/kernel/cpu/common.c
|
||||||
|
#VULNWL_INTEL(ATOM_SILVERMONT, MSBDS_ONLY),
|
||||||
|
#VULNWL_INTEL(ATOM_SILVERMONT_D, MSBDS_ONLY),
|
||||||
|
#VULNWL_INTEL(ATOM_SILVERMONT_MID, MSBDS_ONLY),
|
||||||
|
#VULNWL_INTEL(ATOM_SILVERMONT_MID2, MSBDS_ONLY),
|
||||||
|
#VULNWL_INTEL(ATOM_AIRMONT, MSBDS_ONLY),
|
||||||
|
#VULNWL_INTEL(XEON_PHI_KNL, MSBDS_ONLY),
|
||||||
|
#VULNWL_INTEL(XEON_PHI_KNM, MSBDS_ONLY),
|
||||||
|
parse_cpu_details
|
||||||
|
if is_intel; then
|
||||||
|
if [ "$cpu_family" = 6 ]; then
|
||||||
|
if [ "$cpu_model" = "$INTEL_FAM6_ATOM_SILVERMONT" ] ||
|
||||||
|
[ "$cpu_model" = "$INTEL_FAM6_ATOM_SILVERMONT_D" ] ||
|
||||||
|
[ "$cpu_model" = "$INTEL_FAM6_ATOM_SILVERMONT_MID" ] ||
|
||||||
|
[ "$cpu_model" = "$INTEL_FAM6_ATOM_SILVERMONT_MID2" ] ||
|
||||||
|
[ "$cpu_model" = "$INTEL_FAM6_ATOM_AIRMONT" ] ||
|
||||||
|
[ "$cpu_model" = "$INTEL_FAM6_XEON_PHI_KNL" ] ||
|
||||||
|
[ "$cpu_model" = "$INTEL_FAM6_XEON_PHI_KNM" ]; then
|
||||||
|
return 0
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
return 1
|
||||||
|
}
|
||||||
|
|
||||||
# Check whether the CPU is known to be unaffected by TSX Asynchronous Abort (TAA)
|
# Check whether the CPU is known to be unaffected by TSX Asynchronous Abort (TAA)
|
||||||
# Returns: 0 if TAA-free, 1 if affected or unknown
|
# Returns: 0 if TAA-free, 1 if affected or unknown
|
||||||
is_cpu_taa_free() {
|
is_cpu_taa_free() {
|
||||||
|
|||||||
Reference in New Issue
Block a user