Skip to content

libkernel: paging: implement block-level hole punching - #324

Merged
hexagonal-sun merged 4 commits into
masterfrom
pt-hole-punching
Oct 12, 2026
Merged

hexagonal-sun merged 4 commits into
masterfrom
pt-hole-punching

Conversation

@hexagonal-sun

Copy link
Copy Markdown
Owner

Allow pages to be punched out of block-level mappings, ensuring that page-demotion happens correctly. Also make the TLB invalidation API richer so that more targeted TLB invalidations can be invoked.

@hexagonal-sun
hexagonal-sun force-pushed the pt-hole-punching branch 10 times, most recently from cca26ad to cb17141 Compare October 10, 2026 16:26
If the end_address() of one of the regions takes us beyond usize::MAX
then this function always returns true due to overflow. Use
end_address_inclusive() instead which won't overflow the address space.
…ges()

The address of the next page was computed prior to a bounds check. If
the next page address (which didn't need to be computed) overflowed, it
could cause a panic on debug builds.
Add unit tests for the intersection() function. Furthermore, fix a bug
where the intersection() function would overflow when computing the
interscetion at the address space maximum.
Allow pages to be punched out of block-level mappings, ensuring that
page-demotion happens correctly. Also make the TLB invalidation API
richer so that more targeted TLB invalidations can be invoked.
@hexagonal-sun
hexagonal-sun merged commit 01ec027 into master Oct 12, 2026
5 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.

1 participant