docs: audit io_uring fixed-buffer registration invariants#4022
Merged
Conversation
Add an invariants-table audit of `RegisteredBufferGroup` covering registration timing, silent fallback to unfixed opcodes, page-pinning ownership, default sizing vs kernel limits, drop ordering, and kernel cleanup on ring fd close. Each invariant cites a single file:line location with an OK / GAP / UNKNOWN status verdict. The one GAP - `IoUringWriter::with_ring` ignoring the configured `register_buffers` flag - is left to a follow-up PR with a scoped plumbing fix described inline.
This was referenced May 14, 2026
Merged
4 tasks
oferchen
added a commit
that referenced
this pull request
May 17, 2026
…ern (#4320) The post-#4310 tests.rs at 882 lines exceeded the 650-line cap. Split into a tests/ directory grouped by concern, each file well under cap: - tests/mod.rs (39) - shared try_ring / try_group helpers and module decls. - tests/registry.rs (113) - page size, validation guards, slot allocator. - tests/submit.rs (179) - submit_read/write_fixed_batch helpers. - tests/stats.rs (141) - acquire/miss counters and snapshot semantics. - tests/status.rs (49) - try_new_with_status outcome reporting. - tests/drop_contract.rs (309) - Drop semantics and constrained-env coverage for the PR #4022 / task #2118 fixed-buffer invariants audit. The try_ring / try_group helpers replace the repeated match-or-return boilerplate that handled environments where io_uring is unavailable (CI sandboxes, seccomp, kernel < 5.6). No behavioural change; test coverage is preserved.
oferchen
added a commit
that referenced
this pull request
May 18, 2026
Add an invariants-table audit of `RegisteredBufferGroup` covering registration timing, silent fallback to unfixed opcodes, page-pinning ownership, default sizing vs kernel limits, drop ordering, and kernel cleanup on ring fd close. Each invariant cites a single file:line location with an OK / GAP / UNKNOWN status verdict. The one GAP - `IoUringWriter::with_ring` ignoring the configured `register_buffers` flag - is left to a follow-up PR with a scoped plumbing fix described inline.
oferchen
added a commit
that referenced
this pull request
May 18, 2026
…ern (#4320) The post-#4310 tests.rs at 882 lines exceeded the 650-line cap. Split into a tests/ directory grouped by concern, each file well under cap: - tests/mod.rs (39) - shared try_ring / try_group helpers and module decls. - tests/registry.rs (113) - page size, validation guards, slot allocator. - tests/submit.rs (179) - submit_read/write_fixed_batch helpers. - tests/stats.rs (141) - acquire/miss counters and snapshot semantics. - tests/status.rs (49) - try_new_with_status outcome reporting. - tests/drop_contract.rs (309) - Drop semantics and constrained-env coverage for the PR #4022 / task #2118 fixed-buffer invariants audit. The try_ring / try_group helpers replace the repeated match-or-return boilerplate that handled environments where io_uring is unavailable (CI sandboxes, seccomp, kernel < 5.6). No behavioural change; test coverage is preserved.
oferchen
added a commit
that referenced
this pull request
May 18, 2026
…ern (#4320) The post-#4310 tests.rs at 882 lines exceeded the 650-line cap. Split into a tests/ directory grouped by concern, each file well under cap: - tests/mod.rs (39) - shared try_ring / try_group helpers and module decls. - tests/registry.rs (113) - page size, validation guards, slot allocator. - tests/submit.rs (179) - submit_read/write_fixed_batch helpers. - tests/stats.rs (141) - acquire/miss counters and snapshot semantics. - tests/status.rs (49) - try_new_with_status outcome reporting. - tests/drop_contract.rs (309) - Drop semantics and constrained-env coverage for the PR #4022 / task #2118 fixed-buffer invariants audit. The try_ring / try_group helpers replace the repeated match-or-return boilerplate that handled environments where io_uring is unavailable (CI sandboxes, seccomp, kernel < 5.6). No behavioural change; test coverage is preserved.
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
docs/audits/io-uring-fixed-buffer-invariants-audit.mdcovering the operational invariants ofRegisteredBufferGroupatcrates/fast_io/src/io_uring/registered_buffers.rs.IORING_OP_READ/IORING_OP_WRITE, page-pinning for the ring's lifetime, default sizing vs kernel limits, drop ordering, and kernel-side unregister on ring fd close - to a singlefile:linecitation with an OK / GAP / UNKNOWN status verdict.IoUringWriter::with_ringatcrates/fast_io/src/io_uring/file_writer.rs:118ignoresIoUringConfig::register_buffersand hard-codescount = 8. A scoped plumbing fix is described inline; left to a separate follow-up PR.BgidAllocatorwork (task Remove outdated golden CLI version test #2044), provided-buffer-ring footprint (task Fix clippy warning in sparse executor test #1936), and engine local-copy buffer pool (task Align cross-compile matrix with build_daemon metadata #2045) audits.Tracking issue: #2118. This audit complements the three existing siblings (
io-uring-fixed-buffer-audit.md,io-uring-fixed-buffer-registration.md,iouring-fixed-buffer-registration.md) by collapsing the findings into a single invariants checklist rather than narrative form.Docs-only PR. No code changes.
Test plan
file:linecitation against the current tree (paths and line numbers verified at audit time; no code moved in this PR).