Repository navigation
fix(libkernel): register a relinked guest module's image when Linux protects its pages - #5955
Merged
adriadam10 merged 1 commit intoOct 16, 2026
Conversation
…rotects its pages
0xcrstn
added a commit
to 0xcrstn/AnyPS5
that referenced
this pull request
Oct 15, 2026
…t (fma-rc) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
0xcrstn
added a commit
to 0xcrstn/AnyPS5
that referenced
this pull request
Oct 15, 2026
…he FPS candidate Brings in ufc6/feedback (origin/main 760ffa6, boykopovar#6197, boykopovar#4286, boykopovar#5955) on top of the four FPS topics and boykopovar#6168. Conflict resolutions: - Execution Draw.cpp: keep the binding plan's single Regions() collection after the stage loop, adding the regions of reused or data-hit stages, and upstream's data-hit counters and cacheDrawStages signature. - Graphics Draw.cpp: recordDrawCommands takes both upstream's firstIndex and the dirty-record bound state; a stencil replay, like a face or channel split, drops the bound state. - The binding plan falls back to the full capture for stages whose plan uses image tables (ShaderMemory::UsesImageTables). Unbuilt and untested. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This was referenced Oct 15, 2026
Closed
|
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.
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.
|
11 tasks done
Collaborator
|
Checked on Linux (build + scoped ctest, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
On Linux,
sceKernelMprotectover pages of a relinked guest module (*.guest.prx) throws, becauseDoMprotectregisters only the main image in the allocation tracker. EA Sports UFC 6 (PPSA23566) stops 7 s after start on currentmain(e34c479) when code in itsEngine.Render.Core2.PlatformPs5.prxprotects its own pages:Windows already handles this (
IsGuestModuleImageandRegisterImageinDoMprotect,UnregisterImageindlclose). This does the same on Linux:RegisterImageandUnregisterImageare declared on every platform, the LinuxRegisterImageregisters thePT_LOADpages of the loaded object whose base is given (as the main image already is),DoMprotectregisters the.guest.prximage that contains the address, and protecting a page of any other loaded object throwsstd::invalid_argumentas on Windows.dlclosedrops the image's ranges when the last handle closes. The WindowsCheckGuestModuleImageProtectiongets a Linux counterpart. As on Windows, a module that is only loaded as another module's dependency keeps its ranges when that module is closed.Refs #5398 (point 2 there is this case in NHL 26, which loads the same module; the other points stay open). PR 5143 is in the same function but does something else: it skips the unregistered parts of a range and returns
EINVALwhen nothing is registered, which would leave the module's pages unprotected.Tested
maine34c479 + this PRctest -R guest_(16, incl.guest_memory)ctest(1198)guest_memoryfails onmainwith the line above and passes with the change. UFC 6 on Linux with the change passes the 8 s stop and presents its first window.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)