Repository navigation
test(libkernel): skip the mapping above the system-reserved range when a host region holds it - #29181
Conversation
…n a host region holds it
|
No actionable comments were generated in the recent review. Walkthrough
Change: Other Merge Risk:
|
MarcZX10
left a comment
There was a problem hiding this comment.
Reviewed — looks good
The change skips the boundary mapping assertions when the target page overlaps a host region, while retaining them when the page is available.
What I ran
Reviewed head 8cceba0529d5e892b863e04361be755c8ab5c779; base: main (no merged preview). I inspected the prepared diff and the changed file’s relevant code and callers with repo_read.py. No tests or builds were run.
Results
| Check | Result | Note |
|---|---|---|
| Diff and source review | passed | One changed file reviewed |
| Runtime tests | not run | Author-reported results not reproduced |
| Build | not run | No build attempted |
Negative control
Not run; no assertion mutation was made.
Findings
Blocking
None.
Non-blocking
None.
Sources
- Changed boundary check at the reviewed commit
- Existing platform-specific host-region check at the reviewed commit
Not verified
The reported Apple silicon/Rosetta runs and the Linux and Windows runtime behavior were not independently verified. Reviewed core/libs/tests/GuestMemory.cpp; files.json lists no excluded files.
To get this to a good state
Nothing is required.
|
Some comparisons could not be completed because a pull request conflicts with the base branch. Review these shared files manually before concluding that there is no overlap.
|
What
CheckFixedReservationOverPartlyMappedRange(#27457) ends by mapping one flexible page at0x1000000000, right after the system-reserved range, and checking that a reservation straddling the boundary fails. Under Rosetta on Apple silicon that page is never available: the process starts with sealed mappings (maximum protection none) at0xfc0000000–0x1000000000and0x1000000000–0x7000000000, which macOS reports as/usr/libexec/rosetta/runtime. The arena records them as host regions, so the fixed map throws "fixed guest mapping 0x1000000000+0x4000 overlaps a host region in the guest arena" andguest_memoryaborts.That last part of the check now runs only when the arena has no host region at
0x1000000000, usingGuestArenaHostRegionOverlaps_nid_postfixon Windows andGuestArenaOverlapsHostRegion_nid_no_patchelsewhere, asCheckArenaHintInsideHostRegionalready does. Linux and Windows, where that page is guest memory, run it as before.Tested
Apple M1 Pro, macOS 27.0.1, Apple clang 21.0.0, x86_64 build under Rosetta 2, on main cec4943 with the macOS build fixes #11049, #26739, #27739, #27767, #27843 and #27639 merged locally so that main builds.
guest_memory: aborts on main (2/2) with the error above; passes 3/3 with this change.mach_vm_regionfrom0x7f0000000to0x1400000000showed the two sealed ranges above at the same addresses in all three runs, andGuestArenaOverlapsHostRegion_nid_no_patch(0x1000000000, 0x4000)returned true each time.Checklist
main; no other open PR implements the same functionsNotImplemented_nid_no_patch); silent stubs are listed under Silent stubs in their library's technical debt file.mdfiles or images added to the repository (attach them to this PR)🤖 Generated with Claude Code
https://claude.ai/code/session_012LL9hfx4BY6MbUCYMduDAQ
Summary by CodeRabbit