Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Restructure Socket to use sendmsg and recvmsg #2797

Merged
merged 3 commits into from
Mar 22, 2023

Conversation

stevenengler
Copy link
Contributor

@stevenengler stevenengler commented Mar 21, 2023

This doesn't add support for the sendmsg and recvfrom syscalls, but restructures the socket code so that we can support these syscalls in the future. When reviewing the changes, it might be easier to ignore whitespace changes by appending ?w=1 to the URL on github.

@stevenengler stevenengler self-assigned this Mar 21, 2023
@github-actions github-actions bot added Component: Libraries Support functions like LD_PRELOAD and logging Component: Main Composing the core Shadow executable labels Mar 21, 2023
The flag we were using as an invalid flag in this test is actually a flag for
32-bit compatibility (MSG_CMSG_COMPAT). Most of the 32 bits of the int are
actual flags and more might be added in the future, so it would be brittle to
try and test an unused one. I think it's best to just not test this.
This replaces `Socket::sendto` and `Socket::recvfrom` with `Socket::sendmsg`
and `Socket::recvmsg`.
@github-actions github-actions bot added the Component: Testing Unit and integration tests and frameworks label Mar 22, 2023
@stevenengler stevenengler merged commit bc770a7 into shadow:main Mar 22, 2023
@stevenengler stevenengler deleted the readv-writev branch March 22, 2023 15:28
stevenengler added a commit that referenced this pull request Mar 22, 2023
Similar to #2797, but with `readv` and `writev` instead. This doesn't
add support for the `readv` and `writev` syscalls, but restructures the
socket code so that we can support these syscalls in the future.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Component: Libraries Support functions like LD_PRELOAD and logging Component: Main Composing the core Shadow executable Component: Testing Unit and integration tests and frameworks
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants