diff options
author | Alkorin <github@alkorin.fr> | 2018-01-08 12:41:28 +0100 |
---|---|---|
committer | Alkorin <github@alkorin.fr> | 2018-01-08 12:41:28 +0100 |
commit | 47c30babf19a8d63f077852664a0c6910f820158 (patch) | |
tree | 070992f3add085f67dae0c2ac246cb9c5206bee2 | |
parent | ef7a5c4cf64c7d7af6836b40dc1ea1dd3e1265ab (diff) | |
download | spectre-meltdown-checker-47c30babf19a8d63f077852664a0c6910f820158.tar.lz spectre-meltdown-checker-47c30babf19a8d63f077852664a0c6910f820158.tar.xz spectre-meltdown-checker-47c30babf19a8d63f077852664a0c6910f820158.zip |
Avoid 'cat: /sys/kernel/debug/x86/pti_enabled: Permission denied'
-rwxr-xr-x | spectre-meltdown-checker.sh | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/spectre-meltdown-checker.sh b/spectre-meltdown-checker.sh index 38d11ee..83e0019 100755 --- a/spectre-meltdown-checker.sh +++ b/spectre-meltdown-checker.sh @@ -291,7 +291,7 @@ elif dmesg | grep -Eq 'Kernel/User page tables isolation: enabled|Kernel page ta # if we can't find the flag, grep in dmesg pstatus green YES kpti_enabled=1 -elif [ -e /sys/kernel/debug/x86/pti_enabled -a "$(cat /sys/kernel/debug/x86/pti_enabled)" = 1 ]; then +elif [ -e /sys/kernel/debug/x86/pti_enabled -a "$(cat /sys/kernel/debug/x86/pti_enabled 2>/dev/null)" = 1 ]; then pstatus green YES kpti_enabled=1 else |