-
Notifications
You must be signed in to change notification settings - Fork 476
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Check MSR in each CPU/Thread #136
Conversation
any updates about this PR? |
I'm working on getting v0.35 out with the pending fixes mostly for variant1 and other stuff that has already been merged to master before going offline for holidays... tomorrow! |
what adjustments you want me to make? |
Your branch raises several |
spectre-meltdown-checker.sh
Outdated
@@ -1041,13 +1041,48 @@ sys_interface_check() | |||
return 0 | |||
} | |||
|
|||
number_of_cpus() | |||
{ | |||
n=$(cat /proc/cpuinfo | grep processor| wc -l) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
n=$(grep -c ^processor /proc/cpuinfo)
?
spectre-meltdown-checker.sh
Outdated
pstatus green YES | ||
else | ||
spec_ctrl_msr=1 | ||
pstatus green YES "(But not in all CPUs)" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
()
are already added by pstatus
on the 3rd param
spectre-meltdown-checker.sh
Outdated
if [ $cpu_mismatch -eq 0 ]; then | ||
pstatus green YES | ||
else | ||
pstatus green YES "(But not in all CPUs)" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
()
are already added by pstatus
on the 3rd param
Thanks for review. Fixed all issues/warnings. |
any suggestion? comments? |
Thanks! |
When we check Spectre and Meltdown ucode patches and MSR configuration need to run all HW checks for each CPU.
In case we check just for CPU with index 0 (like
/dev/cpu/0/msr
) we missing check for rest CPUs. In case if ucode was not applied for all CPU or ucode has different behavior on other CPU we won't detect it.This patch is reading MSR in each CPU and checking that result is the consistent in each CPU.