Kernel follower integration gate
This directory tests the kernel event protocol in a disposable x86_64 QEMU/KVM guest. It is not a production loader: it starts with one explicitly seeded task and tests bounded descendant admission, using synthetic tables or a complete generated fixture graph. Jobs and services still use NoFollower and record static fallback. See validation.toml for observed results and remaining work.
Build the userspace gate in the pinned heim-ci container and run build-ebpf.sh in the pinned aya-bpf container. Both image identities are recorded in validation.toml. Neither build loads kernel programs.
Build the static fixtures with build-fixtures.sh in heim-ci on the build host, then copy their bytes into the fresh disposable guest. With tracefs mounted and permission to load BPF, run:
sudo env HEIMDALL_TEST_VM=1 sh run-vm-gates.sh OBJECT ./heimdall-graph-events ./exec-target
The gate also checks QEMU DMI identification and the native architecture. These checks catch accidental invocation; the operator must still use a disposable VM. The notification hook currently requires Linux 6.8 and refuses to run follower cases when its required hook cannot attach. This version check bounds the experiment; it does not establish compatibility with every distribution's 6.8 kernel. The actual VM result remains required.
Calls admitted by seccomp
A raw syscall exit does not identify the seccomp decision that preceded it. Both a broker-completed call and a call rejected by SECCOMP_RET_ERRNO can have an exit without a sys_enter event. The RED cases exercise a rejected getgid and a second filter rejecting getpid, which the first filter would otherwise send to its broker. Remembering only brokered syscall numbers cannot distinguish the latter case.
The gate observes the unique text symbol for seccomp_do_user_notification or its numeric .isra.N specialization. Cold fragments, prefixes and ambiguous matches are refused. The syscall number comes from the current task’s saved registers through kernel helpers: optimized C arguments are not used. On the verified Ubuntu guest, kallsyms exposes .isra.0 while BTF retains the original prototype, so the original BTF prototype alone cannot describe those registers.
The hook observes notification dispatch directly. In Linux 6.8's seccomp implementation, that dispatch follows the combined filter decision. It records one graph step before the broker handles it. A pending notification marker suppresses the second step if CONTINUE subsequently reaches sys_enter; syscall exit clears transient state and never classifies an otherwise unobserved call as admitted. Value replies, broker errno replies, ADDFD SEND, and a closed listener still belong to the notification path. A stronger stacked ERRNO decision does not.
This uses an internal kernel function, not a stable kernel API. Production attachment must validate supported hooks and capabilities, account for event and helper failures, and select static fallback when coverage cannot be established. It must not infer successful graph attachment from a kernel version.
What this does not establish
Ordinary fork and clone-thread admission have controlled gates below. Production workload isolation and cgroup migration prevention remain unproved. The lifecycle gates check task-exit cleanup and exact numeric PID reuse. In the single-PID exec case, successful image replacement invalidates the graph: Audit marks the receipt invalid and clears the PID selector; Enforce kills before the replacement fixture writes its marker. The separate cgroup exec control below verifies continued selection and invalid post-exec decisions. This is rejection of an unadmitted image, not graph rebinding across exec. Removing the selected task cursor invalidates Audit and kills Enforce; absence of state cannot silently disable following. Audit counts every failed event, including exits, while its cursor is absent. The thread gate covers a missing entry and a one-slot task map; broader admission recovery and other syscall restart paths remain unproved. The bounded-signal cases exercise seven nested handlers, rejection of a ninth frame, and an unmapped handler address in both Audit and Enforce. The restart case observes both entries of a blocked readv interrupted by a known SA_RESTART handler before supplying its input. Its signal address comes from a trusted fixture; production needs an artifact-bound handler map. It does not test BPF LSM refusal before an operation, arbitrary workload graphs, or job/service attachment and signed completion records. Host build success is not a kernel verification receipt.
Independent PID reuse control
The pid-reuse event case reuses the exited task's exact numeric PID before checking state or selector cleanup. The new process must neither inherit a follower decision nor change the completed workload counters. The existing task-exit case also checks that state, pending notification and selection were removed, but its historical RED stopped before reaching PID reuse.
For an independent negative control, extract a git archive into a fresh source directory and run make-pid-reuse-negative.py COPIED_REPO. It refuses a git checkout and replaces only the copied task_exit hook body with a no-op. Build that deliberately broken object with the pinned BPF image and build-ebpf.sh. Inside a disposable guest, run run-pid-reuse-negative.py GATE NEGATIVE_OBJECT. It requires both modes to reach the exact reused PID and then fail specifically because of stale tracking, rather than an earlier cleanup assertion. The normal object must pass the same pid-reuse case. This is a new fault control, not a rewritten claim about the historical RED. When the full guest bundle contains negative.bpf, guest-gates.sh hashes it and runs this control too.
Auditing a complete fixture executable
Heimdall uses Mimir's pinned graph files to prepare the bounded NEXT and AGAIN tables. Inside the disposable guest, the diagnostic command is:
sudo env HEIMDALL_TEST_VM=1 ./heimdall-graph-events --fixture-audit \
OBJECT NODES EDGES GRAPH_SHA256 PROGRAM PROGRAM_SHA256 REPORT.json [ARGS...]
The launcher copies the verified main executable into a sealed memfd, stops it at successful exec before the first user instruction, loads the graph tables, and then detaches ptrace. Syscalls are observed by the kernel follower. This command installs no static floor; it audits one trusted single-thread fixture. The report includes class/pair coverage and violations. Missing observations or an incomplete graph cannot pass. Dynamic loader and shared-library identities, task creation and production attachment still need separate validation.
run-fixture-projection-gate.sh deliberately supplies the five-marker graph to the full executable. It requires the executable to exit normally and the audit to reject the projection, with a diagnostic report. This negative control does not establish the positive complete-graph milestone.
Full generated fixture, 2026-11-09
Heimdall uses Mimir's complete abcdf graph, including process startup and Rust runtime calls, for the controlled full-executable gate. The main ELF is hashed, sealed into a memfd and stopped at successful exec before ld.so starts. The loader seeds its process state and attaches before releasing it. Audit records calls and pairs; Enforce requires a successful audit bound to the graph, executable, argv and fixed environment. Enforce and the static comparison use identical generated allowlist floors. Static loads no BPF object. These are trusted single-thread VM gates, not the production cgroup loader; guest shared libraries are not pinned.
run-fixture-gates.py GATE OBJECT NODES EDGES GRAPH_PIN PROGRAM BINARY_PIN OUT runs Audit, Enforce and static, rejects seven invalid audit receipts, and injects a forbidden marker transition using ptrace. The valid fixture has 75 decisions, 0 violations and 0 kills; the injected one-time A marker after loop entry produces one violation and SIGKILL in Enforce, while static completes. The rejected call is the follower's last decision. openat is explicitly permitted from this generated graph's loop: an attempted openat negative control was accepted, with evidence retained in evidence/fixture-openat-accepted.*. Do not infer file-open isolation from this fixture's graph. The ordinary 25-case event matrix also passes.
benchmark-fixture.py takes the same arguments and defaults to 10,000 extra argv items, making 10,003 loop rounds. On the disposable t14s guest, Linux 6.8.0-139-generic / AMD Ryzen AI 7 PRO 360, 2026-11-09, nine alternating pairs after one discarded warmup pair measured 131.5 ns median added time per audited call (range of paired estimates 88.5–144.2 ns). Each run has 30,078 audited non-base calls and 30,079 follower decisions. Median whole-run times were 16.124 ms static and 19.917 ms Enforce; the reported delta is the median of paired differences, not the difference of those medians. All timed Enforce runs had zero violations and kills.
The process is pinned to one guest CPU. Timing spans ptrace detach through child completion and excludes table preparation. Timed runs disable call/pair collection and syscall visibility counters; no per-call ptrace is used. This aggregate estimate includes the remaining hook, map lookup, decision-counter and scheduling costs. It is not a syscall latency percentile, a production workload result, or a measure of the idle cost on unrelated tasks. The static call count is inferred from the identical fixture, not collected while timing. Raw reports (including the warmup), artifact hashes and summary are in evidence/fixture-cost-t14s.tar.gz and .json. That measurement is pinned to checkpoint 8168616, before the later lifecycle and cgroup hooks; it must be repeated for a final production object.
Owned cgroup fixture selection
run-cgroup-gates.py takes the same arguments as run-fixture-gates.py. It creates a fresh cgroup v2 group for each fixture, moves the stopped process into it, obtains its eight-byte kernel file handle, and selects that ID in the kernel. The numeric PID selector is disabled. The supervisor stays outside the group; its probe calls must leave the workload counters unchanged. The positive fixture and its existing negative controls run again, then a deliberately wrong group must produce zero observations and an incomplete receipt. The gate removes only its own uniquely named groups.
This establishes selection of one admitted thread in one exact group. It does not establish clone/thread admission, protection against migration or nested-group escape, replacement executable binding, or production job/service attachment. Those are required before enabling the product path; it still records static fallback. The initial RED failed on a missing CGROUP map: it is structural evidence, not proof that an existing cgroup implementation leaked calls.
The later make-cgroup-negative.py control changes only selection in an archived source copy: it follows seeded PIDs and ignores the cgroup ID. The existing run-cgroup-gates.py controls then reach the wrong-group case and reject its incorrect successful receipt with 75 decisions. run-cgroup-negative.py requires that exact failure, so an earlier setup failure cannot count as evidence. The normal object must refuse that same wrong-group workload with zero decisions. When cgroup-negative.bpf is present in the guest bundle, the checked-in driver hashes it and runs this negative control.
Audit receipts here are trusted fixture inputs, matched by content rather than signed. They also select the static comparison floor. Production must authenticate the receipt and its provenance before using it as enforcement input; matching digests alone does not establish who measured those observations.
The loader sizes NEXT and AGAIN before creating them, using the imported row counts (one slot for an empty table). It verifies the live kernel capacities before attachment. The checked-in fixture needs 28,577 and 3,206 entries rather than two fixed 1,048,576-entry allocations; this does not change the import budget or truncate any transition. The syscall-event gates also derive their synthetic NEXT capacity from the rows they insert and check the live kernel capacity; the ordinary case uses 4,087 entries, not a fixed 4,096.
The allocation planner is tested at the actual 1,048,576-row limit using materialized tables with distinct keys. An extra NEXT row, an extra AGAIN row beyond the combined budget, and an over-budget state count are refused before kernel allocation. This tests the real allocation boundary; it does not claim to import or determinize a million-state source graph in that test.
Exec within the selected cgroup
run-cgroup-exec-gates.sh OBJECT GATE EXEC_TARGET starts a sealed static fixture at its first exec stop. With an extra argument, the fixture re-execs the same sealed bytes through its inherited fd; the replacement writes one marker and exits. There is no loader or broker thread in the selected group. This matters: moving the earlier threaded syscall harness also moved its unseeded broker, which failed before exec. That failed candidate is preserved as a setup finding, not exec evidence.
Even identical replacement bytes require a fresh graph admission. The current follower invalidates the old cursor at exec and keeps the cgroup selected. Audit completes the marker while every later decision is invalid; Enforce kills the replacement before its marker write. The gate checks that cgroup selection remains, no old cursor survives, and all decisions after the exec failure count as violations. It also checks both entry and exit of the Audit's single write, and zero replacement writes in Enforce. Additional invalid events may occur as the fatal signal propagates. This is refusal of an unadmitted replacement, not graph rebinding, non-leader exec coverage, or production attachment.
Fork admission gate
--fork-gate OBJECT STATIC_FIXTURE audit|enforce valid|invalid runs the checked-in fixtures/fork-target/main.S in a fresh cgroup. In the pinned heim-ci container, run sh build-fixtures.sh /target/fixtures and sh test-fixture-rebuild.sh /target. This builds the fork and exec fixtures without executing them. Stripping removes random assembler temporary filenames from ELF symbol tables; the rebuild test compares two independent compilations. The VM gate stops it at exec, seeds the parent, attaches, and detaches; there is no per-call ptrace. The fixture and synthetic table have distinct parent and child paths after fork. Both must finish with seven decisions and zero violations; an extra child getppid yields one violation in Audit and kills the child in Enforce. The parent checks the child's wait status, and both cursors must be removed at exit. The original object failed this valid control with six missing-state violations (RED 4991c83).
An admitted x86_64 process-creation syscall arms one admission event. The kernel task_newtask hook runs before the child wakes. For a process it copies the parent's current cursor and signal frames into a separate state entry, without replacing an existing entry; for a thread it uses the prepared thread start with a fresh stack. The loader checks the tracepoint field layout. Failed creation calls clear their pending admission at syscall exit. Fork and clone-thread fixtures are covered; The later clone3 boundary controls below cover one conservative launch policy; vfork, arbitrary PID namespaces and cgroup migration still need separate controls. The four basic controls do not establish concurrent counter accuracy; see the separate stress and overflow controls below. Allocation-failure recovery and production attachment remain open.
The stress fork case runs 100,000 extra getuid calls in each process. Its 200,007 decisions must all survive concurrent writes. Decision and violation counters use atomic fetch-add; overflow sets a permanent loss flag, refuses the receipt, and kills the offending process in Enforce. The counters-full event case forces overflow. BPF builds now select v3 and the pinned core intrinsic with SeqCst ordering: LLVM's monotonic add pattern emits legacy no-fetch, which cannot supply the old value required by the overflow check. Concurrent observation pairs have their own gate below; coherent failure diagnostics remain separate work. A concurrent diagnostic counter value is not a globally ordered event index. The historical cost measurement still applies only to the 8168616 object.
The profile fork case checks exact aggregate calls and pairs for both task streams under concurrent execution: 200,005 non-base calls and 200,003 pairs. Each task has its own previous-call entry, removed on exit or exec. Aggregate keys are inserted only if absent, then incremented atomically; one task cannot reset another's count or create a pair across task boundaries. Predecessor-map exhaustion and call/pair count overflow mark observations incomplete; readers refuse them. Read aggregates only after all selected tasks have stopped. The existing audit-receipt format remains restricted to its single-thread fixture; this gate does not silently extend that format to concurrent workloads.
The orphan case lets the parent exit while its child performs 100,000 extra calls. Completion waits for the owned cgroup's populated field to become zero, with the follower still attached. Only then are counters and observations read. The original root-only wait collected just 8,135 of the expected 100,006 decisions and left the child's cursor present (RED 85b49b5). The admission gate has a five-second deadline for the root and descendants together; the full fixture allows five seconds for descendants after reaping the root. An expired deadline refuses completion and cleanup kills remaining members of the owned group. run-timeout-gates.py checks a never-ending child in both modes: completion must be refused and the owned cgroup removed before the gate returns. Cleanup allows two seconds for killed tasks to leave before removing the directory. A failed kill or drain is reported, rather than silently treated as successful cleanup. Timeout controls deliberately kill the child; they are not zero-kill runs. Cgroup migration and descendant exit-status propagation remain separate work; these fixtures do not establish a production workload manager.
guest-gates.sh is the checked-in driver for the full disposable-VM bundle. It records hashes of itself, every gate script, the binaries and graph inputs before running the thread, fork, event and complete-program fixture controls.
Clone-thread entry
run-thread-gates.sh OBJECT GATE THREAD_TARGET uses a static clone fixture with a separate child stack and kernel clear_child_tid/futex join. The parent and child have distinct graph entries: inheriting the parent's cursor would reject the child's first marker. Valid Audit/Enforce completes; a forbidden child call records a violation and kills the process in Enforce. A missing thread entry or a one-slot state map also invalidates Audit and kills Enforce. The failed admission is recorded before the child runs, and missing-state checks cover any child event while the fatal signal propagates. No zero-call or zero-violation claim is made for that interval. State and pending-admission entries are gone after the thread group exits.
Classification uses the kernel's accepted clone flags from task_newtask, not a second read of the caller's clone3 argument pointer. Only an admitted process- creation call arms admission. The graph importer supplies the thread entry; zero means unavailable. This fixture covers ordinary x86_64 clone threads, not clone3, clone-into-cgroup escape prevention, non-leader exec, or production attachment.
Clone3 cgroup boundary (2026-11-09)
RED 92e5924 demonstrates the original escape with a real clone3 call and a writable destination cgroup FD: both Audit and Enforce observe only the parent's clone/wait, while the child executes its marker outside the selected group. The child cursor remains after exit. The unprotected plain-clone3 and legacy clone controls also run, so an unavailable syscall or failed setup cannot count as the containment RED. See evidence/clone-boundary-red.log.
The follow-up stacks a small static launch restriction on cgroup fixture runs: all clone3 calls return ENOSYS before child creation, in Audit as well as Enforce. The graph follower cannot safely classify the pointed-to clone_args with seccomp argument checks. An application must explicitly fall back to legacy clone/fork or fail; no universal compatibility claim is made. Linux 6.8's legacy clone implementation uses the low 32 flag bits, excluding CLONE_INTO_CGROUP at bit 33.
run-clone-boundary-gates.sh runs twelve VM cases: Audit/Enforce × into-cgroup/plain-clone3/legacy-high-bit × unprotected/protected. The unprotected into-cgroup cases deliberately reproduce the escape; protected cases require six decisions, zero violations, an observed child marker and no remaining cursors. The sealed static fixture is reproducible from fixtures/clone-target. An offline interpreter test checks the guard for null/invalid pointers and ABI mismatch without executing a filter. The full fixture receipt includes the separate clone_guard_sha256; Enforce/static refuse a changed guard digest. This digest covers a second stacked program, not the existing floor_sha256.
This restriction is currently installed only by the VM cgroup fixture launchers. It does not prevent later migration through a writable cgroup hierarchy, replace production admission, authenticate receipts or remeasure the historical 8168616 cost. Production job/service attachment and protected cgroup ownership remain open. The explicit unprotected option belongs only to this disposable-VM control.
Shared visibility counters (2026-11-09)
The optional COUNTS entry/exit diagnostics now use atomic fetch-add per phase, with insert-only initialization so simultaneous first calls cannot reset a row. RED 3314f96 observed only 183,974 entries and 176,330 exits for 200,002 getuid calls in the two-process stress fixture. The stress/profile gates now require exactly [200002, 200002] in both modes, in addition to the already atomic 200,007 graph decisions and independent call/pair observations.
RED 36f1784 shows the earlier implementation also accepted an overflowed or full visibility map. Both now permanently invalidate the receipt through the shared loss flag; Enforce signals the offending task. run-visibility-gates.py checks both faults in Audit and Enforce. The read error names follower counter loss or overflow, because this flag now covers visibility and decision counters. The new BPF object changes; the 8168616 performance result is not re-attributed to it. The later diagnostic-publication gates below cover failure records.
Failed creation and existing child cursors (2026-11-09)
The failed-spawn fixture requests an invalid legacy clone (SIGHAND without VM), requires EINVAL, then forks normally. The failed call is still a graph step; its pending admission must be gone before the later fork. Both modes require eight decisions, zero violations and complete cursor cleanup.
The existing-child fixture reserves PID 1,000,000 inside the disposable guest and seeds its cursor at q900 before admitting a fork. Only q900 permits the child's getppid marker; the copied parent q2 does not. The kernel must report admission failure for that exact child PID without replacing the seed. Audit completes with eight decisions and one violation; Enforce kills the parent, while the child retains its seeded cursor. A PID race fails the gate; it is never counted as successful coverage.
make-spawn-negative.py changes exactly one operation in an archive of 2c0e31b: either omit syscall-exit pending cleanup or change child insertion from BPF_NOEXIST to overwrite. run-spawn-negative.py requires each Audit fixture to complete and then fail its own assertion. It also rejects identical fault objects. Clear the BPF package cache between archive mounts before rebuilding:
# In the pinned aya-bpf container, using only this lane's target directory:
cd /src/runtime/graph-events/ebpf
cargo clean -p heimdall-graph-events-ebpf --release --target bpfel-unknown-none
sh ../build-ebpf.sh
The first attempt reused the pending-fault object for the replacement fault due to Cargo's mtime cache across different archives mounted at /src. The negative control rejected that attempt. Its log is preserved as evidence/spawn-controls-stale-negative-build.log, not counted as replacement proof. The two corrected object hashes differ and both fixtures detect their intended fault. These controls add evidence for existing behavior; they do not change the normal BPF object.
For host gate reproduction, use the pinned heim-ci image, mount the source at /src, set CARGO_TARGET_DIR=/target/events, clear only the heimdall-graph-events package when switching snapshots, run cargo build --locked with the default dev/debug profile, then strip -o OUTPUT /target/events/debug/heimdall-graph-events. Do not substitute release or CI's debug=0 profile and expect the same bytes. Exact image, mount and environment commands and executables accompany merge receipts in the lane's ops directory.
Cleanup errors refuse completion (2026-11-09)
RED 9908f4c completes the generated fixture with 75 decisions and zero violations, but an empty subgroup forces cgroup removal to fail with EBUSY. Previously Drop only printed that error after a complete receipt had already been written, and the command returned zero. The control rejects that result.
Normal completion now explicitly closes each owned cgroup and propagates kill, drain or removal errors. The full fixture detaches the follower and closes its groups before publishing a receipt. Fork/thread/exec and clone-boundary gates also close their groups before returning success. Drop remains a best-effort fallback on error paths; failed cleanup is not evidence of successful isolation.
run-cleanup-gate.py creates the obstruction only through the disposable-VM fault switch, requires refusal and no usable receipt, then removes only that command's uniquely named empty test groups. Existing timeout gates still verify bounded refusal and cleanup for a running descendant. An unkillable task or a permission failure may still require operator recovery, but cannot produce a successful result from these launchers.
Complete failure publication (2026-11-09)
A completed run with violations now requires a diagnostic record. Controlled loss RED be1c7b5 suppressed publication while retaining decisions: the syscall Audit gate accepted 13 decisions and one violation with no record. This was a loss-injection test, not a reproduction of a concurrent field-tearing race.
FIRST_FAILURE is now an insert-only hash entry (key zero, capacity one). BPF_NOEXIST publishes a complete six-word value under the kernel map's update synchronisation; no writer mutates or replaces a published value. A racing loser checks that another complete entry exists. Any other publication failure sets a permanent diagnostic-loss flag and refuses the run. Helper failures without a specific call/signal/exec/admission record get a coverage diagnostic. Readers validate only after the workload has stopped. The winning publication need not be the earliest wall-clock violation, and decision_index is a shared counter observation rather than a total event order.
The thread diagnostic-race fixture runs 100,000 forbidden calls per thread, from different cursors and with distinct syscall numbers. Audit requires all 200,000 violations; Audit and Enforce require one complete writer's tuple. A deliberately full diagnostic map must refuse a receipt in both modes. The controlled no-publication object must be rejected by the independent syscall gate. Existing lifecycle fault objects must be rebuilt for the new map schema; an incompatible map is a setup failure, not a passing negative test.
Host-gate reproducibility now uses build-host-gate.sh with incremental builds disabled and dev debug information disabled, in the pinned heim-ci image 8d45632a2e3ca230ab72db88a088d0bc9f746b609849d7a10b6e13e4baecdef1. Mount the source at /src and a fresh empty target at /target/events, set CARGO_BUILD_JOBS=2, then run sh runtime/graph-events/build-host-gate.sh /target/events/gate. Two independent empty targets must produce identical binaries before the VM handoff. Earlier package-only rebuild matches depended on an existing dependency cache and are not clean-build reproducibility proof.
Initial executable admission (2026-11-09)
The loader can attach before the initial executable starts. RED 08241b0 joined and seeded a stopped child before exec: the sealed static image reached its marker in Audit, but the existing replacement-exec hook invalidated its graph (six decisions, five violations). This is distinct from the earlier fixtures, which attached at the ptrace stop after exec and before the target's first instruction.
INITIAL_EXEC is a one-use capability installed by the trusted loader while its single-thread child is stopped. It binds the initial table state and the sealed executable descriptor. Only execveat of that descriptor, an empty pathname and exact AT_EMPTY_PATH flags can arm it. The trusted tgkill stop's unpaired exit is allowed; other pre-exec calls refuse admission. The launcher resolves its private pathname page before stopping because the BPF user-memory probe cannot fault a page in. An unreadable pathname refuses the run. This relies on trusted launcher code and private pre-exec memory, not on a general solution to races on arbitrary user pointers.
The successful sched_process_exec hook consumes the admission and inserts the initial cursor without replacing an existing cursor. The launch syscall's exit is not a target graph step. Failed exec, cancellation and task exit clear the pending admission; later exec still invalidates the old graph. A non-leader initial exec is rejected by the implementation, but a dedicated non-leader control remains open. No untrusted target instruction runs before this binding in the tested launch sequence. The launcher configures parent-death signalling and ptrace exit-kill; a behavioural parent-death control remains open.
The twenty initial-exec controls cover Audit and Enforce for a valid launch, wrong descriptor/path/flags, kernel ENOEXEC, an unexpected pre-exec call, replacement exec, cancellation, full cursor map and absent admission. A valid static target has exactly two decisions and zero violations. The no-op task_exit object must independently fail the cancellation check because its initial admission remains; a map-layout/setup failure does not count.
These are controlled static-image VM gates. They do not yet connect the production container/service runner, authenticate dynamic-library closure, permit arbitrary exec rebinding, protect a production cgroup from migration, or establish a new performance number.
The same BPF object's active cgroup-follower cost was measured on a separate fresh t14s guest: 15 alternating Enforce/static pairs after one warmup pair, 60,080 audited calls per run, median added cost 193.9 ns per audited call (range 129.6–269.5 ns). Every Enforce run had 60,081 decisions, zero violations and zero kills. Both arms used the same floor and clone guard. This times the existing full generated fixture after its exec stop; it excludes table setup and initial-exec admission. It is not a production guarantee, an unrelated-task idle cost, or a direct comparison to the older PID-selected 8168616 result. See evidence/initial-cost-t14s.json, .log and .tar.gz; the paired median was recomputed from the raw elapsed times and the audited call count.
Prepared container launch API (2026-11-09)
The initial-exec gate now also calls the same ExecSelf API used by the container executor. RED 8e1cfb1 armed an allocator trap after the trusted stop: Audit exited 114 before reaching the program because exec() allocated argv pointers. Enforce killed that unexpected pre-exec exit. This demonstrates the late allocation; it does not claim every allocation makes a syscall.
Preparation now owns immutable argument strings and their pointer arrays. exec(&self) borrows them, touches its private empty pathname, and invokes execveat without allocating or destroying the plan. Failure therefore also returns without closing the descriptor or freeing storage under the filter. The caller retains ownership and must follow its installed filter when handling an error. Owned strings remain stable when the prepared value moves threads; preparation rejects interior NULs and terminates empty vectors correctly.
Fresh dwarf/t14s full suites pass the success and ENOEXEC cases with both allocation and deallocation forbidden after fork. Success is checked in Audit and Enforce. Only Audit returns through the failed-exec error path; Enforce kills the task at the failed exec return before that userspace path runs. A successful target still has two decisions, zero violations and the marker; a failed executable has no marker and the initial-admission diagnostic. See evidence/launch-allocation-red.log and launch-preparation-{dwarf,t14s}.log. This is preparation for the production handoff, not that handoff itself.
Supervisor release channel and shared host loader
RED a58925e shows that the stopped-launch admission cannot accept a launcher blocked on a private supervisor channel. GREEN edcfc6b adds a one-use channel admission and the reusable heimdall-follower-host loader. The trusted worker prepares all memory and descriptors, writes one readiness byte, then blocks on one release byte. The supervisor validates and loads the graph before releasing it. Saved syscall arguments bind the blocked read's descriptor and count even when its entry preceded attachment. Cancellation, a different descriptor, or a different count cannot enter the graph.
The full suites in evidence/handoff-final-{dwarf,oden}.log pass on fresh Linux 6.8.0-142 guests, with 32 initial-exec controls and all prior regressions. The allocator trap is armed immediately after fork for prepared-launch cases. Only Audit exercises userspace after failed exec; Enforce kills at the failed return. RED 6f4ca8b requires a distinct pending-spawn publication diagnostic; its GREEN reports kind 7 with the syscall and current state. Kind 7 covers both a stale pending entry and any other pending-map insertion failure.
This is the production handoff foundation. OCI jobs/services still use the static fallback. Persistent attachment across supervisor death, production identity binding and completed-run publication remain unwired. No new cost measurement or t14s result is claimed by this checkpoint.
Attachment lifetime
RED e155618 closes the loader's BPF descriptors before releasing its held launcher: the old attachment vanishes and the marker runs. The persistent host API pins all required links and maps in a private bpffs directory before release. A pinned cgroup-array map retains the selected cgroup reference; pin cleanup keeps that map until after the links have been removed. Partial setup rolls back its own pins; successful setup deliberately survives Drop. Explicit cleanup refuses a populated cgroup, including populated descendants. The caller owns admission to that cgroup exclusively, and must not admit new tasks while closing.
The controlled positive and negative checks close all loader BPF descriptors, then reopen the completed diagnostics from pinned maps. The valid static target performs getpid/write/exit with three decisions and no violations. An invalid getpid causes SIGKILL before its later marker write, with an order diagnostic. Both controls verify that populated-group cleanup leaves pins intact and that empty-group cleanup removes them. These are descriptor-lifetime controls, not an actual crashed OCI supervisor or an orphan-recovery service test.
An earlier control deliberately made the marker write itself invalid: it printed the marker and then died. This is the documented tracepoint late-kill limit (graph-filter.md section 10), not prevention of the violating syscall's effect. The static floor and other sandbox layers still govern syscall permissions. Production wiring, authenticated executable binding and crash recovery tooling remain separate work.
Sealed static-image admission
heimdall-follower-host::image::seal_static verifies a supplied SHA-256 pin, checks a bounded static x86_64 ET_EXEC image, and returns a memfd sealed against writes, growth, shrinkage and seal changes. It refuses scripts, ET_DYN, interpreter/dynamic segments, malformed load ranges and writable executable segments. This first path does not support dynamic ELF identity closure. ExecSelf::from_compiled_fd consumes that descriptor without reopening a path, including when the caller already reserved EXEC_FD. The VM lifetime controls exercise both descriptor cases, allocator-free launch, valid completion, forbidden continuation, persistent diagnostics and explicit cleanup.
RED 0b7afee is a missing-API compile failure; the GREEN unit tests prove digest refusal, malformed-image refusal and actual seal enforcement without executing code. A digest binds supplied bytes; it does not prove the graph's correctness. The production OCI shim must prepare the sealed image outside confinement: the job's fixed filter continues to forbid memfd_create. That wiring is still open.
Installed channel rules and concurrent workloads
The runner-admission controls install barrier::rules() in a default-KILL floor, plus only the target's marker write and the normal executable prelude. A valid launch passes in Audit and Enforce. After exec, a read with the wrong channel descriptor or byte count dies with SIGSYS and no marker, even with the follower in Audit. These controls do not claim every use of a reopened channel descriptor is forbidden: the prelude remains in seccomp, and graph following still observes target calls.
The isolation control attaches two independent followers, waits for both targets to announce readiness, and keeps the valid target blocked on stdin. Releasing only the invalid target yields exactly three decisions and one diagnostic, and kills it before its marker. The valid target remains alive; releasing it yields five decisions, zero violations and no diagnostic. Each owner removes only its empty group's pins. evidence/review-final-{dwarf,oden}.log contains the full suites with these controls; both fresh guests are stopped.
Kernel-backed seal tests are ignored by ordinary cargo test and compiled with build-admission-tests.sh. In a disposable guest, run the resulting binary with HEIMDALL_TEST_VM=1 and --include-ignored. The first binary in evidence/admission-tests-oden-retry.log is the three admission tests at c314551. The separately labelled second binary belongs to the OCI-root follow-up, which was not part of that checkpoint. RED 3ed9f0c adds missing gate cases; its RED uses the 6afac19 host (identical Rust sources before adding the new case handlers) and fails with unknown initial exec case.
OCI image root and supervisor namespace admission
image::seal_from_root reads beneath a verified image root using openat2 IN_ROOT, NO_MAGICLINKS and NO_XDEV. It checks the held inode is regular before opening it for reading, bounds the read, and seals only bytes matching the expected digest. Absolute symlinks resolve inside the image root. Parent traversal cannot reach a host file. The caller still supplies the trusted graph/executable binding and resolves the executable path and working directory.
namespace::require_initial restricts the first OCI integration to an x86_64 Linux 6.8 supervisor in the initial PID and user namespaces. It also checks pid_for_children: a supervisor can retain its own global PID while new children receive namespace-local IDs. This prevents using local runtime IDs as global follower keys. The caller must keep its namespaces unchanged during creation. These are admission helpers; production jobs/services still use static fallback.
RED 7158220 is a missing namespace API compile failure. The five admission checks pass in evidence/oci-namespace-oden-retry.log, in a fresh disposable Oden guest which is then stopped. Build with build-admission-tests.sh OUTPUT; it also produces OUTPUT-namespace-probe. In the guest, place that probe under a traversable path such as /tmp, then run the test binary with HEIMDALL_TEST_VM=1 HEIMDALL_NAMESPACE_PROBE=/tmp/namespace-probe and --include-ignored --test-threads=1. The probe is single-threaded because a test-harness thread cannot start after unshare(PID) changes pid_for_children. The earlier attempt failed to execute the probe beneath the private home directory after entering a user namespace; that attempt is not a passing gate.