mirror of
https://github.com/speed47/spectre-meltdown-checker.git
synced 2026-06-13 01:53:02 +02:00
fix: another attempt to avoid sigpipe on grep (#519)
Take this opportunity to factorize all the greps in /proc/cpuinfo into a helper that avoids using a pipe to entirely avoid SIGPIPE on a possibly gigantic /proc/cpuinfo
This commit is contained in:
+1
-1
@@ -186,7 +186,7 @@ if [ $ret = $READ_CPUID_RET_OK ]; then
|
||||
cap_ssbd='Intel SSBD'
|
||||
elif [ $ret = $READ_CPUID_RET_ERR ] && [ "$g_mode" = live ]; then
|
||||
# CPUID device unavailable (e.g. in a VM): fall back to /proc/cpuinfo
|
||||
if grep ^flags "$g_procfs/cpuinfo" | grep -qw ssbd; then
|
||||
if cpuinfo_has_flag ssbd; then
|
||||
cap_ssbd='Intel SSBD (cpuinfo)'
|
||||
ret=$READ_CPUID_RET_OK
|
||||
fi
|
||||
|
||||
Reference in New Issue
Block a user