aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xspectre-meltdown-checker.sh13
1 files changed, 8 insertions, 5 deletions
diff --git a/spectre-meltdown-checker.sh b/spectre-meltdown-checker.sh
index 83e0019..9b78da3 100755
--- a/spectre-meltdown-checker.sh
+++ b/spectre-meltdown-checker.sh
@@ -1,7 +1,7 @@
#! /bin/sh
# Spectre & Meltdown checker
# Stephane Lesimple
-VERSION=0.12
+VERSION=0.13
# print status function
pstatus()
@@ -117,13 +117,16 @@ else
else
# here we disassemble the kernel and count the number of occurences of the LFENCE opcode
# in non-patched kernels, this has been empirically determined as being around 40-50
- # in patched kernels, this is more around 70-80
+ # in patched kernels, this is more around 70-80, sometimes way higher (100+)
+ # v0.13: 68 found in a 3.10.23-xxxx-std-ipv6-64 (with lots of modules compiled-in directly), which doesn't have the LFENCE patches,
+ # so let's push the threshold to 70.
+ # TODO LKML patch is starting to dump LFENCE in favor of the PAUSE opcode, we might need to check that (patch not stabilized yet)
nb_lfence=$(objdump -D "$vmlinux" | grep -wc lfence)
- if [ "$nb_lfence" -lt 60 ]; then
- pstatus red NO "only $nb_lfence opcodes found, should be >= 60"
+ if [ "$nb_lfence" -lt 70 ]; then
+ pstatus red NO "only $nb_lfence opcodes found, should be >= 70"
status=1
else
- pstatus green YES "$nb_lfence opcodes found, which is >= 60"
+ pstatus green YES "$nb_lfence opcodes found, which is >= 70"
status=2
fi
fi