fix(libSceNet): list libkernel sockets in sceNetGetSockInfo6 #21705
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/21705"
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 AasishDairelSahayaGrinspan on 2026-11-16T16:21:34Z.
What
sceNetGetSockInfo6looked only at thesceNetdescriptor table, wheresceNetGetSockInforesolves both its own sockets and the libkernel table. A socket made with libkernelsocket()therefore answeredEBADFfrom the specific-id form and was absent from thes < 0list, contradicting technical debt entries 105 and 108 (measured on PS4 Pro 10.71: such a socket is described from the libkernel table and listed).fill_sock_info6now resolves its source through the existingfind_sock_info_source(descriptor table first, thenKernelDescribeSocket, priority 0 unchanged) and the list path adds theKernelListSocketspass with the same IPv6 /0x1000family filter and ascending order assceNetGetSockInfo. Everything else is unchanged.Tested
Linux (Omarchy 4.0.2), host build
ReleasewithBUILD_TESTING=ON:build/tests/guest_sce_net_tests— exit 0, 1.7 sctest --test-dir build -R "guest_sce_net"— 8/8 Passed, 2.2 s totalThe new case creates a libkernel
socket(), checks it is absent from theflags 0list and present under0x1000/0x1040, that the specific-id call answersEAFNOSUPPORTwithout0x1000and fills the record with0x1000, and that it answersEBADFand disappears from the list after close.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)Imported from boykopovar/AnyPS5. Originally posted by PrivacyOnion on 2026-11-16T16:23:21Z.
Review: APPROVED
Verified on Linux (Ubuntu 24.04, GCC 13.3, Ninja, Release) against
5f8bc742f3:tools/check_conventions.pypassed;git diff --checkclean.guest_sce_net_testsbuilt cleanly.guest_sce_net):core/libs/prx/libSceNet/Export.cppreverted tomainand the new tests kept, the suite fails: Restoring the change makes it pass again.Looks Good To Me
Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-11-20T07:45:40Z.
Review: APPROVED
Reviewed — looks good
The reviewed change at head
5f8bc742f3604acab0a1fa4d131aa5755e67ef01addresses the described libkernel socket lookup and listing gap, and the inspected code supports merging.What I ran
Read the prepared description, commit list, manifest, diff, and all changed lines in the three changed files. Inspected
find_sock_info_source, its libkernel descriptor lookup, and the list filling path at the pinned head. No commands or tests were run; the Linux build and test results in the description are author-reported.Results
Findings
Blocking
None.
Non-blocking
None.
Sources
The specific-id path now uses the existing source resolver, which checks the
sceNettable and then asks libkernel to describe the descriptor. The list path adds kernel sockets, filters by family, sorts descriptors, and skips sockets that disappear before filling their records. These behaviors are visible in Export.cpp at the reviewed head. Tests cover IPv4 inclusion flags, specific-id results, and behavior after closing the kernel socket in GuestSceNet.cpp at the reviewed head.Not verified
No build, test, or console run was performed. The author's stated host build and test results were not independently verified. All three changed files listed in the manifest were read; no changed files were excluded.
To get this to a good state
Nothing is required.