microsoft / mu_feature_mm_supv

Project Mu - Feature Repo - MM Supervisor
https://microsoft.github.io/mu
Other
48 stars 29 forks source link

Changed AllocatePageTableMemory to include a new variable #317

Closed kenlautner closed 3 months ago

kenlautner commented 3 months ago

Description

Updated AllocatePageTableMemory to include a new input variable *NewAllocation. This variable is used to keep track of if new pages were allocated for use in the page table page pool. This fixes a bug where if we run out of page table pool pages while changing some pages memory attributes we'll recursively call into ConvertMemoryPageAttributes while allocating pages leading to unaccounted for pages in the original call. This leads to an assert by the ConvertMemoryPageAttributes code.

How This Was Tested

Tested on two separate physical platforms that experienced the issue in different circumstances. This fix tested on those reproing platforms have the issue resolved and no longer saw any asserts.

Integration Instructions

N/A

codecov-commenter commented 3 months ago

Codecov Report

Attention: Patch coverage is 0% with 43 lines in your changes missing coverage. Please review.

Project coverage is 0.47%. Comparing base (1619bce) to head (06fbd63).

Files Patch % Lines
MmSupervisorPkg/Core/Mem/SmmCpuMemoryManagement.c 0.00% 42 Missing :warning:
MmSupervisorPkg/Core/Mem/PageTbl.c 0.00% 1 Missing :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #317 +/- ## ======================================== - Coverage 0.47% 0.47% -0.01% ======================================== Files 144 144 Lines 22079 22096 +17 Branches 60 60 ======================================== Hits 105 105 - Misses 21969 21986 +17 Partials 5 5 ``` | [Flag](https://app.codecov.io/gh/microsoft/mu_feature_mm_supv/pull/317/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=microsoft) | Coverage Δ | | |---|---|---| | [MmSupervisorPkg](https://app.codecov.io/gh/microsoft/mu_feature_mm_supv/pull/317/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=microsoft) | `0.47% <0.00%> (-0.01%)` | :arrow_down: | Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=microsoft#carryforward-flags-in-the-pull-request-comment) to find out more.

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.