Repository navigation
fix(libSceSystemService): answer sceSystemServiceParamGetString's errors and padding as measured on a PS5 - #8734
Conversation
…ors and padding as measured on a PS5 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
MarcZX10
left a comment
There was a problem hiding this comment.
Reviewed the current diff and the attached probe results. The implementation matches the measured behavior: only parameter 6 succeeds, undersized buffers and invalid parameters are rejected without writes, and successful calls NUL-pad exactly the caller-provided extent. Regression tests cover the 0–64 boundary, untouched failure buffers, and no writes beyond the supplied size. The author reports the focused Windows test passing, and conventions/intake/eligibility/labels checks are green; hosted platform build/test jobs are skipped, with no Linux/macOS run reported. The console evidence comes from a payload process on firmware 13.60, not a title process. Approval is based on that evidence and the focused diff. AI-assisted review.
|
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.
|
What
sceSystemServiceParamGetStringthrew for every parameter other than the system name (6) and for buffers of 1 to 64 bytes, and wrote only the 4 bytes ofPS5. Five titles import it: PPSA26344 calls it with parameter 6 and a 65-byte buffer, and PPSA28319, PPSA99109, PPSA21297 and PPSA28002 import it.In a payload process on a PS5 (firmware 13.60):
mainbefore this PR0x80A10003(SYSTEM_SERVICE_ERROR_PARAMETER), nothing written0x80A10003for 0, throws for 1 to 640x80A10003, nothing writtenPS5and its terminator, the rest untouchedPS5, then NUL bytes up to the buffer sizeINT_MAX, 65-byte buffer0x80A10003, nothing written0x80A10003, nothing written0x80A100030x80A10003for parameter 60x80A10003No initialisation call was needed;
sceSystemServiceInitializeis not exported.The name stays the fixed
PS5. The console returned its own user-set name, which is not logged here; the log masks it.Parameters between those tried are assumed to fail the same way, and the debt entry says so.
Debt: the
sceSystemServiceParamGetStringentry indocs/dev/debt/libSceSystemService.mdnow records the measured errors and padding, and which parameters were tried.How the console was measured
libSceSystemService.sprxwas loaded withdlopen, andsceSystemServiceParamGetStringwas taken from it withdlsym.x, digits as9).main.crenamed<probe>_main.c.Console output (excerpt, lines copied unchanged)
Tested
Build: Windows 11 x86-64, WinLibs MinGW-w64 GCC 15.2.0 (posix-seh, ucrt, r7),
-DBUILD_TESTING=ON, onmaine25333e.Tests:
guest_system_servicepasses. It now checks:INT_MAX, plus the language parameter;PS5, NUL bytes up to byte 68, and nothing past it.Old code, new test: with
Export.cppreverted tomain,guest_system_serviceaborts withsceSystemServiceParamGetString: buffer shorter than 65 bytes not implemented.Not run here: Linux and macOS.
Console: behaviour measured on a PS5 (firmware 13.60), as described above.
Overlaps:
tools/pr_overlap.pylists #7965 and #8651, which change the neighbouring lines ofdocs/dev/debt/libSceSystemService.md(sceSystemServiceParamGetIntand another entry). Neither changessceSystemServiceParamGetString.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