fix(libSceNet): accept MSG_NOSIGNAL in send, sendto and sendmsg #11037
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/11037"
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 Bram910 on 2026-10-25T14:42:49Z.
What
Accept
MSG_NOSIGNAL(0x20000) insceNetSend,sceNetSendtoandsceNetSendmsg. They accepted onlyMSG_DONTWAITand failed every other flag withEOPNOTSUPP. Titles built with the PS5 Payload SDK pass FreeBSD'sMSG_NOSIGNAL(itsinclude/freebsd/sys/socket.hdefines it as0x20000). For example, ProsperoTV (PPSA99003) sends every phone-remote reply with it. Under AnyPS5 the reply send failed, ProsperoTV closed the connection, and the phone or browser got an empty response (ERR_EMPTY_RESPONSE), so the phone remote could not be used.The flag changes nothing on the host. Every host send already passes
MSG_NOSIGNALon Linux (NATIVE_SEND_FLAGS), and Windows raises noSIGPIPE. A send on a stream whose write side is shut down still fails withEPIPE, and other unsupported flags still fail withEOPNOTSUPP.sceNetSendmsgforwards tosceNetSendto, so the two changed checks cover all three calls.libkernel's
sendandsendtoalready accept this flag (#1279, merged). The same libSceNet change was proposed twice before (#2406, #2835); both were closed by the intake bot while intake was paused, not after review.A new
CheckNoSignalinGuestSceNet.cppcovers a loopback TCP connection. It sends withMSG_NOSIGNALthroughsceNetSend,sceNetSendto(also withMSG_DONTWAIT) andsceNetSendmsg, and checks that the bytes arrive. It also checks thatMSG_NOSIGNAL | MSG_PEEKstill fails withEOPNOTSUPP, and thatMSG_NOSIGNALsends aftershutdown(SHUT_WR)fail withEPIPE. The debt entry records that the flag value follows FreeBSD and is not measured on a console.Tested
main3a2c51afd2ee6a824cd3a294912c65e6bbf2b768; head32744645c48be917ebf1517211209b9522a2e703.PPSA99003.zip, SHA-256 checked against the release'sSHA256SUMS), converted withrelinker --windows. On unchanged main,GET http://127.0.0.1:8888/gets an empty reply. With this change it returnsHTTP 200, the 18,900-byte remote page. ProsperoRadio (PPSA99001) and ProsperoLight (PPSA99002) start and render as before.guest_sce_netpasses 3/3 with the change. With only theExport.cppchange reverted, it aborts at the firstMSG_NOSIGNALsend. On the rebased head it passes 5/5 consecutive runs, and the 75 related network tests (guest_sce_net,net_dontwait*,guest_datagram*,guest_socket_host_write*,guest_refused_connect,guest_net_buffer_validation, TCP/UDP, SSL and HTTP) pass.agc_host_import_cut_lifetime(#10746, fixed by #10785) andagc_driver_depth_plane_partial_store(#10664, fixed by #10696) are knownmainfailures.pad_sdlaborts because a physical DualSense on this machine takes controller slot 0 ahead of the test's virtual controller; the test does not link libSceNet.guest_sce_netpasses 3/3 with the change and aborts with only the fix reverted. On the rebased head it passes 5/5 consecutive runs, and the 40 related network tests pass. WSL has only a software Vulkan device, so the full Linux suite was not used for this change.python tools/check_conventions.py --base origin/main --head HEADandgit diff --check origin/main...HEADpass.tools/pr_overlap.pyneedsgh, which this machine does not have. Instead, every open PR's head was fetched and diffed againstmain; none acceptsMSG_NOSIGNALin libSceNet. #10949 and #10881 touch the same files and merge cleanly with this branch. #5836, #7201 and #9733 also touch them but already conflict withmainon their own.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)🤖 Generated with Claude Code
Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-25T15:01:52Z.
Review: APPROVED
Reviewed exact head
32744645c48be917ebf1517211209b9522a2e703. The change admits the FreeBSDMSG_NOSIGNALbit for the three send APIs while preserving rejection of other unsupported flags;sendmsgforwards through the validatedsendtopath. FreeBSD 11.4 defines the flag as0x20000and suppresses SIGPIPE on EPIPE when it is set (sys/sys/socket.h and sys/kern/uipc_syscalls.c). The changed source and regression test compile with GCC 12.2; exact-head diff and conventions checks pass. The PR reports Windows and WSL red/green tests and homebrew reproduction; I did not independently reproduce those runtime results. Hosted product jobs are skipped by path policy.