The current Meltdown Intel processor vulnerability is currently remedied by having the page table isolation enabled. There is a question how to turn this off: How to disable Page Table Isolation to regain performance lost due to Intel CPU security hole patch?
My question is opposite: is there a way to check on a running system whether the PTI mechanism is effective on the system and thus the system is protected? I'm specifically looking for cat /proc/something
or cat /sys/something
, not checking for kernel version or config parameter or the like.
dmesg | grep isolation && echo "patched :)" || echo "unpatched :("
command as listed is unnecessarily dangerous: it doesn't show what line was actually matched, and would also happily print "patched :)" if a random other instance of "isolation" was matched... – Jaap Eldering Jan 06 '18 at 20:24/proc/cpuinfo
for cpu_insecure). If you put that into a script and you have a CPU in the future where the problem is fixed in its microarchitecture,/proc/cpuinfo
will no longer saycpu_insecure
and your script will believe the kernel is unpatched even though it is patched. I would also recommend against the third suggestion, as it's too likely that there might be the wordisolation
in thedmesg
output at some point without it referring to kernel page table isolation. – blubberdiblub Jan 07 '18 at 04:28isolation
will match bothKernel/User page tables isolation: enabled
andKernel/User page tables isolation: disabled on command line
. – Mark Jan 07 '18 at 07:31Ubuntu 16.04.3
with4.4.0-108-generic
. – Seppo Erviälä Jan 10 '18 at 08:02/proc/cpuinfo
flags suffice? Or can we have this flag even if the page table isolation is disabled at boot but compiled in? – Rmano Jan 10 '18 at 08:1916.04.3 LTS
4.4.0-109-generic
and I get the first two are "unpatched" and the last one (dmesg) is "patched". Which one(s) should I trust? – Nova Jan 10 '18 at 22:21grep
command above shows "Kernel/User page tables isolation: disabled". At the same time,meltdown-checker
reports "meltdown safe". It means that kernel supports Page Tables Isolation but it is disabled as AMD CPUs are not vulnerable to that attack. – rpr Jan 10 '18 at 23:43cat /proc/cpuinfo | grep bugs
will show something like this:bugs : cpu_meltdown spectre_v1 spectre_v2
– Ahmed Mar 08 '18 at 14:16