mirror of
https://github.com/speed47/spectre-meltdown-checker
synced 2024-11-07 06:33:38 +01:00
push the lfence opcodes threshold to 70
This commit is contained in:
parent
68adbfdf14
commit
edbdf0da1f
@ -1,7 +1,7 @@
|
|||||||
#! /bin/sh
|
#! /bin/sh
|
||||||
# Spectre & Meltdown checker
|
# Spectre & Meltdown checker
|
||||||
# Stephane Lesimple
|
# Stephane Lesimple
|
||||||
VERSION=0.12
|
VERSION=0.13
|
||||||
|
|
||||||
# print status function
|
# print status function
|
||||||
pstatus()
|
pstatus()
|
||||||
@ -117,13 +117,16 @@ else
|
|||||||
else
|
else
|
||||||
# here we disassemble the kernel and count the number of occurences of the LFENCE opcode
|
# 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 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)
|
nb_lfence=$(objdump -D "$vmlinux" | grep -wc lfence)
|
||||||
if [ "$nb_lfence" -lt 60 ]; then
|
if [ "$nb_lfence" -lt 70 ]; then
|
||||||
pstatus red NO "only $nb_lfence opcodes found, should be >= 60"
|
pstatus red NO "only $nb_lfence opcodes found, should be >= 70"
|
||||||
status=1
|
status=1
|
||||||
else
|
else
|
||||||
pstatus green YES "$nb_lfence opcodes found, which is >= 60"
|
pstatus green YES "$nb_lfence opcodes found, which is >= 70"
|
||||||
status=2
|
status=2
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
Loading…
Reference in New Issue
Block a user