From 30c4a1f6d2653625d48228e2cb700206f2369de2 Mon Sep 17 00:00:00 2001 From: manish jaggi Date: Sun, 22 Jul 2018 22:36:19 +0530 Subject: [PATCH] arm64: cavium: Add CPU Implementer Cavium (#216) This patch adds 0x43 check for cavium implementor id in function parse_cpu_details. Also adds that Cavium Soc is not vulnerable to variant 3/3a Signed-off-by: Manish Jaggi --- spectre-meltdown-checker.sh | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/spectre-meltdown-checker.sh b/spectre-meltdown-checker.sh index c5efc5c..4968bd9 100755 --- a/spectre-meltdown-checker.sh +++ b/spectre-meltdown-checker.sh @@ -323,6 +323,9 @@ is_cpu_vulnerable() [ -z "$variant4" ] && variant4=immune _debug "is_cpu_vulnerable: cpu not affected by speculative store bypass so not vuln to variant4" fi + elif [ "$cpu_vendor" = CAVIUM ]; then + variant3=immune + variant3a=immune elif [ "$cpu_vendor" = ARM ]; then # ARM # reference: https://developer.arm.com/support/security-update @@ -989,6 +992,9 @@ parse_cpu_details() cpu_friendly_name="ARM" [ -n "$cpu_arch" ] && cpu_friendly_name="$cpu_friendly_name v$cpu_arch" [ -n "$cpu_part" ] && cpu_friendly_name="$cpu_friendly_name model $cpu_part" + + elif grep -qi 'CPU implementer[[:space:]]*:[[:space:]]*0x43' "$procfs/cpuinfo"; then + cpu_vendor='CAVIUM' fi cpu_family=$( grep '^cpu family' "$procfs/cpuinfo" | awk '{print $4}' | grep -E '^[0-9]+$' | head -1)