Skip to content

docs: audit SQPOLL rootless-container detection landing status (SQP-LAND.1) - #5548

Merged
oferchen merged 1 commit into
masterfrom
docs/sqp-land-1-rootless-audit
Jun 10, 2026
Merged

oferchen merged 1 commit into
masterfrom
docs/sqp-land-1-rootless-audit

Conversation

@oferchen

Copy link
Copy Markdown
Owner

Summary

  • Audits oc-rsync production code under crates/fast_io/src/ for SQPOLL rootless-container detection (SQP-2/3/4/5) against the SQP-1..6 design docs.
  • Records the single SQPOLL decision site - crates/fast_io/src/io_uring/config.rs:357-386 (IoUringConfig::build_ring) - so SQP-LAND.2 has a concrete landing target.
  • States honestly that SQP-1..6 are marked completed in tracking but the rootless detection path is not shipped: no production code reads /proc/self/uid_map, checks /run/.containerenv or /.dockerenv, and WiredBasisWindow has zero production call sites.
  • Documents the SQM-3 mlock primitive as complementary plumbing, not a substitute for SQP-2/4 detection.
  • Recommends concrete next steps for SQP-LAND.2 including a ContainerContext module, an IoUringRestriction::SqpollUnavailable variant, and wiring WiredBasisWindow::new into a real submission site.

Test plan

  • Docs-only change; no code paths modified.
  • Markdown lint clean.

@oferchen
oferchen force-pushed the docs/sqp-land-1-rootless-audit branch from f84e599 to 8ae8491 Compare June 10, 2026 07:58
@oferchen
oferchen merged commit e148af5 into master Jun 10, 2026
8 checks passed
oferchen added a commit that referenced this pull request Jun 10, 2026
….5) (#5558)

Per SQP-LAND.1 audit (PR #5548), `build_ring()` previously discarded
the SQPOLL setup errno and set `SQPOLL_FALLBACK` without a log, leaving
operators unable to tell whether a slow daemon was running with a
downgraded ring.

Add a typed `IoUringRestriction::SqpollUnavailable { hint }` variant and
capture the errno when `IORING_SETUP_SQPOLL` is rejected so the cause
can be distinguished:

- `EPERM`: rootless container or missing `CAP_SYS_NICE`
- `ENOSYS`: kernel predates `IORING_SETUP_SQPOLL`
- other: generic kernel rejection (errno surfaced numerically)

The hint is logged via `debug_log!(Io, 1, ...)` and latched in a
`OnceLock` so callers (`--io-uring-status`, daemon log, structured
error reporting) can read the same wording without parsing logs. A
stub for non-Linux platforms mirrors the API surface.

SQP-LAND.4 will wire `detect_io_uring_restriction()` to surface
`SqpollUnavailable` when the latched hint is present; this PR keeps
the detection function unchanged and only introduces the variant and
log so the wire-up can land independently.
@oferchen
oferchen deleted the docs/sqp-land-1-rootless-audit branch June 10, 2026 09:25
@github-actions github-actions Bot added the documentation Improvements or additions to documentation label Jun 10, 2026
oferchen added a commit that referenced this pull request Aug 24, 2026
….5) (#5558)

Per SQP-LAND.1 audit (PR #5548), `build_ring()` previously discarded
the SQPOLL setup errno and set `SQPOLL_FALLBACK` without a log, leaving
operators unable to tell whether a slow daemon was running with a
downgraded ring.

Add a typed `IoUringRestriction::SqpollUnavailable { hint }` variant and
capture the errno when `IORING_SETUP_SQPOLL` is rejected so the cause
can be distinguished:

- `EPERM`: rootless container or missing `CAP_SYS_NICE`
- `ENOSYS`: kernel predates `IORING_SETUP_SQPOLL`
- other: generic kernel rejection (errno surfaced numerically)

The hint is logged via `debug_log!(Io, 1, ...)` and latched in a
`OnceLock` so callers (`--io-uring-status`, daemon log, structured
error reporting) can read the same wording without parsing logs. A
stub for non-Linux platforms mirrors the API surface.

SQP-LAND.4 will wire `detect_io_uring_restriction()` to surface
`SqpollUnavailable` when the latched hint is present; this PR keeps
the detection function unchanged and only introduces the variant and
log so the wire-up can land independently.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant