1
0
mirror of https://github.com/speed47/spectre-meltdown-checker synced 2024-11-07 06:33:38 +01:00

fix: msr: fix msr module detection under Ubuntu 19.10 (fixes #316)

This commit is contained in:
Stéphane Lesimple 2019-11-19 22:35:08 +01:00
parent 418533c47e
commit 59ad312773

View File

@ -1176,7 +1176,7 @@ mount_debugfs()
load_msr() load_msr()
{ {
if [ "$os" = Linux ]; then if [ "$os" = Linux ]; then
if ! grep -e msr "$procfs/modules" 2>/dev/null; then if ! grep -qw msr "$procfs/modules" 2>/dev/null; then
modprobe msr 2>/dev/null && insmod_msr=1 modprobe msr 2>/dev/null && insmod_msr=1
_debug "attempted to load module msr, insmod_msr=$insmod_msr" _debug "attempted to load module msr, insmod_msr=$insmod_msr"
else else
@ -1195,7 +1195,7 @@ load_msr()
load_cpuid() load_cpuid()
{ {
if [ "$os" = Linux ]; then if [ "$os" = Linux ]; then
if ! grep -e cpuid "$procfs/modules" 2>/dev/null; then if ! grep -qw cpuid "$procfs/modules" 2>/dev/null; then
modprobe cpuid 2>/dev/null && insmod_cpuid=1 modprobe cpuid 2>/dev/null && insmod_cpuid=1
_debug "attempted to load module cpuid, insmod_cpuid=$insmod_cpuid" _debug "attempted to load module cpuid, insmod_cpuid=$insmod_cpuid"
else else