Repository navigation
docs(libkernel): drop stale mlockall, open file limit and protection bit claims - #9363
Merged
adriadam10 merged 1 commit intoOct 25, 2026
Merged
Conversation
|
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.
|
thuanquang
force-pushed
the
docs/debt-sweep-kernel-misc
branch
from
October 22, 2026 03:47
0e81e73 to
b8e883f
Compare
…bit claims Co-Authored-By: Claude <noreply@anthropic.com>
thuanquang
force-pushed
the
docs/debt-sweep-kernel-misc
branch
from
October 23, 2026 14:43
b8e883f to
9e6bd36
Compare
12 tasks done
Collaborator
|
Checked the four edited statements against main: |
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
Four statements in
docs/dev/debt/libkernel.mdno longer matchmain; each is replaced with whatmaindoes now, and nothing else in the entries changes.mlockall_nid_postfixis at core/libs/prx/libkernel/DirectMemory/PosixMemory.cpp:311 (a7ea2bd, feat(libkernel): add mlockall export #4386) andmunlockall_nid_postfixis at :320 (e03e6f7, feat(libkernel): add munlockall export #5663). Both sit in theextern "C"block with no platform guard, and their NIDs, x7g7Ebeo8-U and NpLBpgVV7PU, are the two XPSemu imports those commits name. e03e6f7 wrote this sentence, so it described main before feat(libkernel): add munlockall export #5663 merged. Now: "XPSemu (PPSA97358) importsmlockallandmunlockall".mlockallimport (feat(libkernel): add mlockall export #4386)".mlockallis exported at core/libs/prx/libkernel/DirectMemory/PosixMemory.cpp:311. It came from a7ea2bd in feat(libkernel): add mlockall export #4386, which merged (bc1ded3) before feat(libkernel): implement pthread_atfork registration #4377 (8d455b8, merge 40047f4) added this clause, so the clause was already stale when it landed. The remaining text, "current-main runtime reachability is unverified", still records the open gap. Now: "" (clause removed).core/libs/prx/libkernel/File/src/OpenFileLimit.cppis__linux__-only, so on macOS the guest gets whatever soft limit the host process inherited." core/libs/prx/libkernel/File/src/OpenFileLimit.cpp:1 is now#if defined(__linux__) || defined(__APPLE__). Lines :16-26 set both limits at load to the hard limit, which on macOS is first lowered tokern.maxfilesperproc(0cb9d92, fix(libkernel): set the open file limit at load on macOS #6836). The getrlimit entry already gives these per-host values. The guest limit equals the host's soft limit only off Windows (core/libs/prx/libkernel/System/src/Process.cpp:754-758); Windows uses a fixed 8192 (:751-753). Now: "On Linux and macOS the guest limit is the host's soft limit."prot & 0x113to host read andprot & 0x222to host read/write, so 0x100 and 0x200 grant host access like the GPU bits. That changed in b567bb8 (feat(libkernel): accept the audio coprocessor memory protection bits #900), which merged after fix(libkernel): accept GPU coherency prot bits for host mapping #550 (49b2f9e) wrote this entry. The 'Memory protection bits 0x100 and 0x200' entry (docs/dev/debt/libkernel.md:57) already says this and gives its sources, so the whole bullet goes. Now: "" (bullet removed).Tested
Docs only; nothing was built or run. On origin/main 0ae7887, I read PosixMemory.cpp (the mlockall and munlockall exports at :311 and :320, in the extern C block from :147 with no guard after :229), OpenFileLimit.cpp, Process.cpp:748-762 and 827-837 (the guest RLIMIT_NOFILE and getdtablesize) and DirectMemory.cpp:265-275 (LinuxProtFromSce); I also checked each change's commits and merge order and recomputed the mlockall and munlockall NIDs with the tools/nid_names.py algorithm (x7g7Ebeo8-U, NpLBpgVV7PU). Rebased on
main0ae7887: #10136 rewrote the neighbouringclose, sceKernelCloseentry, which stays asmainhas it. Of the cited source files only Process.cpp changed since 6ef5a1c (#8537, #8985, #8986, #9218); its open file limit code only moved, and the 'Memory protection bits' entry is now at :57. Each statement was found by a read-only sweep of the debt files and confirmed by two independent verifier passes and a final check on currentmain. No open pull request edits these sentences:tools/pr_overlap.py --branchon 0ae7887 found no overlap, and I checked by hand the diffs of the 33 open PRs that edit this file but could not be compared because they conflict withmain.python tools/check_conventions.py --base origin/mainwith this title and body: 0 errors and 1debt-lengthwarning, for entries that were already over 1000 characters: mlockall, munlockall (1067 characters before, 1034 after this change).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