mirror of
https://github.com/speed47/spectre-meltdown-checker
synced 2024-10-05 07:45:59 +02:00
commit
65c123f309
@ -297,6 +297,13 @@ is_cpu_vulnerable()
|
|||||||
variant3=immune
|
variant3=immune
|
||||||
_debug "is_cpu_vulnerable: RDCL_NO is set so not vuln to meltdown"
|
_debug "is_cpu_vulnerable: RDCL_NO is set so not vuln to meltdown"
|
||||||
fi
|
fi
|
||||||
|
if [ "$capabilities_ssb_no" = 1 ]; then
|
||||||
|
# capability bit for future Intel processor that will explicitly state
|
||||||
|
# that they're not vulnerable to Variant 4
|
||||||
|
# this var is set in check_cpu()
|
||||||
|
variant4=immune
|
||||||
|
_debug "is_cpu_vulnerable: SSB_NO is set so not vuln to variant4"
|
||||||
|
fi
|
||||||
elif is_amd; then
|
elif is_amd; then
|
||||||
# AMD revised their statement about variant2 => vulnerable
|
# AMD revised their statement about variant2 => vulnerable
|
||||||
# https://www.amd.com/en/corporate/speculative-execution
|
# https://www.amd.com/en/corporate/speculative-execution
|
||||||
@ -358,14 +365,23 @@ is_cpu_vulnerable()
|
|||||||
variant3a=vuln
|
variant3a=vuln
|
||||||
else
|
else
|
||||||
_debug "checking cpu$i: this arm non vulnerable to variant3a"
|
_debug "checking cpu$i: this arm non vulnerable to variant3a"
|
||||||
[ -z "$variant3" ] && variant3a=immune
|
[ -z "$variant3a" ] && variant3a=immune
|
||||||
|
fi
|
||||||
|
|
||||||
|
# for variant4, only A57-72-73-75 are vulnerable
|
||||||
|
if [ "$cpuarch" = 8 ] && echo "$cpupart" | grep -Eq '^0xd0[789a]$'; then
|
||||||
|
_debug "checking cpu$i: arm A57-A72-A73-A75 vulnerable to variant4"
|
||||||
|
variant4=vuln
|
||||||
|
else
|
||||||
|
_debug "checking cpu$i: this arm non vulnerable to variant4"
|
||||||
|
[ -z "$variant4" ] && variant4=immune
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
_debug "is_cpu_vulnerable: for cpu$i and so far, we have <$variant1> <$variant2> <$variant3> <$variant3a> <$variant4>"
|
_debug "is_cpu_vulnerable: for cpu$i and so far, we have <$variant1> <$variant2> <$variant3> <$variant3a> <$variant4>"
|
||||||
done
|
done
|
||||||
fi
|
fi
|
||||||
# from the information we have for now, it seems that CPUs that are vulnerable to variant1 are also vulnerable to variant4
|
# from the information we have for now, it seems that CPUs that are vulnerable to variant1 are also vulnerable to variant4
|
||||||
variant4=$variant1
|
[ -z "$variant4" ] && variant4=$variant1
|
||||||
_debug "is_cpu_vulnerable: temp results are <$variant1> <$variant2> <$variant3> <$variant3a> <$variant4>"
|
_debug "is_cpu_vulnerable: temp results are <$variant1> <$variant2> <$variant3> <$variant3a> <$variant4>"
|
||||||
# if at least one of the cpu is vulnerable, then the system is vulnerable
|
# if at least one of the cpu is vulnerable, then the system is vulnerable
|
||||||
[ "$variant1" = "immune" ] && variant1=1 || variant1=0
|
[ "$variant1" = "immune" ] && variant1=1 || variant1=0
|
||||||
|
Loading…
Reference in New Issue
Block a user