Skip to content

UefiCpuPkg/BaseRiscVMmuLib: Unset 'valid' when unmapping memory#12393

Open
benjamindoron wants to merge 1 commit intotianocore:masterfrom
9elements:upstream/riscv-mmu-leaf-fix
Open

UefiCpuPkg/BaseRiscVMmuLib: Unset 'valid' when unmapping memory#12393
benjamindoron wants to merge 1 commit intotianocore:masterfrom
9elements:upstream/riscv-mmu-leaf-fix

Conversation

@benjamindoron
Copy link
Copy Markdown
Contributor

Description

Entries with the 'valid' bit set and RWX bits cleared are considered "table entries" (non-leaves). With the page table in this state, future map operations will trigger assertions when they reach the final level, and encounter what looks like a valid non-leaf entry.

  • Breaking change?
    • Breaking change - Does this PR cause a break in build or boot behavior?
    • Examples: Does it add a new library class or move a module to a different repo.
  • Impacts security?
    • Security - Does this PR have a direct security impact?
    • Examples: Crypto algorithm change or buffer overflow fix.
  • Includes tests?
    • Tests - Does this PR include any explicit test code?
    • Examples: Unit tests or integration tests.

How This Was Tested

This was tested as part of #12314

Integration Instructions

N/A

Entries with the 'valid' bit set and RWX bits cleared are considered
"table entries" (non-leaves). With the page table in this state, future
map operations will trigger assertions when they reach the final level,
and encounter what looks like a valid non-leaf entry.

Signed-off-by: Benjamin Doron <benjamin.doron@9elements.com>
@benjamindoron benjamindoron force-pushed the upstream/riscv-mmu-leaf-fix branch from 1d967df to fe7aafc Compare April 6, 2026 15:16
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.

1 participant