From 45297b6f7de328c14ee192b1bd52bf8853648d09 Mon Sep 17 00:00:00 2001 From: Alkorin Date: Tue, 9 Jan 2018 18:41:48 +0100 Subject: [PATCH] Fix ARM checks --- spectre-meltdown-checker.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/spectre-meltdown-checker.sh b/spectre-meltdown-checker.sh index 2a9a874..6d87b7e 100755 --- a/spectre-meltdown-checker.sh +++ b/spectre-meltdown-checker.sh @@ -111,11 +111,11 @@ is_cpu_vulnerable() variant1=0 variant2=1 variant3=1 - elif grep -qi 'CPU implementer : 0x41' /proc/cpuinfo; then + elif grep -qi 'CPU implementer\s*:\s*0x41' /proc/cpuinfo; then # ARM # reference: https://developer.arm.com/support/security-update - cpupart=$(awk '/CPU part :/ {print $4;exit}' /proc/cpuinfo) - cpuarch=$(awk '/CPU architecture:/ {print $3;exit}' /proc/cpuinfo) + cpupart=$(awk '/CPU part/ {print $4;exit}' /proc/cpuinfo) + cpuarch=$(awk '/CPU architecture/ {print $3;exit}' /proc/cpuinfo) if [ -n "$cpupart" -a -n "$cpuarch" ]; then # Cortex-R7 and Cortex-R8 are real-time and only used in medical devices or such # I can't find their CPU part number, but it's probably not that useful anyway