Repository navigation
docs(libkernel): name what FreeBSD and the emulators do for an unaligned sceKernelMunmap length - #13866
Conversation
…ned sceKernelMunmap length Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
MarcZX10
left a comment
There was a problem hiding this comment.
Reviewed — looks good
This documentation-only change accurately distinguishes the current sceKernelMunmap behavior from the cited alternatives and does not claim the unmeasured console behavior is settled.
What I ran
Reviewed head d7ce0daa231696bfa8ba305d47789025a0151dad against base 049619c202f00698b6d559817577726fbeb1ca4d; the merge preview was clean. Environment: Linux x86_64, Python 3.11.2. I ran:
python3 tools/pr_precheck.py --repo boykopovar/AnyPS5 --pr 13866Results
| Check | Result |
|---|---|
| Diff check and conventions/template | Passed |
| Current-base merge preview | Clean |
| Build/tests | Not applicable; only a debt-documentation line changed |
| Hosted CI | Still queued at final check |
Unedited convention check output
All conventions checks passed.
Not verified
The precheck's test-quality heuristic could not run because tools/pr_test_quality.py is absent from its isolated PR checkout. No build or test was run, and hosted checks were queued. Neither limitation affects this documentation-only diff.
|
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.
|
|
@xXPBSXx the entry says "a length of 0 and a range with nothing mapped are measured". I could not find where. Neither The rest checks out against the cited sources: FreeBSD 11.4 |
…results come from Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
|
Thanks for checking. The source is prosper's console oracle, which #3937 cites: I changed the entry accordingly: it now says that a length of 0 and a range with nothing mapped follow prosper's console oracle (PR #3937, firmware not recorded), instead of "are measured". The alignment case still says that it is not measured. The new commit only rewords this entry: besides that sentence it shortens "no console run has checked it" to "is not measured" and drops "instead of failing" after the rounding sentence. AI-assisted (Claude Code). |
|
Checked the prosper oracle rows and the cited FreeBSD/emulator sources against the entry; docs only, conventions green; merged. |
What
Adds one entry to the libkernel technical debt:
sceKernelMunmapfails a length that is not a multiple of the 16 KiB guest page withEINVAL, which was taken over from an earlier throw and which no console run has checked. FreeBSD 11.4'skern_munmap(vm_mmap.c#L535-L542) rounds the address down and the length up instead, shadPS4 and fpPS4 round as well, and KytyPS5 does not check the alignment. The guestmunmapalready rounds like FreeBSD (#10550);sceKernelMunmaphas its own path. The entry does not say which behaviour is right and no code or test changes. Forty of the 53 local titles importsceKernelMunmap.Tested
Documentation only.
tools/check_conventions.py --base upstream/mainpasses. Based onmain809c7fa2df, and it merges withmain2db749ef2ewithout a conflict (checked 2026-10-31 10:12 UTC). I read FreeBSD'svm_mmap.c(the blob matchesrelease/11.4.0) and the three emulators at the commits named in the entry (KytyPS5 5e837a9beac82c031868eaad9348d6a48245fb99, shadPS4 0614ce324be092791b758d79f93d9f1ca5b10a81, fpPS4 04cefd43e6fddd1ab033e7980cd356d14c964905), and ourDoMunmapandmunmap_nid_postfix. Not run: a build or a test, because nothing but the debt file changes.Overlap
Checked on 2026-10-31 against
main809c7fa2dfb1b21e2b31b3114b7d51bc14ee88ab(1591 open pull requests, listed at 06:39 UTC; the merge checks ran from 08:54 UTC to 09:05 UTC). I took the changed files of each fromgit diff --name-onlyagainst its merge base (one ref, #13454, could not be fetched; the GitHub file list shows it does not changedocs/dev/debt/libkernel.md). 92 of them change that file.git merge-treeof this head with each of the 92: 39 conflict, and every one of the 39 also conflicts withmainon its own, so none conflicts because of this entry. I put the line after theLocked memory on macOSentry because, after themincoreentry, it conflicted with #12854 and #11042, which each change a neighbouring line. Checked once more on 2026-10-31 at 09:59 UTC againstmain2db749ef2e: of the 63 pull requests opened since 06:30 UTC, five change that file (#13790, #13798, #13824, #13832, #13854) and none of them conflicts with this entry.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)AI-assisted (Claude Code).
🤖 Generated with Claude Code