Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DxePagingAuditTestApp: Remove MemoryOutsideEfiMemoryMapIsInaccessible Test #532

Merged
merged 1 commit into from
Aug 28, 2024

Conversation

os-d
Copy link
Contributor

@os-d os-d commented Jul 29, 2024

Description

MemoryOutsideEfiMemoryMapIsInaccessible was attempting to test that memory outside the EFI_MEMORY_MAP was marked EFI_MEMORY_RP or unmapped, however this is not a valid test as we expect there to be ranges outside of the EFI_MEMORY_MAP, such as GCD non-existent memory and non-runtime MMIO ranges. This patch removes the test. Closes #531.

  • Impacts functionality?
    • Functionality - Does the change ultimately impact how firmware functions?
    • Examples: Add a new library, publish a new PPI, update an algorithm, ...
  • Impacts security?
    • Security - Does the change have a direct security impact on an application,
      flow, or firmware?
    • Examples: Crypto algorithm change, buffer overflow fix, parameter
      validation improvement, ...
  • Breaking change?
    • Breaking change - Will anyone consuming this change experience a break
      in build or boot behavior?
    • Examples: Add a new library class, move a module to a different repo, call
      a function in a new library class in a pre-existing module, ...
  • Includes tests?
    • Tests - Does the change include any explicit test code?
    • Examples: Unit tests, integration tests, robot tests, ...
  • Includes documentation?
    • Documentation - Does the change contain explicit documentation additions
      outside direct code modifications (and comments)?
    • Examples: Update readme file, add feature readme file, link to documentation
      on an a separate Web page, ...

How This Was Tested

Tested on Q35.

Integration Instructions

N/A.

@os-d os-d added the type:bug Something isn't working label Jul 29, 2024
@os-d os-d requested review from makubacki and apop5 July 29, 2024 17:48
@github-actions github-actions bot added impact:non-functional Does not have a functional impact impact:testing Affects testing type:documentation Improvements or additions to documentation labels Jul 29, 2024
@kuqin12
Copy link
Contributor

kuqin12 commented Aug 20, 2024

I thought this is a valid test just that our core does not support it yet? Although, it probably does not matter if we change the page table mapping logic (not to map all pages).

@os-d
Copy link
Contributor Author

os-d commented Aug 21, 2024

I thought this is a valid test just that our core does not support it yet? Although, it probably does not matter if we change the page table mapping logic (not to map all pages).

No, this isn’t valid. We expect some memory outside of the EFI_MEMORY_MAP to have valid mappings, like non-runtime MMIO.

@TaylorBeebe
Copy link
Contributor

I thought this is a valid test just that our core does not support it yet? Although, it probably does not matter if we change the page table mapping logic (not to map all pages).

No, this isn’t valid. We expect some memory outside of the EFI_MEMORY_MAP to have valid mappings, like non-runtime MMIO.

If this requirement is being relaxed, you may also want to remove requirements 4 and 9 from the Enhanced Memory Protection documentation: https://microsoft.github.io/mu/WhatAndWhy/enhancedmemoryprotection/

… Test

MemoryOutsideEfiMemoryMapIsInaccessible was attempting to test that memory
outside the EFI_MEMORY_MAP was marked EFI_MEMORY_RP or unmapped, however this
is not a valid test as we expect there to be ranges outside of the EFI_MEMORY_MAP,
such as GCD non-existent memory and non-runtime MMIO ranges. This patch removes
the test.
@os-d os-d force-pushed the osde/remove_outside_test branch from 513f939 to bbafeb1 Compare August 28, 2024 18:52
@os-d os-d enabled auto-merge (rebase) August 28, 2024 18:52
@os-d os-d merged commit 602574c into microsoft:release/202311 Aug 28, 2024
30 checks passed
@os-d os-d deleted the osde/remove_outside_test branch August 28, 2024 21:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
impact:non-functional Does not have a functional impact impact:testing Affects testing type:bug Something isn't working type:documentation Improvements or additions to documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Bug]: MemoryOutsideEfiMemoryMapIsInaccessible() Test Is Broken
5 participants