Skip to content

[Rebase & FF] Inherit page table attribute from parent entries#175

Merged
kuqin12 merged 2 commits intoOpenDevicePartnership:mainfrom
kuqin12:sp_bit_attr
Feb 25, 2026
Merged

[Rebase & FF] Inherit page table attribute from parent entries#175
kuqin12 merged 2 commits intoOpenDevicePartnership:mainfrom
kuqin12:sp_bit_attr

Conversation

@kuqin12
Copy link
Contributor

@kuqin12 kuqin12 commented Feb 24, 2026

Description

The original page table query logic assumed that all parent-level entries were marked with the most permissive attributes, allowing the leaf entry to directly reflect the effective attributes during a query.

However, since patina-paging also supports initialization from an existing page table, this assumption does not always hold. The query logic must instead accurately model attribute inheritance across the page table hierarchy.

This change fixes the issue by introducing an additional input parameter to the internal helper, allowing the query to correctly propagate and reflect parent attributes.

This change also adds a bit definition of EFI_MEMORY_SP for completeness.

  • Impacts functionality?
  • Impacts security?
  • Breaking change?
  • Includes tests?
  • Includes documentation?

How This Was Tested

This was tested on QEMU Q35 and booted to UEFI shell, as well as on physical AArch64 platform and booted to Windows desktop.

Integration Instructions

N/A

@kuqin12 kuqin12 force-pushed the sp_bit_attr branch 3 times, most recently from ba90ece to eef6eb7 Compare February 24, 2026 21:47
This change adds the special-purpose memory region bit in paging crate.

This bit may be used for specific device drivers or applications.

Signed-off-by: Kun Qin <kun.qin@microsoft.com>
The original page table query logic assumed that all parent-level entries
were marked with the most permissive attributes, allowing the leaf entry
to directly reflect the effective attributes during a query.

However, since patina-paging also supports initialization from an
existing page table, this assumption does not always hold. The query
logic must instead accurately model attribute inheritance across the page
table hierarchy.

This change fixes the issue by introducing an additional input parameter
to the internal helper, allowing the query to correctly propagate and
reflect parent attributes.

Signed-off-by: Kun Qin <kun.qin@microsoft.com>
@codecov
Copy link

codecov bot commented Feb 24, 2026

Codecov Report

❌ Patch coverage is 88.23529% with 2 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
src/aarch64/structs.rs 80.00% 2 Missing ⚠️

📢 Thoughts on this report? Let us know!

@kuqin12 kuqin12 merged commit 77571e9 into OpenDevicePartnership:main Feb 25, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants