mirror of
https://github.com/speed47/spectre-meltdown-checker
synced 2025-01-08 20:33:09 +01:00
fix: bypass MSR/CPUID checks for non-x86 CPUs
This commit is contained in:
parent
701cf882ad
commit
37ce032888
@ -1126,6 +1126,10 @@ check_cpu()
|
|||||||
{
|
{
|
||||||
_info "\033[1;34mHardware check\033[0m"
|
_info "\033[1;34mHardware check\033[0m"
|
||||||
|
|
||||||
|
if ! uname -m | grep -qwE 'x86_64|i[3-6]86'; then
|
||||||
|
return
|
||||||
|
fi
|
||||||
|
|
||||||
_info "* Hardware support (CPU microcode) for mitigation techniques"
|
_info "* Hardware support (CPU microcode) for mitigation techniques"
|
||||||
_info " * Indirect Branch Restricted Speculation (IBRS)"
|
_info " * Indirect Branch Restricted Speculation (IBRS)"
|
||||||
_info_nol " * SPEC_CTRL MSR is available: "
|
_info_nol " * SPEC_CTRL MSR is available: "
|
||||||
@ -1369,7 +1373,10 @@ check_cpu()
|
|||||||
else
|
else
|
||||||
pstatus blue NO "$ucode_found"
|
pstatus blue NO "$ucode_found"
|
||||||
fi
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
check_cpu_vulnerabilities()
|
||||||
|
{
|
||||||
_info "* CPU vulnerability to the three speculative execution attacks variants"
|
_info "* CPU vulnerability to the three speculative execution attacks variants"
|
||||||
for v in 1 2 3; do
|
for v in 1 2 3; do
|
||||||
_info_nol " * Vulnerable to Variant $v: "
|
_info_nol " * Vulnerable to Variant $v: "
|
||||||
@ -1379,8 +1386,6 @@ check_cpu()
|
|||||||
pstatus green NO
|
pstatus green NO
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
|
||||||
_info
|
|
||||||
}
|
}
|
||||||
|
|
||||||
check_redhat_canonical_spectre()
|
check_redhat_canonical_spectre()
|
||||||
@ -2024,6 +2029,9 @@ check_variant3()
|
|||||||
}
|
}
|
||||||
|
|
||||||
check_cpu
|
check_cpu
|
||||||
|
check_cpu_vulnerabilities
|
||||||
|
_info
|
||||||
|
|
||||||
# now run the checks the user asked for
|
# now run the checks the user asked for
|
||||||
if [ "$opt_variant1" = 1 ] || [ "$opt_allvariants" = 1 ]; then
|
if [ "$opt_variant1" = 1 ] || [ "$opt_allvariants" = 1 ]; then
|
||||||
check_variant1
|
check_variant1
|
||||||
|
Loading…
Reference in New Issue
Block a user