MmSupervisorPkg: Core: Return status value from SaveStateRead2#644
Merged
Conversation
kuqin12
approved these changes
Apr 27, 2026
makubacki
approved these changes
Apr 27, 2026
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #644 +/- ##
=====================================
Coverage 0.52% 0.52%
=====================================
Files 133 133
Lines 20101 20101
Branches 60 60
=====================================
Hits 106 106
Misses 19990 19990
Partials 5 5
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
makubacki
approved these changes
Apr 28, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
When consumers of
gEfiSmmCpuProtocolGuidare given aReadSaveStatefunction that callsSysCallMmReadSaveStatein MmSupervisorRing3Broker, they cannot rely on the returned Status value and may proceed to use invalid data present in theBufferargument, since the Buffer is not manipulated in non-Success paths.This change ensures that the function interface for this protocol works as expected by protocol consumers.
How This Was Tested
Exposing failure case was this function returning Success on all CPUs, not just the CPU where a Software MMI was triggered.
Verified after the change that only the intended CPU returned Success.
Integration Instructions
Likely N/A; consumers of
gEfiSmmCpuProtocolGuidshould review handling of the return Status in case they were expecting Success in non-success cases.