libkernel debt: note how a title calls the sceCoredump stop-info, attach and user-data functions #10088

Closed
opened 2026-10-23 08:57:34 +00:00 by xXPBSXx · 0 comments
xXPBSXx commented 2026-10-23 08:57:34 +00:00 (Migrated from github.com)
Contributor

Imported from boykopovar/AnyPS5. Originally posted by xXPBSXx on 2026-10-23T08:57:34Z.


The debt entry in docs/dev/debt/libkernel.md records what one or more title call sites show; this updates it (call-site addresses included so the reading can be checked).

The changed entry now reads:

sceCoredumpSetUserDataType (libkernel, NID Uxqkdta7wEg) - (int type) follows the PS5 12.00 libkernel.sprx at 0x138B0: the sign-extended type goes to syscall 601 (command 29, third argument 0), and the raw result comes back with no SCE code mapping, so a kernel error is -1 with errno set. Which types the kernel accepts is not measured. No dump is produced here, so every type returns 0. Palworld (PPSA23126, #2598) and Hello Neighbor (PPSA35154, discussion #6991) import it; #4144 left it throwing because no signature was known. PPSA02225 also imports it: its one call (at 0x6a1b2) passes 1 and does not read the result.

sceCoredumpGetStopInfoCpu has no active coredump context. Native null/size validation is recovered, including both 8-byte and 16-byte records; valid requests return NOT_IN_COREDUMP_HANDLER without accessing the output. Active-handler data retrieval remains unimplemented. One title (PPSA02225) disassembled for this entry calls it once (arguments set up at 0x8d67dd and 0x8d67e1) with a stack buffer and the length 0x10: for 0x81180005 it branches away, for 0 it reads a 32-bit code at offset 8 of the buffer, and for any other nonzero result, which includes the NOT_IN_COREDUMP_HANDLER result returned here, it formats an error text containing the code. The call does not show what the console returns outside a coredump handler.

sceCoredumpWriteUserData, sceCoredumpDebugTextOut have no active coredump report. WriteUserData validates a nonnull buffer and size at most INT32_MAX, including zero; accepted requests return the sign-extended outside-handler error. DebugTextOut still prints to stderr instead of a report; its validation and report integration remain unverified. One title (PPSA02225) disassembled for this entry makes six calls to sceCoredumpWriteUserData (at 0x6a1c4, 0x6a1e1, 0x6a1fe, 0x6a21b, 0x6a235 and 0x6a24e) right after sceCoredumpSetUserDataType(1): five with a length of 1 and one with a length of 5. After each call it stores a negative result in a 32-bit field of its own object and ignores other results, so the outside-handler error returned here would be stored. What the bytes mean is not shown.

sceCoredumpAttachUserFile, sceCoredumpAttachMemoryRegionAsUserFile cannot write files to an active coredump. Native null-name checks, the signed 32-bit memory length and SDK 6.50 flag validation are recovered. Nonnegative requests return the outside-handler error; negative memory lengths are ignored after name/flag validation. Kernel-side path handling and capture limits remain unimplemented. One title (PPSA21480) disassembled for this entry calls sceCoredumpAttachMemoryRegionAsUserFile (arguments set up at 0x83177-0x83186) with 0, a stack buffer that it first passes to a helper function, the length 0x1618 and a file name string, only when a flag of the title is set, and sceCoredumpAttachUserFile (arguments set up at 0x831cb and 0x831d2) with 0 and a string, only when a method of the title returns a nonzero pointer. It checks both results only for a negative value. What the first argument 0 and the strings mean on the console is not shown.

Fix: branch docs/debt-coredump-getstopinfocpu-title.

AI-assisted (Claude Code).

<!-- greyfinch-sync:boykopovar/AnyPS5:issue:5994908387 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/issues/10088). Originally posted by [xXPBSXx](https://github.com/xXPBSXx) on 2026-10-23T08:57:34Z. --- The debt entry in `docs/dev/debt/libkernel.md` records what one or more title call sites show; this updates it (call-site addresses included so the reading can be checked). The changed entry now reads: > [sceCoredumpSetUserDataType](../../../core/libs/prx/libkernel/System/src/Coredump.cpp) (libkernel, NID `Uxqkdta7wEg`) - `(int type)` follows the PS5 12.00 `libkernel.sprx` at 0x138B0: the sign-extended `type` goes to syscall 601 (command 29, third argument 0), and the raw result comes back with no SCE code mapping, so a kernel error is -1 with `errno` set. Which types the kernel accepts is not measured. No dump is produced here, so every type returns 0. Palworld (PPSA23126, #2598) and Hello Neighbor (PPSA35154, discussion #6991) import it; #4144 left it throwing because no signature was known. PPSA02225 also imports it: its one call (at 0x6a1b2) passes 1 and does not read the result. > > [sceCoredumpGetStopInfoCpu](../../../core/libs/prx/libkernel/System/src/Coredump.cpp) has no active coredump context. Native null/size validation is recovered, including both 8-byte and 16-byte records; valid requests return `NOT_IN_COREDUMP_HANDLER` without accessing the output. Active-handler data retrieval remains unimplemented. One title (PPSA02225) disassembled for this entry calls it once (arguments set up at 0x8d67dd and 0x8d67e1) with a stack buffer and the length 0x10: for 0x81180005 it branches away, for 0 it reads a 32-bit code at offset 8 of the buffer, and for any other nonzero result, which includes the `NOT_IN_COREDUMP_HANDLER` result returned here, it formats an error text containing the code. The call does not show what the console returns outside a coredump handler. > > [sceCoredumpWriteUserData, sceCoredumpDebugTextOut](../../../core/libs/prx/libkernel/System/src/Coredump.cpp) have no active coredump report. WriteUserData validates a nonnull buffer and size at most `INT32_MAX`, including zero; accepted requests return the sign-extended outside-handler error. DebugTextOut still prints to stderr instead of a report; its validation and report integration remain unverified. One title (PPSA02225) disassembled for this entry makes six calls to `sceCoredumpWriteUserData` (at 0x6a1c4, 0x6a1e1, 0x6a1fe, 0x6a21b, 0x6a235 and 0x6a24e) right after `sceCoredumpSetUserDataType(1)`: five with a length of 1 and one with a length of 5. After each call it stores a negative result in a 32-bit field of its own object and ignores other results, so the outside-handler error returned here would be stored. What the bytes mean is not shown. > > [sceCoredumpAttachUserFile, sceCoredumpAttachMemoryRegionAsUserFile](../../../core/libs/prx/libkernel/System/src/Coredump.cpp) cannot write files to an active coredump. Native null-name checks, the signed 32-bit memory length and SDK 6.50 flag validation are recovered. Nonnegative requests return the outside-handler error; negative memory lengths are ignored after name/flag validation. Kernel-side path handling and capture limits remain unimplemented. One title (PPSA21480) disassembled for this entry calls `sceCoredumpAttachMemoryRegionAsUserFile` (arguments set up at 0x83177-0x83186) with 0, a stack buffer that it first passes to a helper function, the length 0x1618 and a file name string, only when a flag of the title is set, and `sceCoredumpAttachUserFile` (arguments set up at 0x831cb and 0x831d2) with 0 and a string, only when a method of the title returns a nonzero pointer. It checks both results only for a negative value. What the first argument 0 and the strings mean on the console is not shown. Fix: branch `docs/debt-coredump-getstopinfocpu-title`. AI-assisted (Claude Code).
Sign in to join this conversation.
No labels
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
boykopovar/AnyPS5#10088
No description provided.