Do not rely on lscpu for vulns info

This commit is contained in:
Samuel Aubertin 2022-01-27 15:48:18 +01:00
parent 0a6f989a60
commit f7532e8f7b

View File

@ -46,8 +46,8 @@ UCODE:= $(shell grep microcode /proc/cpuinfo | sort | uniq | awk '{print $$NF}'
KERN:= $(shell uname -svm) KERN:= $(shell uname -svm)
CLANGV:= $(shell clang -v 2>&1 | head -n 1) CLANGV:= $(shell clang -v 2>&1 | head -n 1)
GCCV:= $(shell gcc -v 2>&1 | grep 'gcc version') GCCV:= $(shell gcc -v 2>&1 | grep 'gcc version')
VULN1:= $(strip $(shell LC_ALL=en_US.UTF-8 lscpu | grep 'Spectre v1' | cut -d":" -f 2-)) VULN1:= $(shell cat /sys/devices/system/cpu/vulnerabilities/spectre_v1)
VULN2:= $(strip $(shell LC_ALL=en_US.UTF-8 lscpu | grep 'Spectre v2' | cut -d":" -f 2-)) VULN2:= $(shell cat /sys/devices/system/cpu/vulnerabilities/spectre_v2)
ifndef PROGRESS ifndef PROGRESS
HIT_TOTAL != ${MAKE} ${MAKECMDGOALS} --dry-run PROGRESS="HIT_MARK" | grep -c "HIT_MARK" HIT_TOTAL != ${MAKE} ${MAKECMDGOALS} --dry-run PROGRESS="HIT_MARK" | grep -c "HIT_MARK"