Skip to content

docs: prior-art review — validate the spine, prune one legacy, correct RFC-0004 - #10

Merged
MatejGomboc merged 3 commits into
mainfrom
docs/prior-art-review
Jul 30, 2026
Merged

docs: prior-art review — validate the spine, prune one legacy, correct RFC-0004#10
MatejGomboc merged 3 commits into
mainfrom
docs/prior-art-review

Conversation

@MatejGomboc

@MatejGomboc MatejGomboc commented Jul 30, 2026

Copy link
Copy Markdown
Member

Summary

You asked us to research the capability and IPC designs against real OSes and the literature. Three research passes (seL4, Zircon/Fuchsia, KeyKOS/EROS, Barrelfish, CHERI, Genode, QNX, L4, and the Rust-OS field), one primary source per claim, in docs/research/0001.

Verdict: both RFCs' spines are validated (the flat table is the 60-year-old C-list; §9 no-ambient-authority cures Hardy's confused deputy; synchronous rendezvous is the fast-microkernel consensus, shipped by Hubris). This PR lands the research note and every correction it forced:

Prune (a legacy we nearly re-adopted)

  • RFC-0004 §5's page-mapping large transfer is L4's abandoned "long IPC" — removed by seL4/NOVA/Fiasco.OC, hostile to verification. Now: shared Region capability out of band + small descriptor over IPC; bounded small copy for the rest. (The single most valuable finding.)

Adopt (proven refinements — folded into RFC-0004)

  • Virtual message registers (not hard x0–x7); ~100-cycle reframed as software-logic.
  • Priority-aware direct switch; call as scheduling-context donation — the real hazard is scheduling coupling, not deadlock.
  • First-class one-time reply object (seL4 MCS), destroyed on caller death; withheld-reply DoS named.
  • Fast path is capability-transfer-free by design.

Decide (RFC-0003 amendment)

  • Revocation is a decision RFC-0003a must make, not a deferral: §6's broker-bypassing TRANSFER makes broker-mediated revocation unreachable; one-level links can't do multi-level transitive revoke; per-client eviction named a day-one gap.

⚠️ Flagged for you — Constitution §3

The slogan "Rust's ownership models capability transfer at compile time" overreaches (the borrow checker sees one compilation unit — RedLeaf's own group proved ownership types can't span protection domains). Recommended reword in the changelog + RFC-0003 amendment. Flagged, not taken — §3 is yours.

What this PR contains

  • docs/research/0001-… — the full literature review (3 parts + synthesis).
  • RFC-0003 — Amendments entry (revocation decision; §6 claim scoped; day-one eviction gap).
  • RFC-0004 — revised in place (still Proposed): §5 long-IPC pruned, virtual registers, priority-aware switch / donation, first-class reply object.
  • Changelog + the §3 flag.

RFC-0004 keeps Proposed status — your verdict on the corrected design is still owed.

unsafe register

  • New unsafe blocks: None — documentation only.

Checklist

  • Spelling + markdown gates clean (55 files); every source a real URL
  • Every O-number resolves against docs/threat-model.md
  • docs/CHANGELOG.md updated; conflict with main resolved
  • Commits GPG-signed

🤖 Generated with Claude Code

MatejGomboc and others added 3 commits July 30, 2026 20:04
"Keep the proven, prune the legacy" turned into an actual audit. Three
research passes against the systems that already fought these fights —
seL4, Zircon/Fuchsia, KeyKOS/EROS, Barrelfish, CHERI, Genode, QNX, L4, and
the Rust-OS field (Tock, Hubris, RedLeaf, Asterinas, Theseus, Redox) —
recorded in docs/research/0001 with a primary source for every claim.

Verdict: both RFCs' spines are validated and correctly cited. The flat
capability table is the 60-year-old C-list; subset-only rights and
no-ambient-authority are textbook; §9 is the direct cure for Hardy's
confused deputy; synchronous rendezvous is still the fast-microkernel
consensus, corroborated by Hubris in production. Three bounded corrections:

  - PRUNE: RFC-0004 §5's page-mapping large transfer is L4's "long IPC",
    removed by seL4/NOVA/Fiasco.OC and hostile to verification. (Folded
    into RFC-0004 separately.)
  - ADOPT: first-class one-time reply objects (seL4 MCS), virtual message
    registers, priority-aware direct switch / scheduling-context donation,
    seL4 badges by name.
  - DECIDE: RFC-0003's revocation deferral is a decision RFC-0003a must
    make, not a deferral it may keep — §6's broker-bypassing TRANSFER makes
    broker-mediated revocation unreachable, and one-level links cannot do
    multi-level transitive revoke.

This commit lands the research note and the RFC-0003 amendment (spine
holds; revocation upgraded to a decision; per-client eviction named a
day-one gap; §6's compile-time claim scoped to kernel-internal, since the
borrow checker cannot span protection domains — RedLeaf's own group proved
this). RFC-0004's revisions and the Constitution §3 reword are handled
separately (the latter flagged, not taken — §3 is the maintainer's).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
The prior-art review's IPC findings, applied to RFC-0004 (still Proposed).
Four corrections, each tracing to a cited source in docs/research/0001:

  - §5 no longer maps the sender's pages into the receiver during a message.
    That is L4's "long IPC" — removed by seL4, NOVA and Fiasco.OC on
    minimality grounds and, decisively for a verification-minded kernel,
    because a page fault during the in-kernel copy introduces concurrency
    that makes the kernel far harder to reason about. Bulk data now travels
    through a shared Region capability established out of band, with IPC
    carrying only a small descriptor; the in-message slow path is a bounded
    small copy (seL4-IPC-buffer sized). This is the single most valuable
    finding of the whole review: we had reinvented a legacy mistake.
  - §5 fast path uses virtual message registers (seL4) rather than a
    hard-committed physical x0-x7 set — the rigidity L4 engineered away —
    and the ~100-cycle figure is reframed as software-logic overhead, not a
    round-trip RPC (real one-way IPC is ~190-320 cycles on cited hardware).
    The fast path is also stated to be capability-transfer-free by design:
    a cap-carrying message leaves the register path.
  - §4/§8 direct switch is priority-aware, and call is framed as
    scheduling-context donation (migrating threads -> QNX priority
    inheritance -> seL4 MCS). The review found the real synchronous-IPC
    hazard is scheduling coupling, not deadlock; a client timer capability
    cannot fix a server monopolising the caller's budget, only donation can.
    This couples IPC to the scheduler RFC earlier than the draft implied.
  - §8 reply is a first-class one-time object (seL4 MCS), destroyed on
    caller death, with the withheld-reply denial (Shapiro 2003) named and
    answered by the userspace watchdog.

Folded into this PR rather than a separate one because merging main
(RFC-0004 landed via PR #9) already brought RFC-0004 onto this branch and
resolved the changelog here; a second PR would only re-conflict on the same
changelog region. The RFC keeps its Proposed status — these are revisions
to a proposal, and the maintainer's verdict on the corrected design is
still owed.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@MatejGomboc MatejGomboc changed the title docs(research): prior-art review — validates the spine, prunes one legacy, forces one decision docs: prior-art review — validate the spine, prune one legacy, correct RFC-0004 Jul 30, 2026
@MatejGomboc
MatejGomboc merged commit 2f88cce into main Jul 30, 2026
6 checks passed
@MatejGomboc
MatejGomboc deleted the docs/prior-art-review branch July 30, 2026 18:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant