Repository navigation
fix(libkernel): keep socket buffer sizes and SO_NBIO as measured on a PS5 - #10302
Merged
oneandonlydean merged 2 commits intoOct 24, 2026
Merged
oneandonlydean merged 2 commits into
oneandonlydean merged 2 commits into
Conversation
… PS5 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
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.
Some 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.
|
This was referenced Oct 23, 2026
…e inherited sizes Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
getsockoptandsetsockoptmeasured on a retail PS5 (firmware 13.60) throughlibkernel_sys.sprxfrom a payload process. The sources and console logs are in this gist (pinettopinet3; the address cases ofpinetwent to #10299). The debt entry had these answers from the FreeBSD 11.4 source, or from the host.The console:
SO_SNDBUF/SO_RCVBUFof 32768/65536 (TCP, IPv4 and IPv6), 9216/42080 (UDP), 8192/8192 (AF_UNIXstream and seqpacket) and 2048/4096 (AF_UNIXdatagram), andSO_SNDLOWAT/SO_RCVLOWATof 2048/1;ENOBUFS(55) and below 1 withEINVAL;SO_NBIOback as 0x100 (SS_NBIO), not 1;setsockoptvalue with a length withEFAULTbefore it looks at the descriptor or the option, and answers a nullgetsockoptvalue with success and length 0.AnyPS5 read the host's buffer sizes, failed the low-water marks with
ENOPROTOOPT, readSO_NBIOas 1, and answered both null values withEINVAL. The four sizes are now kept per socket, set on the host as well, and copied to an accepted socket as FreeBSD'ssonewconndoes. The 6000-charactergetsockopt, setsockoptdebt entry is split by option, keeps only what still differs or was not measured, and now lists the options the console accepts that fail here (SO_REUSEPORT,SO_DEBUG,SO_TIMESTAMP,IP_TTL,IP_TOS,TCP_MAXSEG,TCP_KEEPIDLE).Tested
Windows 11, MinGW (winlibs).
guest_socket_optionschecks the defaults, the limits, the low-water clipping, theAF_UNIXsizes and the null values;guest_socket_stream_optionschecksSO_NBIO. The socket and net tests pass three runs in a row.-E "^agc_|^select_tests$") passes.tools/check_conventions.pypasses.tools/pr_overlap.py: fix(libkernel): validate the pointers of getsockopt and setsockopt like FreeBSD #7511, fix(libkernel): fail an unknown setsockopt or getsockopt level with EINVAL like FreeBSD #8448, docs(debt): record what a Windows UDP socket keeps after connect(AF_UNSPEC) #8921 touch nearby lines; whichever lands second keeps both.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)