You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
sceNetRecvmsg copied received bytes into guest vectors and updated the message header without the host-write guards used by the other socket receive functions. On Windows, tracked mappings of shared direct memory can be armed read-only. The scatter copy and header update can then fault, and a logically read-only output faults instead of returning EFAULT.
Keep the existing GuestArena::HostWrite guards for the message and each nonempty vector through receive and scatter delivery. Refuse a read-only output before consuming the queued data. If a later vector is refused, earlier guards are released automatically.
Extend the existing watched-socket fixture for sceNetRecvmsg over UDP and TCP, using three vectors including an empty one. It checks boundaries, short receives, peek, unchanged errno, error cleanup, read-only vectors and headers, and collection during a blocking receive.
Tested
Windows 11 Pro 10.0.26300, supported WinLibs GCC 15.2.0, Release, based on main e34c47921.
The two added UDP/TCP cases both fail with access violations on main. After guarding the vectors, the added read-only message check still faults at its flags field; guarding the message header resolves that too.
Full default Windows build passed after rebase. All 19 related CTest cases passed in 2.50 s: the 14 watched-socket cases, four datagram receive cases and guest_sce_net.
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.
Checked the diff: the HostWrite guards on the message and each non-empty iovec are opened before the queued data is consumed, after message_length has validated null/iov_length/null bases, and a refused later vector releases the earlier guards. The new sceNetRecvmsg cases extend the existing watched-socket fixture. Linux build and the scoped ctest (libs + libSceNet, 37 tests) are green; the new cases are Windows-only, so they will run in the Windows job. Merging once that is green.
Re-checked against current main: the HostWrite guards on the message and each non-empty iovec are opened before the queued data is consumed, after message_length has validated null/iov_length/null bases, and a refused later vector releases the earlier guards. The new sceNetRecvmsg cases extend the existing watched-socket fixture. Linux build and the scoped ctest (libs + libSceNet, 39 tests) are green; the new cases are Windows-only, so they will run in the Windows job. Merging once that is green.
Re-checked against current main (after #5928): the HostWrite guards on the message and each non-empty iovec are opened before the queued data is consumed, after message_length has validated the vectors, and a refused later vector releases the earlier guards. The new sceNetRecvmsg cases extend the existing watched-socket fixture. Linux build and ctest are green for libSceNet (guest_sce_net); the new cases are Windows-only, so they will run in the Windows job. Merging once that is green.
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
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
sceNetRecvmsgcopied received bytes into guest vectors and updated the message header without the host-write guards used by the other socket receive functions. On Windows, tracked mappings of shared direct memory can be armed read-only. The scatter copy and header update can then fault, and a logically read-only output faults instead of returningEFAULT.Keep the existing
GuestArena::HostWriteguards for the message and each nonempty vector through receive and scatter delivery. Refuse a read-only output before consuming the queued data. If a later vector is refused, earlier guards are released automatically.Extend the existing watched-socket fixture for
sceNetRecvmsgover UDP and TCP, using three vectors including an empty one. It checks boundaries, short receives, peek, unchanged errno, error cleanup, read-only vectors and headers, and collection during a blocking receive.Tested
Windows 11 Pro 10.0.26300, supported WinLibs GCC 15.2.0, Release, based on main
e34c47921.guest_sce_net.Checklist
main; no other open PR implements the same functionsFull platform runtime CI requires a write-access collaborator to dispatch it under repository policy.