Closed os-d closed 1 month ago
Attention: Patch coverage is 0%
with 3 lines
in your changes missing coverage. Please review.
Project coverage is 1.35%. Comparing base (
90adf2b
) to head (3f3adb8
).
Files | Patch % | Lines |
---|---|---|
...eModulePkg/Core/Dxe/Misc/MemoryProtectionSupport.c | 0.00% | 3 Missing :warning: |
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
@spbrogan, refactored to use SafeIntLib and to only use my own fields as the basis for further checks.
Description
When we enter memory protections compatibility mode, we attempt to disable null protection and remap 0 - 0xA0000 as RWX. This was done for x86 systems with broken shim/grubs on Linux that would attempt to use those regions. This resolved that issue and we could boot non-memory protection safe Linux images on x86 HW. However, this approach did not take into account systems that do not have that range marked as system memory, for example ARM64 systems do not have this requirement. As such, this would inappropriately map these regions as RWX when they were not system memory.
This patch updates the remapping to only remap and disable null protection if these ranges are marked as system memory, otherwise it will leave them alone.
For each item, place an "x" in between
[
and]
if true. Example:[x]
. (you can also check items in the GitHub UI)How This Was Tested
Tested on an ARM64 platform that does not have 0 - 0xA0000 as system memory, as well as an X86 system that does have that range as system memory, booting a Linux image on both that forces us to enter compatibility mode.
Integration Instructions
N/A.