-
Notifications
You must be signed in to change notification settings - Fork 73
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
Fix AMD Microcode Check #285
Conversation
This adds an elif to set AMD ucode checks to current if Microcode was found but none apply to the CPU. This fixes the logic to revert back to previous and expected behavior for AMD with the added benefit of keeping an NRM_UNKNOWN default to trap if there is no microcode updates to scan.
Added a helpful debug line that outputs the $vars values to show what is CURRENT and AVAIL
This should address some more of #274 but also might want to look into expected behavior for Intel as well? |
@liske would be great to have some feedback |
@fritz-fritz why is this marked as draft, do you plan to get anything else done on this PR? otherwise i suggest just marking it as ready. i'll test this on our fleet now. |
@anarcat mostly just to try and encourage feedback before merging. I believe I have implemented the expected behavior here but am willing to rework it if need be. When all looks good I’ll be happy to finalize the PR |
the patch doesn't fix the issue for us. before the patch:
after the patch:
|
@anarcat can you try it with |
|
edit: moved this comment into the issue thread instead, in #249 (comment) |
@anarcat I admittedly have been away from this code for a while, but a quick review of your PRs and I think I agree. Closing this PR. |
As discussed in #249, the default behavior for AMD was changed with pull request #226 and as a result, CPUs that do not have microcode patches (because they're up to date) were leading to NRM_UNKNOWN resulting in "Failed to check for processor microcode upgrades." which is inaccurate.
This sets the $vars{AVAIL} to 0 if there are microcode patches to scan and none apply. While this doesn't guarantee microcode is up to date or from a valid source, it restores the previous behavior while accounting for the edge case presented in the previous pull request.