Conversation
Protect file-style socket reads used by TLS BIOs against divergence between FIONBIO file flags and the socket mode. The runtime synchronization fix is already present in DragonOS-Community#2317; no additional kernel or nginx workaround is needed. Add eight parameterized cases covering TCP, UDP, Unix streams and Unix datagrams. Check empty-queue EAGAIN through a duplicated descriptor, successful reads followed by EAGAIN after draining, and restored blocking reads after FIONBIO is cleared. Reuse the existing bounded child watchdog and socket ownership helper. Send one byte to avoid assuming stream reads fill their buffers. Validation: all 19 socket_nonblocking tests pass on Linux and DragonOS. All eight new cases detect erroneous blocking with the previous nonblocking implementation restored in a controlled guest. On current master, 75 focused guest tests and 200 TLS 1.2/1.3 HTTPS requests pass, including verified keepalive reuse. Kernel build, formatting checks, and independent plan/code review pass. Signed-off-by: longjin <longjin@dragonos.org>
Member
Author
|
@codex review |
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
Add eight dunitest regression cases for FIONBIO-controlled
readandreadvon TCP, UDP, Unix stream and Unix datagram sockets.The nonblocking state synchronization fix merged in #2317 also resolves the nginx HTTPS handshake-success/HTTP-timeout symptom. This PR adds missing file-style read coverage; it does not introduce another kernel change or an nginx workaround.
Coverage and design
dup.Validation
make kernel,FMT_CHECK=1 make fmt, andgit diff --checkpass.The HTTPS checks cover IPv4 HTTP/1.1 with a short static response; they are not a claim of complete TLS or nginx compatibility.