aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStéphane Lesimple <speed47_github@speed47.net>2018-01-20 12:26:26 +0100
committerStéphane Lesimple <speed47_github@speed47.net>2018-01-20 12:26:26 +0100
commita1bd233c493a67464f202f6003722aba75bc9ede (patch)
treeee3aceabb0c56a1f26ae63f9370886f92207462a
parentde6590cd09f74be30e33766be5f63e50730fbef4 (diff)
downloadspectre-meltdown-checker-a1bd233c493a67464f202f6003722aba75bc9ede.tar.lz
spectre-meltdown-checker-a1bd233c493a67464f202f6003722aba75bc9ede.tar.xz
spectre-meltdown-checker-a1bd233c493a67464f202f6003722aba75bc9ede.zip
revert to a simpler check_vmlinux()
-rwxr-xr-xspectre-meltdown-checker.sh12
1 files changed, 1 insertions, 11 deletions
diff --git a/spectre-meltdown-checker.sh b/spectre-meltdown-checker.sh
index 30828cc..6690968 100755
--- a/spectre-meltdown-checker.sh
+++ b/spectre-meltdown-checker.sh
@@ -481,17 +481,7 @@ vmlinux=''
vmlinux_err=''
check_vmlinux()
{
- readelf -h "$1" > /dev/null 2>&1 && return 0
- # normally we would just use readelf to test for the binary, and it would be sufficient.
- # but for some archs/distros it doesn't work well (issue #82), so we add a dumber check:
- # uncompressed kernels always have the following string present
- if ! which strings >/dev/null 2>&1; then
- vmlinux_err="missing 'strings' tool, please install it, usually it's in the 'binutils' package"
- return 0
- else
- strings "$1" | grep -q '^Linux version ' && return 0
- fi
- # not found: kernel not valid
+ readelf -h "$1" >/dev/null 2>&1 && return 0
return 1
}