Repository navigation
fix(libkernel): query current guest mapping extents - #1731
praveenkumarappu wants to merge 1 commit into
Conversation
|
The overlap with #1929 is resolved as a stacked follow-up: #1929 now depends on this PR, includes your live-range commit, and removes its duplicate range-selection logic. I found the first live-range implementation fails Linux |
|
The stacked follow-up in #1929 passed its full fork Build on head |
|
Thanks @MarcZX100 for resolving the overlap and adding the non-readable range fix. I also tested the combined head I've marked this PR ready for review. Please review it together with the dependent follow-up #1929. |
|
Thanks for testing the combined head and making the PR ready for review. I reviewed your full diff together with dependent #1929; the combined code passes the full fork Build (Linux 497/497, Windows 488/488, all relinker jobs) and the focused tests. The remaining CONTRIBUTING item before approval is to update this branch to current upstream |
Use the current registered range after protection splits and partial unmaps, including FIND_NEXT lookups. Add a regression covering extents, protection and surviving contents. AI-assisted: yes
58159dd to
1a301c4
Compare
MarcZX10
left a comment
There was a problem hiding this comment.
Re-reviewed the rebased head 1a301c48 against current upstream f1451396. The full diff remains limited to live-range selection in sceKernelVirtualQuery and its regression test. Conventions and git diff --check pass. Full Build 37868880231 passed on a tree containing this exact PR tree plus dependent #1929: Linux CTest 497/497, Windows CTest 488/488, and relinker CTests on Ubuntu, Windows, and macOS. The focused range tests and the AMPR protection regression pass. No blocking issue found.
|
I approved the rebased head. One description update remains useful: the Tested section still says Linux and full-project CTest were not run. The combined fork Build 37868880231 used a tree containing the exact #1731 tree plus #1929 and passed Linux 497/497, Windows 488/488, and relinker CTests. Please update the PR description with that evidence. Upstream currently reports no checks for this fork head; CONTRIBUTING says fork workflows may need authorized maintainer approval. |
|
Thanks @MarcZX100 for rechecking and approving the updated head. I've rebased onto upstream |
|
I have now approved rebased head |
|
I attempted to update the Tested section with the rebase and combined Build evidence, but GitHub returned 404 because I cannot edit another contributor’s PR description. The PR description remains unchanged; please update it to reflect the rebase and the full combined fork Build. My review approval is on head |
|
Thanks @MarcZX100, I've now updated the PR description's Tested section with the rebase to |
|
Could maintainers consider #1929 as the next follow-up after #1731? It is explicitly based on this PR's current head and adds the separate non-readable-mapping case with regression coverage. Keeping the changes stacked preserves the partial-unmap fix here and makes #1929 available as a focused follow-up. The approval on #1929 predates its current head, so that head still needs review and any required CI before merge. |
|
Other open pull requests touch the same code. Merging one will break the other, or both implement the same thing. If this one builds on them, list them in Depends on.
|
|
Update after checking both live heads: #1929 is based on current upstream #1731 still targets |
|
Update: #1929 is now based on current upstream |
|
Thanks @MarcZX100. I compared our |
Superseded by #1929. That PR includes this PR's exact live-extent fix and regression with the original author preserved, plus the correction and regression for mapped non-readable ranges. Closing this PR so the shared change is reviewed and merged once through #1929.
What
After protecting or partially unmapping a flexible allocation,
sceKernelVirtualQuerystill uses the original allocation address and size. This can return an extent crossing a protection boundary or an unmapped hole, andFIND_NEXTcan select a surviving fragment by its former allocation address.Use each registered range’s current address and size for containment, ordering, and returned extents. For a three-page flexible mapping whose middle page becomes read-only, queries now return each current one-page range with its own protection. After the middle page is unmapped,
FIND_NEXTreturns the third page.This isolates range selection from a larger local experimental patch. No shader, memory-release, loader, or game configuration changes are included.
Tested
Windows x64, WinLibs MinGW-w64 GCC 15.2.0, Release/Ninja, rebased onto upstream main
f145139676a48306681d3a4d5fabf83938759daf, PR head1a301c48a74f879ac3136745056edd8b7bf04403:GuestMemory.cpptest executable passes with the fix, including the new regression.FIND_NEXTfrom the hole, and preservation of neighboring contents.python tools/check_conventions.py --base origin/mainandgit diff --checkpass.After rebasing, rebuilt libc/libkernel and reran the complete Windows
GuestMemory.cppexecutable, focused split-range regression, convention checks, andgit diff --check; all passed.Combined validation with dependent follow-up #1929: fork Build 37868880231 tested a tree containing this exact rebased PR tree plus #1929's non-readable mapping fix. Full builds and CTest passed on Linux (497/497) and Windows (488/488), with relinker CTests passing on Ubuntu, Windows, and macOS. Local Windows combined
guest_memory,guest_ampr_markers, and query-probe checks also passed. These combined results include #1929; they do not establish that this isolated PR passes the full suite without that follow-up.Ready for review. Upstream PR workflows require authorized maintainer approval; the fork Build above is separate evidence. Console behavior and gameplay using this isolated branch have not been tested.
Related work checked: #700 reports reservations, #686 handles released direct-memory bookkeeping, and #721 implements checked physical release. This change retains their current-main behavior and addresses existing flexible mapping fragments.
Checklist