Skip to content

MmSupervisorPkg: Core: Return status value from SaveStateRead2#644

Merged
makubacki merged 1 commit into
microsoft:mainfrom
zurcher:savestate
Apr 28, 2026
Merged

MmSupervisorPkg: Core: Return status value from SaveStateRead2#644
makubacki merged 1 commit into
microsoft:mainfrom
zurcher:savestate

Conversation

@zurcher

@zurcher zurcher commented Apr 27, 2026

Copy link
Copy Markdown
Contributor

Description

When consumers of gEfiSmmCpuProtocolGuid are given a ReadSaveState function that calls SysCallMmReadSaveState in MmSupervisorRing3Broker, they cannot rely on the returned Status value and may proceed to use invalid data present in the Buffer argument, 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.

  • Impacts functionality?
  • Impacts security?
  • Breaking change?
  • Includes tests?
  • Includes documentation?

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 gEfiSmmCpuProtocolGuid should review handling of the return Status in case they were expecting Success in non-success cases.

@codecov-commenter

codecov-commenter commented Apr 28, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 0% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 0.52%. Comparing base (af639ca) to head (b94ade6).

Files with missing lines Patch % Lines
...pervisorPkg/Core/PrivilegeMgmt/SyscallDispatcher.c 0.00% 1 Missing ⚠️
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           
Flag Coverage Δ
MmSupervisorPkg 0.52% <0.00%> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@makubacki
makubacki merged commit 1c0726a into microsoft:main Apr 28, 2026
19 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants