diff options
author | Stéphane Lesimple <speed47_github@speed47.net> | 2018-01-08 12:49:23 +0100 |
---|---|---|
committer | Stéphane Lesimple <speed47_github@speed47.net> | 2018-01-08 12:49:23 +0100 |
commit | edbdf0da1f852eff080a7e082b3ba3928d409b8a (patch) | |
tree | bfc1c1f46c567d4b9c20e7db8456580d8cdfee31 | |
parent | 68adbfdf14939f7098ac1501463b6f5de7b763cc (diff) | |
download | spectre-meltdown-checker-edbdf0da1f852eff080a7e082b3ba3928d409b8a.tar.lz spectre-meltdown-checker-edbdf0da1f852eff080a7e082b3ba3928d409b8a.tar.xz spectre-meltdown-checker-edbdf0da1f852eff080a7e082b3ba3928d409b8a.zip |
push the lfence opcodes threshold to 70
-rwxr-xr-x | spectre-meltdown-checker.sh | 13 |
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 |