aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVincent Brillault <vincent.brillault@cern.ch>2018-01-08 12:41:02 +0100
committerVincent Brillault <vincent.brillault@cern.ch>2018-01-08 12:58:22 +0100
commit34ef5ef21b35342801a45f8f00ca43059846bad4 (patch)
tree82be004cbb52ae16bf3377bb50807d7834d065eb
parentedbdf0da1f852eff080a7e082b3ba3928d409b8a (diff)
downloadspectre-meltdown-checker-34ef5ef21b35342801a45f8f00ca43059846bad4.tar.lz
spectre-meltdown-checker-34ef5ef21b35342801a45f8f00ca43059846bad4.tar.xz
spectre-meltdown-checker-34ef5ef21b35342801a45f8f00ca43059846bad4.zip
Delay umount (for RedHat access to pti_enable)
-rwxr-xr-xspectre-meltdown-checker.sh10
1 files changed, 5 insertions, 5 deletions
diff --git a/spectre-meltdown-checker.sh b/spectre-meltdown-checker.sh
index 9b78da3..367b3e0 100755
--- a/spectre-meltdown-checker.sh
+++ b/spectre-meltdown-checker.sh
@@ -199,11 +199,6 @@ case "$ibrs_enabled" in
*) pstatus yellow unknown;;
esac
-if [ "$mounted_debugfs" = 1 ]; then
- # umount debugfs if we did mount it ourselves
- umount /sys/kernel/debug
-fi
-
/bin/echo "* Mitigation 2"
/bin/echo -n "* Kernel compiled with retpolines: "
# We check the RETPOLINE kernel options
@@ -301,6 +296,11 @@ else
pstatus red NO
fi
+if [ "$mounted_debugfs" = 1 ]; then
+ # umount debugfs if we did mount it ourselves
+ umount /sys/kernel/debug
+fi
+
/bin/echo -ne "> \033[46m\033[30mSTATUS:\033[0m "
if grep -q AMD /proc/cpuinfo; then
pstatus green "NOT VULNERABLE" "your CPU is not vulnerable as per the vendor"