1
0
mirror of https://github.com/speed47/spectre-meltdown-checker synced 2024-11-06 22:23:41 +01:00

Avoid 'cat: /sys/kernel/debug/x86/pti_enabled: Permission denied'

This commit is contained in:
Alkorin 2018-01-08 12:41:28 +01:00
parent ef7a5c4cf6
commit 47c30babf1

View File

@ -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