unix: fix host UDS recvmsg results#1370
Open
russellromney wants to merge 1 commit into
Open
Conversation
Host UDS passthrough connected to bind-mounted host socket inodes, but the qvisor recvmsg wrapper did not translate Quark hostfd values to real OS fds. It also reported successful recvmsg calls as zero bytes and converted EAGAIN into a positive byte count. Return the real recvmsg byte count, preserve negative errno values, and use the host UDS recv wrapper on blocking retries so SCM_RIGHTS translation stays consistent. Add a static regression client for bind-mounted host UDS replies.
4e39b5a to
75ccf00
Compare
Collaborator
|
looks good to me |
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.
Summary
Fix host Unix socket
recvmsgpassthrough.The host UDS path already connects to bind-mounted host socket inodes. The receive side was returning the wrong result to the guest.
This change:
libc::recvmsgrecvmsgbyte countFixes #1369.
Test
Original bind-mounted UDS probe:
Regression client under Quark: