aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlkorin <github@alkorin.fr>2018-01-08 15:34:53 +0100
committerAlkorin <github@alkorin.fr>2018-01-08 16:51:20 +0100
commitdebd10b517f972131dd8e411532922efc51faa32 (patch)
tree63a7e5aeb2e354429b2e481539d716f1ff4a0360
parent21f81ff5c93008cdc7ef5bc17bd83d84244478ab (diff)
downloadspectre-meltdown-checker-debd10b517f972131dd8e411532922efc51faa32.tar.lz
spectre-meltdown-checker-debd10b517f972131dd8e411532922efc51faa32.tar.xz
spectre-meltdown-checker-debd10b517f972131dd8e411532922efc51faa32.zip
Detect if 'strings' is present
-rwxr-xr-xspectre-meltdown-checker.sh8
1 files changed, 6 insertions, 2 deletions
diff --git a/spectre-meltdown-checker.sh b/spectre-meltdown-checker.sh
index 0662754..95f625c 100755
--- a/spectre-meltdown-checker.sh
+++ b/spectre-meltdown-checker.sh
@@ -280,8 +280,12 @@ if [ "$kpti_support" = 0 -a -n "$vmlinux" ]; then
# same as above but in case we don't have System.map and only vmlinux, look for the
# nopti option that is part of the patch (kernel command line option)
kpti_can_tell=1
- if strings "$vmlinux" | grep -qw nopti; then
- kpti_support=1
+ if ! which strings >/dev/null 2>&1; then
+ pstatus yellow UNKNOWN "missing 'strings' tool, please install it, usually it's in the binutils package"
+ else
+ if strings "$vmlinux" | grep -qw nopti; then
+ kpti_support=1
+ fi
fi
fi