1
0
mirror of https://github.com/speed47/spectre-meltdown-checker synced 2024-12-23 12:54:26 +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 # if we can't find the flag, grep in dmesg
pstatus green YES pstatus green YES
kpti_enabled=1 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 pstatus green YES
kpti_enabled=1 kpti_enabled=1
else else