Repository navigation
fix(libkernel): allow sceKernelMprotect on committed host memory outside the guest registry - #3788
Merged
adriadam10 merged 1 commit intoOct 11, 2026
Conversation
…ide the guest registry Thread stacks are host-private memory; the call threw instead of setting the native protection. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Collaborator
|
Checked the diff against |
9 tasks done
9 tasks done
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
sceKernelMprotectthrew "guest protection or unmap range is not registered" for committed private host memory that is not in the guest allocation registry (seen on a thread stack: 0xf8380000+0x580000, prot 0xc2). On Windows it now sets the native protection for such a range and returns 0 when the range is a committed private region that does not overlap any registered guest allocation. Everything else keeps its previous path. Related: #3143.Tested
maina11c8f7 plus this commit:ctest -R "^guest_memory$"passes, including the newCheckMprotectOfHostMemoryOutsideTheGuestRegistry(VirtualAlloc'd region: protect to read/write, write and read back, read-only, read/write again, native protection checked withVirtualQuery). That check failed before the change (verified on the earlier branch version).python tools/check_conventions.py --base upstream/mainpasses._WIN32only).Checklist
main; no other open PR implements the same functions (perf(agc): cache page permissions within registered allocations #1330, feat(memory): track changes to mapped address ranges #1360 and fix(build): keep libc.prx needed by every executable that links a prx #3684 touch other code)NotImplemented_nid_no_patch); silent stubs are listed in TechnicalDebt (none added).mdfiles or images added to the repository🤖 Generated with Claude Code