fix: armv8: models < 0xd07 are not vulnerable

This commit is contained in:
Stéphane Lesimple 2018-08-01 00:31:31 +02:00
parent f9dd9d8cb9
commit 9316c30577

View File

@ -395,13 +395,13 @@ is_cpu_vulnerable()
[ -z "$variant3a" ] && variant3a=immune
variant4=vuln
_debug "checking cpu$i: armv8 A76 non vulnerable to variant 2, 3 & 3a"
elif [ "$cpuarch" -le 7 ]; then
elif [ "$cpuarch" -le 7 ] || ( [ "$cpuarch" = 8 ] && [ $(( cpupart )) -lt $(( 0xd07 )) ] ) ; then
[ -z "$variant1" ] && variant1=immune
[ -z "$variant2" ] && variant2=immune
[ -z "$variant3" ] && variant3=immune
[ -z "$variant3a" ] && variant3a=immune
[ -z "$variant4" ] && variant4=immune
_debug "checking cpu$i: arm arch$cpuarch, all immune"
_debug "checking cpu$i: arm arch$cpuarch, all immune (v7 or v8 and model < 0x0d7)"
else
variant1=vuln
variant2=vuln