1
0
mirror of https://github.com/speed47/spectre-meltdown-checker synced 2024-12-23 04:43:37 +01:00

Merge pull request #10 from Alkorin/permissionDenied

Avoid 'cat: /sys/kernel/debug/x86/pti_enabled: Permission denied'
This commit is contained in:
Stéphane Lesimple 2018-01-08 12:44:09 +01:00 committed by GitHub
commit 68adbfdf14
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

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