-
Notifications
You must be signed in to change notification settings - Fork 32
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
Add support for SYS_sendmmsg in wrap_scope_syscall - 1586 #1589
Merged
Conversation
This file contains 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
9f83735
to
05f5cee
Compare
- In the case of the `host` application [1], the `host` app uses `libuv` to perform the DNS lookup. - `uv__udp_sendmsg` uses the `syscall` to perform the sending message operation. The decision of whether to use `syscall` or `sendmsg` is based on checking the value of the `uv__sendmmsg_avail` variable in `uv__udp_sendmsg` [2]. - `uv__udp_recvmsg` uses `recvmsg` to perform the receiving message operation. The decision of whether to use `syscall` or `recvmsg` is based on checking the result of `uv_udp_using_recvmmsg` [3]. - The above explains why `libuv` uses `syscall` for sending messages and `recvmsg` for receiving messages. - Additionally `libuv` check support for `recvmmsg()` and `sendmmsg()` using `uv__udp_mmsg_init` with calling `uv__sendmmsg(s, NULL, 0, 0)` [4] The stack traces for the and `uv__udp_sendmsg` and `uv__udp_recvmsg`: ``` [#0] syscall() [#1] uv__sendmmsg(...) [#2] uv__udp_sendmmsg(..) [#3] uv__udp_sendmsg(...) [#4] uv__udp_send(...) [#5] uv_udp_send(...) ``` ``` [#0] recvmsg [#1] uv__udp_recvmsg ``` Ref: [1] https://github.com/isc-projects/bind9 [2] libuv/libuv@3d71366 [3] libuv/libuv@6b5aa66 [4] libuv/libuv@3d71366 Closes: #1586
05f5cee
to
eeb8ff4
Compare
The application can use empty values to check if the `sendmmsg` or `recvmmsg` are supported Ref: libuv/libuv@3d71366
- ensure that we will not process `msg` as NULL
eeb8ff4
to
d1f7f5c
Compare
iapaddler
reviewed
Jul 17, 2023
msg_modify->msg_iovlen &= 0xFFFFFFFF; | ||
msg_controllen_orig = msg->msg_controllen; | ||
msg_modify->msg_controllen &= 0xFFFFFFFF; | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are these tabs and not spaces?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
They are spaces. The GitHub diff view is indicating that indentation was changed.
iapaddler
approved these changes
Jul 17, 2023
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.
Ref #1586