aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStéphane Lesimple <speed47_github@speed47.net>2018-01-21 18:07:25 +0100
committerStéphane Lesimple <speed47_github@speed47.net>2018-01-24 09:04:25 +0100
commite7aa3b9d167b9054cbd2c47be0ab593a11d0e213 (patch)
tree9f4564a47fc5b239573af9a8ca79b13a0b485239
parentff5c92fa6fe3e5529600f6e712ca2c72c546c65b (diff)
downloadspectre-meltdown-checker-e7aa3b9d167b9054cbd2c47be0ab593a11d0e213.tar.lz
spectre-meltdown-checker-e7aa3b9d167b9054cbd2c47be0ab593a11d0e213.tar.xz
spectre-meltdown-checker-e7aa3b9d167b9054cbd2c47be0ab593a11d0e213.zip
feat(retpoline): check if retpoline is enabled
Before we would just check if retpoline was compiled in, now we also check that it's enabled at runtime (only in live mode)
-rwxr-xr-xspectre-meltdown-checker.sh14
1 files changed, 14 insertions, 0 deletions
diff --git a/spectre-meltdown-checker.sh b/spectre-meltdown-checker.sh
index 904cfbb..a48716c 100755
--- a/spectre-meltdown-checker.sh
+++ b/spectre-meltdown-checker.sh
@@ -1162,6 +1162,20 @@ check_variant2()
else
pstatus yellow UNKNOWN "couldn't find your kernel image or System.map"
fi
+
+ _info_nol "* Retpoline enabled: "
+ if [ "$opt_live" = 1 ]; then
+ # kernel adds this flag when retpoline is supported and enabled,
+ # regardless of the fact that it's minimal / full and generic / amd
+ if grep -qw retpoline /proc/cpuinfo; then
+ pstatus green YES
+ retpoline_enabled=1
+ else
+ pstatus red NO
+ fi
+ else
+ pstatus blue N/A "can't check this in offline mode"
+ fi
elif [ "$sys_interface_available" = 0 ]; then
# we have no sysfs but were asked to use it only!
msg="/sys vulnerability interface use forced, but it's not available!"