mirror of
https://github.com/boykopovar/AnyPS5.git
synced 2026-12-04 16:40:32 +00:00
* feat(libSceSysmodule): register libSceNpParty 0x0097 as public module * test(libSceSysmodule): verify libSceNpParty 0x0097 load and lifecycle in GuestSysmodule * test(libSceSysmodule): add 0x0097 to CheckAcceptedIdSet and update count * feat(libSceSysmodule): scope PS4-only module IDs to PS4 processes * docs(dev): document PS4 process module ID acceptance in libSceSysmodule debt * test(libSceSysmodule): verify PS4 module ID acceptance across process types * test(libSceSysmodule): check named PS4 module IDs exist in module table * fix(libSceSysmodule): accept 0xd7 (libSceDiscMap) in a PS4 process Co-authored-by: AdamGal <34386517+adam25136@users.noreply.github.com>
8.9 KiB
8.9 KiB
libSceSysmodule technical debt
Additional callable exports
- Additional callable exports - 5 entries present in both version-labelled images are import-resolution declarations only. All belong to module
libSceSysmodule; two have logical librarylibSceSysmoduleand three have logical librarylibSceSysmodule_jvm. Neither label independently authenticates retail firmware provenance. Parameter lists, return types and behavior are unverified; parameterlessintdeclarations are placeholders, not verified ABI contracts. Every entry throws throughNotImplemented_nid_no_patch. Unidentified names use literal NID aliases. No runtime functionality is implemented. Identified candidate names match their NIDs in the public symbol database or supplemental catalog.
| Name | NID |
|---|---|
Unknown |
5gs662NWKhE |
Unknown |
6XFxHG0KhBg |
Unknown |
9Q9uHJVfB4w |
Unknown |
kMn8gDsKp9Y |
Unknown |
uQqnJudN5fY |
Silent stubs
- sceSysmoduleIsLoaded, sceSysmoduleLoadModule, sceSysmoduleUnloadModule (libSceSysmodule) accept the 141 ids
sceSysmoduleIsLoadeddid not reject in a payload process on a PS5 (firmware 13.60) and return0x805A1000for every other id in a PS5 process, as the console does; that includes 51 ids the module table names from older firmware, such as 0x0001 (libSceAudioOut). Load and unload are counted as measured. The 21 accepted ids the table does not name (0x0111, 0x0117, 0x011c to 0x011f, 0x0121 to 0x0124, 0x0129, 0x012c to 0x012e, 0x0133, 0x0134, 0x0136 and 0x013a to 0x013d) are logged and return 0 without loading anything, sosceSysmoduleIsLoadedreports them as loaded; which module each loads is not known. Loading id 0x00ff ended the payload process. One title (PPSA04354) callssceSysmoduleIsLoadedwith id 0x96 at twelve sites and loads it only when the result is 0x805a1001; any other result lets it continue. - sceSysmoduleIsLoaded, sceSysmoduleLoadModule, sceSysmoduleUnloadModule (libSceSysmodule) - which ids a PS4 process on a PS5 accepts or rejects was not measured. In a PS4 process (
sceKernelIsPs4Process) the three calls also accept four of the 51 ids above, each passed tosceSysmoduleLoadModuleby a title: from GTA V (CUSA00419 01.57), 0x0097 (libSceNpParty, at 0x1b45419; the title asserts when it fails), 0x00b2 (libSceNpProfileDialog, at 0x1b42c22; when it fails, the next five calls, 0x00a2 among them, are not made) and 0x00a2 (libSceInvitationDialog, at 0x1b42c3e); from inFAMOUS Second Son (CUSA00223 01.07), 0x00d7 (libSceDiscMap, at 0x395ee in its ownlibSceFios2.prx; when it fails,sceFiosInitializefails). Read from the titles' code and runs, not measured on a console. The other 47 stay rejected in a PS4 process until a title is seen to pass one of them. - sceSysmoduleIsLoadedInternal, sceSysmoduleLoadModuleInternal, sceSysmoduleUnloadModuleInternal, sceSysmoduleLoadModuleInternalWithArg, sceSysmoduleUnloadModuleInternalWithArg (libSceSysmodule) - an internal id missing from the module table throws, except 0x8000ffff and 0x80ffff00 in
sceSysmoduleIsLoadedInternal,sceSysmoduleLoadModuleInternalandsceSysmoduleUnloadModuleInternal, and 0x00ffffff insceSysmoduleIsLoadedInternal, which return0x805A1000as those functions did for them in a payload process on a PS5 (firmware 12.70); theWithArgvariants throw for them too.sceSysmoduleLoadModuleInternal(0x800000c4)andsceSysmoduleUnloadModuleInternal(0x800000c4)also throw. Which other internal ids the console rejects, and what theWithArgvariants return for a missing id, is not measured.
Unknown function info
- kModuleTable (libSceSysmodule) - module id 0x00000132 is named
libSceProprietaryVoiceChatHelperPrx, the name of the built module, becausesceSysmoduleGetModuleHandleInternalopenslibs/<table name>.prx. The name the console's table uses for this id is not verified - kModuleTable (libSceSysmodule) - module IDs registered from decrypted PS5 firmware 1.00–3.20 sysmodule lookup tables:
- User-space IDs (0x00000005, 0x0000010a, 0x0000010e, 0x0000011b, 0x00000125, 0x00000126, 0x00000127, 0x00000128, 0x0000012a, 0x0000012b, 0x00000130) and internal IDs (0x8000007b, 0x8000007e, 0x8000007f, 0x80000080, 0x80000082, 0x80000083, 0x80000084, 0x80000085, 0x80000086, 0x80000087, 0x80000088, 0x80000089, 0x8000008e, 0x80000090, 0x80000091, 0x80000092, 0x80000093, 0x80000095, 0x80000097, 0x80000099, 0x8000009b, 0x8000009c, 0x8000009e, 0x8000009f, 0x800000a0, 0x800000a1, 0x800000a2, 0x800000a3, 0x800000a4, 0x800000a6, 0x800000a7, 0x800000a8, 0x800000a9, 0x800000ad, 0x800000ae, 0x800000af, 0x800000b0, 0x800000b2, 0x800000b3, 0x800000b4, 0x800000b5, 0x800000b6, 0x800000b7, 0x800000b9, 0x800000ba, 0x800000bb, 0x800000bc, 0x800000bd, 0x800000be, 0x800000bf, 0x800000c3); whether all mapped PRX modules exist as separate runtime files or are embedded in system daemons on retail consoles is unverified
- Dual IDs for
libSceNgs2(0x0000000b user / 0x80000090 internal) andlibSceHdrScopes(0x00000109 user / 0x800000bd internal) reflect distinct public and internal sysmodule identifiers defined in PS5 firmware SDKs
- sceSysmoduleIsCalledFromSysModule, sceSysmoduleIsCameraPreloaded, sceSysmoduleMapLibcForLibkernel, sceSysmodulePreloadModuleForLibkernel and sceSysmoduleUnloadModuleByNameInternal (libSceSysmodule) - names and NIDs are present in the PS5 3.20 export inventory. The exports had no credible prototypes and are declared without parameters solely to resolve known imports; they make no ABI claim.
- sceSysmoduleLoadModuleByNameInternal (libSceSysmodule) - verified against firmware 4.03's
libSceSysmodule.sprx: a nullfnamereturnsSCE_KERNEL_ERROR_EINVAL, otherwise the export formats/<root>/<tier>/lib/<fname>.<ext>and triessceKernelLoadStartModuleForSysmoduleon each candidate in order, returning the first positive result or the last error. The candidate roots are thesceKernelGetFsSandboxRandomWordprefix and the literalssystem_exandsystem, the tiers arepriv_ex,common_ex,privandcommon, and the.sprxsearch precedes.prx. The caller'sargs,argp,flagsandresforward to the loader; the option pointer stays null. Firmware'ssceKernelLoadStartModuleForSysmoduleORs0x10000into the flags and bypasses thesceKernelLoadStartModuleflags-must-be-zero gate, so a nonzeroflagsis accepted on console but rejected here, where the host loader has no flag semantics. On the host only/<sandbox>/common/lib/and/system/common/lib/translate tolibs/<name>.prx; the other candidates fail to open and are skipped, which matches the console's missing-path fallthrough.
Functional
- sceSysmoduleGetModuleInfoForUnwind (WebAssembly) throws through the unsupported
sceKernelGetModuleInfoForUnwindpath instead of consulting host process mappings - sceSysmoduleGetModuleInfoForUnwind (libSceSysmodule) - on Windows the region and file name of an address inside a loaded image are cached after the first lookup, because
VirtualQueryon a large image section is slow. An entry is used only while the loader still reports the same image for the address (same base, time stamp and size). A page protection change inside the image after the first lookup, which would split or merge the regionVirtualQueryreports, is not noticed. Addresses outside loaded images are queried every time - sceSysmoduleGetModuleInfoForUnwind (libSceSysmodule) - a null or unmapped
infothrows while preserving errno; the console's result for invalidinfomemory is not measured - sceSysmoduleGetModuleHandleInternal, sceSysmoduleLoadModuleInternalWithArg, sceSysmoduleUnloadModuleInternalWithArg (libSceSysmodule) - copy output module handles and return codes via GuestCopyOut_nid_no_patch preserving host errno. An unmapped handle pointer in sceSysmoduleGetModuleHandleInternal closes the opened module handle and throws, and an unmapped ret pointer in sceSysmoduleLoadModuleInternalWithArg or sceSysmoduleUnloadModuleInternalWithArg throws without mutating load counts, as host-safety fallbacks; console fault behavior on bad memory is unmeasured.