fix(libSceNpSessionSignaling): return the firmware lookup results #8320
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/8320"
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-20T10:02:56Z.
What
Implements five signaling lookups and fixes a sixth, using the decrypted
libSceNpSessionSignaling.sprxas evidence.Firmware pattern. Every export follows the same shape:
0x80553301if the library isn't initialised;0x80553303for a null one;0x80553308if that fails;0xd0560.What the inner methods return. Each inner method locks the context, walks its group list (
[ctx + 0x140]) and returns0x8055330Aif the group isn't there. The methods without a group argument walk the connections and return0x8055330Cinstead. Upstream never activates a session, so no group or connection exists, and every lookup ends with that code.mainnow tracks initialisation and contexts, so each export first returns0x80553301before initialisation and0x80553308for an unknown context, in the console's order.sceNpSessionSignalingGetGroupInfo(WtOs6cUbrx8, was a throwing stub)(ctx, group, info*), slot0x1300x80553303for a null info, else0x8055330AsceNpSessionSignalingGetConnectionFromNetAddress2(hbNcE4fnBDs, was a throwing stub)(ctx, group, addr, port, connId*), slot0x160connId0x80553303, else0x8055330AsceNpSessionSignalingGetConnectionFromNetAddress(RcGZnakPiOk, was a throwing stub)(ctx, addr, port, connId*), slot0x150connId0x80553303, else0x8055330CsceNpSessionSignalingGetConnectionFromPeerAddress(dJJ0UPrrsok, was a throwing stub)(ctx, peer*, connId*), slot0x1480x80553303, else0x8055330CsceNpSessionSignalingGetGroupFromSessionId(UGcXquhVYrY, was a throwing stub)(ctx, sessionId*, group*), slot0x1700x80553303, else0x8055330AsceNpSessionSignalingGetConnectionFromPeerAddress2(DicBhsm2iR4, now implemented the same way onmain, unchanged here)(ctx, group, peer*, connId*), slot0x1580x80553303, else0x8055330Adocs/dev/debt/libSceNpSessionSignaling.md: the three "signature unknown" entries for these exports are replaced by one entry. It says every lookup on a valid context ends at not-found, and that the signatures and the checks before that are the console's.GetConnectionFromNetAddressleaves the "names and NIDs only" entry. TheGetGroupFromSessionIdentry that #6039 adds to a new debt file ("signature unknown") becomes obsolete once this lands.Tested
Linux (CachyOS, GCC, Release).
guest_np_session_signaling_testspasses. It now covers each export's null-argument result and its not-found result, and checks that no failed lookup writes an output.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)GetGroupInfo(and PPSA31327GetConnectionFromNetAddress2); not run with either title🤖 Generated with Claude Code
https://claude.ai/code/session_01RbLgECLQ2bpDM7oe2urGZK
Imported from boykopovar/AnyPS5. Originally posted by github-actions[bot] on 2026-10-20T10:03:40Z.
Progress report (
6ef5a1c→400d333)📈 System libraries: 42.38% (+0.05%, +5 implemented functions)
✅ 5 implemented
sceNpSessionSignalingGetConnectionFromNetAddresssceNpSessionSignalingGetConnectionFromNetAddress2sceNpSessionSignalingGetConnectionFromPeerAddresssceNpSessionSignalingGetGroupFromSessionIdsceNpSessionSignalingGetGroupInfoImported from boykopovar/AnyPS5. Originally posted by oneandonlydean on 2026-10-20T10:06:11Z.
Thanks, the argument checks and not-found codes are clear, and the test checks that a failed lookup writes nothing.
One thing to update with it:
docs/dev/debt/libSceNpSessionSignaling.mdstill describes these exports as they were before.sceNpSessionSignalingGetConnectionFromPeerAddressis listed as added without an implementation,sceNpSessionSignalingGetGroupInfoandsceNpSessionSignalingGetConnectionFromNetAddress2as declared without parameters with unknown signatures, andsceNpSessionSignalingGetConnectionFromNetAddressandsceNpSessionSignalingGetGroupFromSessionIdin the list after them. Could you remove or update those entries in this PR? Since the firmware's "not initialised" (0x80553301) and unknown-context (0x80553308) checks are not reproduced here, a short note saying so would keep the file accurate.Imported from boykopovar/AnyPS5. Originally posted by hypermoist on 2026-10-20T10:08:13Z.
Thanks, updated in the latest push:
docs/dev/debt/libSceNpSessionSignaling.md, the entries that described these exports as unimplemented or with unknown signatures are gone: theGetConnectionFromPeerAddressentry, the PPSA31327GetGroupInfo/GetConnectionFromNetAddress2entry, andGetConnectionFromNetAddressin the 3.20 inventory list.0x80553301) and unknown-context (0x80553308) checks are not reproduced, because neither is tracked here, so those cases also get the not-found result.I merged
maininto the branch to pick up the debt file, so there was no force-push.Imported from boykopovar/AnyPS5. Originally posted by xXPBSXx on 2026-10-21T05:44:49Z.
Windows data point for
6cd31eeaamerged ontomain1fd67185b(clean,git merge-treerc 0): Windows 10.0.19045, MinGW-w64 GCC 15.2.0, Release.ctest -N -R '^guest_np_session_signaling$'lists exactly that one test;ctest --no-tests=error -R '^guest_np_session_signaling$'was run three times per tree.core/libs/prx/libSceNpSessionSignaling/Export.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 BunnyFl on 2026-10-22T08:42:53Z.
Checked the six exports against firmware 13.42: the same order of checks (not initialised, null outputs, unknown context), the same arguments checked for null, and the same vtable slots. I didn't trace the inner methods' not-found codes.
AI-assisted: yes (Claude Code)
Imported from boykopovar/AnyPS5. Originally posted by hypermoist on 2026-10-22T09:10:17Z.
@BunnyFl thanks for checking against 13.42. Your order (not initialised, null outputs, unknown context) matches what I read from 12.00 and what the six lookups now do. @xXPBSXx thanks for the Windows run and its control.