fix(libkernel): give sceCoredumpSetUserDataType its signature and result #8906
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/8906"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Imported from boykopovar/AnyPS5. Originally posted by hypermoist on 2026-10-21T05:29:50Z.
What
sceCoredumpSetUserDataType(NIDUxqkdta7wEg) was declared without parameters and threwNotImplemented. #4144 left it that way because no signature was known.In the decrypted PS5 12.00
libkernel.sprx, the export at 0x138B0 is a single tail call:int, sign-extends it, and passes it to syscall 601 (the coredump syscall the othersceCoredump*calls use) with command 29 and a third argument of 0.0x8118xxxxmapping, so a kernel error would return -1 witherrnoset by the shared syscall error stub. Whether the kernel rejects anytypeis decided inside the kernel and is not visible in the module or measured.This PR gives it the
(int type)signature and returns 0. The call only labels the user data of a core dump, and none is produced here. Upstream'ssceCoredumpConfigDumpModefollows the same convention. Which types the kernel accepts is not measured; the new Silent stubs entry indocs/dev/debt/libkernel.mdrecords this.Titles: Palworld (PPSA23126, #2598) and Hello Neighbor (PPSA35154, discussion #6991) import it. In those reports it is listed among the imported stubs, not as the stop.
The body is written from this observed behaviour; nothing from the module is copied.
Tested
Linux (CachyOS, GCC, Release): full build. All 542
guest_*, kernel and Ampr tests pass.guest_coredump_user_datanow checks that type 0 returns 0. It no longer asserts success for other values, since the kernel's accepted range is not measured.tools/check_conventions.pyis clean. No open PR touches the name or NID. A three-way merge against every open PR touching these files adds no conflicts; the debt line's position was chosen for that, since about 70 open PRs editlibkernel.md.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
https://claude.ai/code/session_01RbLgECLQ2bpDM7oe2urGZK
Imported from boykopovar/AnyPS5. Originally posted by github-actions[bot] on 2026-10-21T05:30:37Z.
Progress report (
6ef5a1c→1f8d476)📈 System libraries: 42.34% (+0.01%, +1 implemented functions)
✅ 1 implemented
sceCoredumpSetUserDataType⚪ 1 behaviourally empty (constant return or throw)
sceCoredumpSetUserDataTypeImported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-21T05:30:52Z.
I compiled the PR revision’s
Coredump.cppwith the existingGuestCoredumpUserData.cpptest on Linux using GCC-Wall -Wextra -Werror; the executable passed.git diff --check upstream/main...refs/codex/pr-8906also passes. This was a focused host harness, not a full project build or independent console measurement.Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-21T05:30:53Z.
Review: APPROVED
Reviewed the observed
(int)export signature, no-op behavior documented for the emulator’s absent core-dump path, and regression coverage. The changed implementation and existing coredump test compile cleanly with GCC strict warnings and pass on Linux. This approval is scoped to the focused implementation and local test; the console probe described in the PR was not independently reproduced.Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-21T05:42:22Z.
Review: COMMENTED
Could you clarify the return contract for unsupported
typevalues? The PR description says the syscall result comes back unchanged, but this implementation returns 0 for everyint, and the test locks in success for-1andINT_MAX. “No dump is produced here” does not by itself establish that the kernel accepts every value; the syscall may still validate its command argument. If the observed result is genuinely unconditional success, please document that evidence. Otherwise, narrowing the test to measured values (or leaving the export unmodeled until the accepted range is known) would avoid asserting unverified behavior.Imported from boykopovar/AnyPS5. Originally posted by hypermoist on 2026-10-21T06:52:54Z.
Good point. The module only shows the user-space side:
typeis passed to the kernel unchanged, and the result isn't translated. Whether the kernel rejects some values happens inside the kernel; it isn't visible in libkernel and I haven't measured it. So there's no evidence for unconditional success. Infde789cca8the test only asserts type 0, and I corrected the description to say the accepted range is unknown. The call itself still returns 0, as recorded under Silent stubs, since no dump is produced here.Imported from boykopovar/AnyPS5. Originally posted by xXPBSXx on 2026-10-21T07:44:18Z.
Windows data point for
fde789ccamerged ontomain86b84244f(clean,git merge-treerc 0): Windows 10.0.19045, MinGW-w64 GCC 15.2.0, Release.ctest -N -R '^guest_coredump_user_data$'lists exactly that one test;ctest --no-tests=error -R '^guest_coredump_user_data$'was run three times per tree.core/libs/prx/libkernel/System/src/Coredump.cpprestored tomain(the new test cases kept): fails 3 of 3, exit code0xc0000409(the test process aborts).Not tested: other platforms, a title run.
AI-assisted (Claude Code).
Imported from boykopovar/AnyPS5. Originally posted by hypermoist on 2026-10-22T09:11:04Z.
@xXPBSXx thanks for the Windows run and its control. After merging
main, the parameter is nowstd::int32_t typeto matchmain's declaration, and the test still checks only type 0.