diff options
author | Alkorin <github@alkorin.fr> | 2018-01-08 15:31:59 +0100 |
---|---|---|
committer | Alkorin <github@alkorin.fr> | 2018-01-08 15:56:19 +0100 |
commit | 26564206dbceef7b698ab10a2e4f18e99f0883a4 (patch) | |
tree | 09e36e69f70aba47ae09626f3d46c24b4d4b33bf | |
parent | f8ca11e56a7608d5fed21b49aef669c5377400a0 (diff) | |
download | spectre-meltdown-checker-26564206dbceef7b698ab10a2e4f18e99f0883a4.tar.lz spectre-meltdown-checker-26564206dbceef7b698ab10a2e4f18e99f0883a4.tar.xz spectre-meltdown-checker-26564206dbceef7b698ab10a2e4f18e99f0883a4.zip |
Do not execute checks if we already found that PTI is enabled
-rwxr-xr-x | spectre-meltdown-checker.sh | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/spectre-meltdown-checker.sh b/spectre-meltdown-checker.sh index 1ae4ead..c6515c4 100755 --- a/spectre-meltdown-checker.sh +++ b/spectre-meltdown-checker.sh @@ -260,7 +260,7 @@ elif [ -e /boot/config-$(uname -r) ]; then kpti_support=1 fi fi -if [ -e /boot/System.map-$(uname -r) ]; then +if [ "$kpti_support" = 0 -a -e /boot/System.map-$(uname -r) ]; then # it's not an elif: some backports don't have the PTI config but still include the patch # so we try to find an exported symbol that is part of the PTI patch in System.map kpti_can_tell=1 @@ -268,7 +268,7 @@ if [ -e /boot/System.map-$(uname -r) ]; then kpti_support=1 fi fi -if [ -n "$vmlinux" ]; then +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 |