feat(libkernel): accept MSG_WAITALL in recv, recvfrom and recvmsg on a stream socket #8474
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/8474"
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 xXPBSXx on 2026-10-20T13:17:01Z.
What
recv,recvfromandrecvmsgfailed every flag butMSG_PEEKandMSG_DONTWAITwithEOPNOTSUPP. FreeBSD 11.4 acceptsMSG_WAITALL(0x40) and, on a stream socket, keeps the receive waiting until the buffer is full, the peer closes or an error occurs (soreceive_generic). A stream socket now passes the flag to the host receive (MSG_WAITALLon Winsock and Linux); a datagram socket ignores it, as a record is delivered whole. The Technical debt entry says what is not measured: nonblocking sockets andMSG_WAITALL | MSG_PEEKfollow the host, andSO_RCVTIMEObounds only the wait for the first data.Fixes #8473
Overlap: #7090 (SCM_RIGHTS, open) also changes
recvmsg;git merge-treeof the two heads has two conflicts inUdp.cpp, so whichever lands second rebases.git merge-treeagainst #8392, #8448, #8463, #7511, #7502, #7485, #7850 and #7490 is clean.pr_overlapwas not run.Tested
Windows 10 (19045), MinGW-w64 GCC 15.2.0, Release, on upstream/main
44e3389c88+ this commit:guest_tcp: the new case aborts without the change toUdp.cpp(recvwith0x40answersEOPNOTSUPP) and passes with it. It checks a 4+4 byte request split by 150 ms, a short result when the peer closes after 2 bytes (recvfrom), and a datagram socket that ignores the flag.guest_sce_net,guest_socket_error,guest_socket_options,guest_socket_timeouts,guest_udp,guest_poll,guest_socket_pairandguest_recvmsg_memorypass.python tools/check_conventions.py --base upstream/main: passes.recvmsgwithMSG_WAITALL(same flag path asrecvfrom, no dedicated case), a nonblocking socket.Checklist
main; no other open PR implements the same functions (#7090 changesrecvmsgfor SCM_RIGHTS).mdfiles or images added to the repositoryAI-assisted (Claude Code).
🤖 Generated with Claude Code
Imported from boykopovar/AnyPS5. Originally posted by github-actions[bot] on 2026-10-20T13:33:35Z.
Other open pull requests touch the same code. Merging one will break the other, or both implement the same thing. If this one builds on them, list them in Depends on.
main)core/libs/prx/libkernel/Socket/src/Udp.cppL1520-1521docs/dev/debt/libkernel.mdL190Some comparisons could not be completed because a pull request conflicts with the base branch. Review these shared files manually before concluding that there is no overlap.
docs/dev/debt/libkernel.mdcore/libs/prx/libkernel/Socket/src/Udp.cppdocs/dev/debt/libkernel.mdcore/libs/tests/GuestTcp.cppdocs/dev/debt/libkernel.mddocs/dev/debt/libkernel.mddocs/dev/debt/libkernel.mddocs/dev/debt/libkernel.mddocs/dev/debt/libkernel.mddocs/dev/debt/libkernel.mddocs/dev/debt/libkernel.mddocs/dev/debt/libkernel.mdcore/libs/prx/libkernel/Socket/src/Udp.cppdocs/dev/debt/libkernel.mddocs/dev/debt/libkernel.mddocs/dev/debt/libkernel.mddocs/dev/debt/libkernel.mddocs/dev/debt/libkernel.mddocs/dev/debt/libkernel.mddocs/dev/debt/libkernel.mddocs/dev/debt/libkernel.mdImported from boykopovar/AnyPS5. Originally posted by adriadam10 on 2026-10-21T18:01:09Z.
Checked the flag path against FreeBSD 11.4
soreceive_generic(stream passesMSG_WAITALLto the host, datagram ignores it), all three call sites on currentmain, the newguest_tcpcase (fails withEOPNOTSUPPwithout the change) and the debt entry; merged.