mirror of
https://github.com/speed47/spectre-meltdown-checker.git
synced 2024-10-03 22:18:02 +02:00
Merge pull request #37 from deufrai/better-dmesg-support
Improve PTI detection
This commit is contained in:
commit
d6e4aa43f0
@ -685,7 +685,10 @@ if [ "$opt_live" = 1 ]; then
|
||||
# RedHat Backport creates a dedicated file, see https://access.redhat.com/articles/3311301
|
||||
kpti_enabled=$(cat /sys/kernel/debug/x86/pti_enabled 2>/dev/null)
|
||||
elif dmesg | grep -Eq 'Kernel/User page tables isolation: enabled|Kernel page table isolation enabled'; then
|
||||
# if we can't find the flag, grep in dmesg
|
||||
# if we can't find the flag, grep dmesg output
|
||||
kpti_enabled=1
|
||||
elif [ -r /var/log/dmesg ] && grep -Eq 'Kernel/User page tables isolation: enabled|Kernel page table isolation enabled' /var/log/dmesg; then
|
||||
# if we can't find the flag in dmesg output, grep in /var/log/dmesg when readable
|
||||
kpti_enabled=1
|
||||
else
|
||||
kpti_enabled=0
|
||||
|
Loading…
Reference in New Issue
Block a user