[Feature]: Support MMI handler profile (MMI handler audit) for the Rust MM supervisor
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 5/5
- Estimated time
- Over a week
- Newbie friendliness
- 28/100
- Issue type
- Feature
- Clarity
- Clearly specified
- Activity status
- Active
- Tech stack
- rust
- Domain
- embedded-iot
Research direction
Read the user core MmiDatabase and MmDispatcher paths, the supervisor’s PlatformInfo::mmi_handlers() interface, and SmiHandlerProfile.h to understand the profile format. Implement registration tracking and the GET_INFO / GET_DATA_BY_OFFSET response across the user core and supervisor, then verify the existing MmiHandlerProfileAuditTestApp receives the image and handler records; the issue also calls for platform enablement, a regenerated golden copy, and removal of the Ruacana skip.
Written by the indexing model from the issue text.
Description
Feature Overview
Feature Overview
The C MM supervisor supports the SMI handler profile (gSmiHandlerProfileGuid). At MM Ready To Lock, it records every loaded MM image and every root, GUID and hardware MMI handler, together with the image that owns each handler, the caller address and the registration context. A shell app (MmiHandlerProfileAuditTestApp) reads this database through the supervisor communication channel with GET_INFO / GET_DATA_BY_OFFSET. Test automation compares the result with a per-platform golden copy, so it catches MM images, or MMI entry points per image, being added or removed.
The Rust supervisor and user core don't implement this, so the audit returns no data on Rust supervisor platforms. This requests the Rust counterpart, so the MMI handler audit can be re-enabled.
Urgency
Medium
Are you going to implement the feature request?
I will implement the feature
Do you need maintainer feedback?
Maintainer feedback requested
Anything else?
N/A
Solution Overview
Solution Overview
Add SMI handler profile support across the Rust user core and supervisor, so the existing MmiHandlerProfileAuditTestApp works unchanged:
- User core (
patina_mm_user_core)- Record the owning image and caller address for each MMI handler registration in
MmiDatabase, matching the handler address against theMmDispatcherimage list. - Install
SMI_HANDLER_PROFILE_PROTOCOL, so SMI child dispatchers (SW, Sx, power/standby button, periodic timer, GPI, IO trap, USB) can report hardware handlers with their contexts throughRegisterHandler/UnregisterHandler. - At MM Ready To Lock, build a read-only snapshot in the
SmiHandlerProfile.hformat:'SCID'image records and'SCSD'handler-list records.
- Record the owning image and caller address for each MMI handler registration in
- Supervisor (
patina_mm_supervisor)- Serve
gSmiHandlerProfileGuidrequests (GET_INFO,GET_DATA_BY_OFFSET) on the supervisor channel. This could be an optionalSupervisorMmiHandlerthat a platform adds throughPlatformInfo::mmi_handlers(). - Validate the comm buffer and the target data buffer, which must lie outside MMRAM with no overflow.
- Serve
- Consumers
- Enable it in the upcoming Patina platform crate (
sea_releasepatina_mm_intel) for DEBUG builds. - Regenerate the
MmiProfilerGoldenCopy.xmlfrom a Rust supervisor build. - Remove the Rust supervisor skip from Ruacana
MmiHandlerAudit.ps1.
- Enable it in the upcoming Patina platform crate (
Alternatives Considered
- Keep skipping the audit on Rust supervisor builds. This is the current state, but it loses coverage of the MM attack surface.
- Serve the profile entirely from the supervisor. The supervisor doesn't own the MMI handler database or the dispatcher registrations, which live in the Ring 3 user core, so it would need user core cooperation anyway.
Alternatives Considered
No response
Urgency
Medium
Are you going to implement the feature request?
I will implement the feature
Do you need maintainer feedback?
Maintainer feedback requested
Anything else?
No response
- Dominant language
- Rust
- Stars
- 568
- Forks
- 63
- Avg merge
- 1d 16h
- Merged PRs (30d)
- 60
Getting set up
- No Dockerfile or Docker Compose file
- Has a pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from OpenDevicePartnership/patina
-
state:needs-owner state:needs-triage type:documentation
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
OpenDevicePartnership/patina#1987 ·
Maintainers usually reply within 1 day
-
Potential Major Update: Drop `Deref` from `Protocol<P>`Possibly taken @makubacki claimed this 7 days ago. Open
OpenDevicePartnership/patina#2036 · 1 assignee ·
Maintainers usually reply within 1 day
-
[Feature]: Enforce service thread safety through automatic Send and Sync implementationsPossibly taken @Javagedes claimed this 8 days ago. Openstate:needs-triage type:feature-request urgency:medium
OpenDevicePartnership/patina#2027 · 1 assignee ·
Maintainers usually reply within 1 day
-
Difficulty 5/5 Over a week Newbie friendliness 15/100
OpenDevicePartnership/patina#2024 ·
Maintainers usually reply within 1 day
-
state:backlog urgency:low
Difficulty 4/5 3-5 days Newbie friendliness 48/100
OpenDevicePartnership/patina#2019 ·
Maintainers usually reply within 1 day
All issues in OpenDevicePartnership/patina
Similar issues
-
platform:windows provider:antigravity-cli providers setup triaged wontfix
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
can1357/oh-my-pi#21349 · 1 comment ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 92/100
erkamyaman/rea-games#246 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
aaif-goose/goose#13970 ·
Maintainers usually reply within 1 day
-
comp-documentation
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
ClickHouse/ClickHouse#136277 ·
Maintainers usually reply within 1 day