feat(libkernel): add Linux socketpair support #1795
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/1795"
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 PrintOrb on 2026-10-08T19:24:19Z.
Summary
Implement Linux
socketpair()compatibility inlibkernelusing native Unix-domain sockets and AnyPS5's virtual descriptor infrastructure.This PR is scoped exclusively to socket-pair support. The overlapping
lstat()changes have been removed in favor of the canonical implementation being developed in #1624.Changes
socketpair()for local stream and datagram sockets on Linux.send()andrecv()paths.socketpair_smoke.cppcovering bidirectional communication, descriptor closure, and invalid arguments.Validation
guest_dynamic_loader, also failed on a clean upstream checkout in the same environment.Pending: The newly registered
socketpair_smokeCTest target has not yet been built and executed on Linux after the latest changes.Scope and limitations
lstat()implementation is included in the updated PR.AI assistance disclosure
ChatGPT assisted with implementation, debugging, code review, and test preparation. The contributor reviewed and tested the changes described above.
Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-08T21:04:56Z.
I reviewed the full diff against #1624 and the current checks. Two follow-ups before this is ready:
lstat_nid_postfixexport andNativeStatpath as #1624. The changes are independent ofsocketpair, and CONTRIBUTING asks for one topic per PR. Please droplstatfrom this PR and keep it focused onsocketpair, or coordinate one canonicallstatimplementation with #1624’s author. #1624 already tests symlinks and dangling symlinks on Linux; this PR’s Windows path silently returnsstatresults for symlinks.tests/compat/socketpair_smoke.cppis not referenced by any CMake file, so it is not built or run by CTest. Please register it with the test targets or move its coverage into a registered test. The PR body also says CTest registration was not confirmed.main0447793. CONTRIBUTING asks to keep the branch based on currentmain; please rebase and rerun the checks after resolving the scope and test items.No upstream Build or Conventions checks are currently reported on this head.
Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-08T21:49:00Z.
Follow-up on the lstat overlap: #1624’s author confirmed they will keep one canonical
lstat, and their current fork Build completed successfully across Linux, Windows and relinker jobs. Please keeplstatout of this PR (or agree a handoff with #1624’s author) and retain only the independently scopedsocketpairwork here; the current duplicate is still open.Imported from boykopovar/AnyPS5. Originally posted by PrintOrb on 2026-10-08T23:06:48Z.
Thanks for the follow-up! I've pushed an updated branch that removes the lstat() implementation entirely, leaving #1624 as the canonical implementation.
This PR now contains only the Linux socketpair() changes and their associated tests. I've also registered the smoke test with CMake/CTest, rebased onto current main, and rerun the conventions checker successfully.
The PR description has been updated to reflect the revised scope. Linux execution of the newly registered CTest target is still pending.
I also noticed the automated overlap report flags #1711 and #1839 for socketpair_nid_postfix. I'll review those implementations to ensure we're not duplicating another contribution.
Thanks again for the review and guidance!
Imported from boykopovar/AnyPS5. Originally posted by PrintOrb on 2026-10-08T23:11:51Z.
After reviewing the overlapping PRs, I see that #1711 already provides a more comprehensive socketpair() implementation, including Windows support and additional socket semantics.
Rather than maintaining competing implementations, I'm happy to defer to #1711 as the canonical implementation and assist with testing, debugging, or follow-up improvements where useful.
I'd also be glad to contribute elsewhere in the project if there are other areas that could use assistance. I'm particularly interested in networking, libkernel compatibility, and resolving missing functionality, but I'm open to helping wherever it's needed.
Thanks again for the review and guidance. I appreciate the opportunity to contribute and look forward to continuing to work on the project.
Imported from boykopovar/AnyPS5. Originally posted by oneandonlydean on 2026-10-09T09:29:45Z.
Closing, as you suggested: #1711 implements
socketpairon both platforms, with a registered test.Pull request closed