[Rebase&FF] Apply memory protections#1660
[Rebase&FF] Apply memory protections#1660apop5 wants to merge 2 commits intomicrosoft:release/202511from
Conversation
When CpuDxe runs, signal gEdkiiGcdSyncCompleteProtocolGuid to the Core to allow memory protections to be applied correctly for existing allocations. Missed when removing RP on free during integration.
Ensure that memory protections are applied to conventional memory. Apply memory protections allocations which would bypass traditional memory protections policy. Missed while removing RP on Freed memory during integration.
| } | ||
|
|
||
| if (MemoryType == EfiConventionalMemory) { | ||
| Attributes |= EFI_MEMORY_RP; |
There was a problem hiding this comment.
This part we shouldn't have, right? This will add RP on free memory which we dropped
| // MU_CHANGE START: Install blank protocol to signal the end of the GCD sync | ||
| gBS->InstallMultipleProtocolInterfaces ( | ||
| &ImageHandle, | ||
| &gEdkiiGcdSyncCompleteProtocolGuid, |
There was a problem hiding this comment.
I thought this wasn't required without RP on free memory? My recollection was that this was added for that case. I see we still have the core doing it, but I think we need to revert that commit. Checking.
There was a problem hiding this comment.
Yeah, it was: 144e3fe. I think we need to strip this out, it should have been removed when the RP on free memory commit was dropped. I can help if needed.
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## release/202511 #1660 +/- ##
=================================================
Coverage ? 1.52%
=================================================
Files ? 1150
Lines ? 374200
Branches ? 3196
=================================================
Hits ? 5703
Misses ? 368072
Partials ? 425
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:
|
Description
During removal of Rp on Freed memory, some corner cases were also removed.
Apply the corner cases to allow for clean dxe paging audit.
How This Was Tested
Q35 DxePagingAuditTestApp was reporting missing memory protection regions.
After fixes, DxePagingAuditTestApp reports passing.
Integration Instructions
No integration necessary.