P2: later
An appendix to the milestone.
P2: can follow later
-
A root ceiling under sixteen gives every child zero. Finding:
Ceilings::for_child_ofdivides each of the root's counts by 16 with integer division. A root with a thread ceiling of 15 cannot delegate one thread to any child, verified: the child reads(0, 0)and the table refuses its carve. The kernel's progenitor ceilings are in the hundreds, so nothing in the tree meets it; a stranger's first small example does. Nothing in the documentation says so. Evidence:src/table.rslines 134 to 137 and 185 to 194. Change: say it ininsert_root_with_ceilingsandfor_child_of, and in aBUGSline of the crate, as Decision 4 decides, provisionally. Door: two-way. Effort: XS. -
spentwalks the whole table and, for every entry, its parent chain. Finding: forFramesand eachObjectkind,spentfilters allNslots throughdescends_from, which walks up toNancestors each: O(N·depth) under the caller's lock, withN1,024 in the kernel.return_to_parentscans the table once per return. Both are correct and the kernel callsspentonly forUSAGE. The cost is not stated. Evidence:src/table.rslines 665 to 699 and 782 to 788. Change: one sentence of cost in each doc comment. A per-parent child count of pages (alreadyspent.children) coversChildrenwithout a scan. Door: two-way. Effort: XS. -
A maintainer keeps
ObjectKind::COUNTby hand in four places. Finding: the enum has seven variants,COUNTsays 7, the proofs'KINDSlists eightCountedvalues andany_object_kindtakes% 7. The kernel'susage_recordmatches four of them. An eighth kind is five edits and no compiler error for a missed one. Evidence:src/table.rslines 86 to 108.src/proofs.rslines 155 to 178.kernel/src/memory_region.rsusage_record. Change:pub const ALL: [ObjectKind; 7]on the enum,COUNT = ALL.len(),KINDSbuilt from it,any_object_kindindexing it. Door: two-way. Effort: XS. -
The crate has no
unsafeand does not say so. Finding: nounsafeanywhere in the crate; the root carries no#![forbid(unsafe_code)]. The template's fuzz opt-in and itsunsafe_scan.pyread the attribute, and a reader of a kernel crate looks for it first. Evidence:src/lib.rsline 14. Change:#![forbid(unsafe_code)]under theno_stdline. Door: two-way. Effort: XS. -
The proofs assume what the table must keep, and no harness checks that it does. Finding:
coalescing_never_reclaims_a_held_pageassumesretyped_to <= watermarkandlive_to <= watermark, and the harnesses oversplit_new_watermarkandretype_new_watermarkassumewatermark <= pages. Only the table's discipline keeps those true acrosssplit,claim_for_destroyandreturn_to_parent, and no table-level harness states them.destroy_never_frees_a_child_to_the_allocatorrestates its function's body. The six subtree harnesses covercharge,release,splitand the claim at depth three in a table of four, and none drivesreturn_to_parentfrom an arbitrary state.falsification-times.tsvrecords the four arithmetic harnesses and not the six subtree ones. Evidence:src/proofs.rslines 7 to 137 and 553 to 580.notes/project-metrics/falsification-times.tsvlines 271 to 274. Change: one harness fromRun::any(3, _, true)that claims and returns the grandchild and asserts, for every live region,retyped_to <= watermark <= pagesand that no live child's end exceeds its parent's watermark, with its falsification patch. Record the six times. Door: two-way. Effort: M. -
Three pure functions and two observers have no direct host test. Finding:
coalesced_watermarkandretype_new_watermarkhave tests only through the table.ceiling_reachedis never asked about a dead name or withlevels_up == 0.Ceilings::withandgetlive in one doctest. The census records none of their mutants as missed, so this is legibility rather than a hole. Evidence:src/tests.rs.src/table.rslines 1360 to 1381. Change: one table-driven test per pure function insrc/tests.rs, and two asserts inthe_nearest_ancestor_at_its_ceiling_is_the_one_named. Door: two-way. Effort: XS. -
A dropped claim leaks a region's pages quietly. Finding:
DestroyClaimis#[must_use]with a message, which catches an unused result and nothing else: a claim bound to a name and dropped on an early return leaks the run, and the crate cannot see it. The kernel'sdestroyspends every claim it mints. A second caller may not. Evidence:src/table.rslines 262 to 269. Change: aDropthat panics underdebug_assertionsunless the caller spent the claim, withreturn_to_parenttaking the claim by value and aspend_root(self)for the allocator path. Or leave it and say so in the type's doc. Door: two-way now. The signature is one-way after publish. Effort: S.