Repository navigation
P1 (aarch64): decode-step invariants for every capability invocation, the S1A untyped / page-table columns, and the w1 kernel-window boot witness - #146
Merged
Conversation
… the S1A untyped / page-table columns, and the w1 kernel-window boot witness AArch64 P1 (a64 gens up to 164), A64-S1A (gens up to 23) and the A64-Boot kernel-window fix, squashed onto main 5d04478. Fl4ProofsA64 builds with 0 errors / 0 sorry; 49,890 constants use only propext, Classical.choice, Quot.sound. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
losfair
pushed a commit
that referenced
this pull request
Dec 1, 2026
… the CDT and IPC-buffer history (DESIGN §9 item 4) (#149) DESIGN §9 item 4, both halves, for AArch64. One commit on `main` @ `c98a08b1c` (after #146 and #147): 34 files, +9216 / −199. No Rust changes (nothing under `crates/`). No x86 statement changes. **Half 1 (the history along an execution).** A replay record `InvR` beside `InvH`; P1's MDB tree facts hold of the replayed history (`MdbSH`) along every execution of the local-path family, every slot's edit being one of P1's (`SlotWireP`). The top family is `fl4LocPBL` (`DelLkA`): the Delete-with-PTE start needs the CDT facts only at its own locked slots (`CdtAtL`), discharged from the history, so the all-slot `MdbLk` / `NullLk` [J] is gone. The IPC-buffer words are gate-owned, so `BufSH` is kept along an execution and gives the PTE slots' `bufU`. Boot corollaries at w0/w1 (`w0_serial_mdbL`, `w1_serial_mdbL`). **Half 2 (the gate and the locks themselves).** `proofs/Fl4P2Base/GateImpl.lean` hand-transcribes fl4-sync's gate (`try_enter_local`, `leave_local`, `acquire`, the serial body, `release`) and fl4-store's lock table (`try_lock_object`, `unlock_held`), plus hardware writes, as `ICfg` / `IStepG` / `IStepL` / `IStepHw` (listed in `TRUSTED` with its modelling choices). `impl_sim` matches every runtime step by zero or one gate-model step (`StepR`: a `Serial.Step`, or a racy speculative read returning another value; on gate- or core-class words a value of the current class), keeping `Rel` and the lock invariant `LkInv`; hardware writes during a pending serial body are deferred and replayed after the model's `serial` at the release's decisive store. Racy reads are covered by weak safety `SafeW` from the same per-path certificates. `impl_execPA` / `serializable_implPA` (`GateExecA`): every runtime execution from boot is an FL4 execution, and where no local path runs and no body is pending its memory is the serial run of the completed entries; `w0_serializable_impl` / `w1_serializable_impl` (`GateBootA`) at the boot witnesses for `fl4LocPBL`. **Premises and hypotheses.** - Named premises added: [P] MM-SB, MM-DRF, MM-RACY, IPI (the transcription's step granularity, stated in `GateImpl`'s docstring; no Lean hypothesis carries them). `IHwPA` is `HwStepPA`'s existing [P] moved to the runtime. No [W]. - Theorem hypotheses left to the serial-kernel side: `hSer` / `hSerB` (serial entries keep `MdbSH` / `BufSH`; AArch64 P1 / S1A) and `BufSH` at w0/w1 (S1A / Boot). - Not yet proved: the Half 1 history facts along the weak executions `ExecPAR` (proved along `ExecPA`). **Merge with #146.** Text conflicts only: `proofs/Fl4ProofsA64.lean` (union of imports, no duplicates) and `DESIGN.md` §9 status (main's `w1_sysL` kept; this PR's item-4 bullets added; the "Not yet proved" bullet reconciled: `SysL` at w1 is no longer listed). No proof conflicts. Existing declarations: 0 statement changes against the pre-rebase branch. **Checks.** - `Fl4ProofsA64` root build on this tree: 0 errors, 0 sorry, "Build completed successfully (5755 jobs)". Module builds of every changed module and its users (the gate files, the A64 P2 files of this PR, and the x86 `Fl4Proofs.P2` re-export modules): 0 errors, 0 sorry (5548 jobs). - Axioms: sweep of all 18882 constants under `Fl4ProofsA64.P2` and `Fl4Proofs.P2` (`Fl4P2Base`): 0 outside propext / Classical.choice / Quot.sound; plus 109 `#print axioms` on the gate files' and `GateBootA`'s theorems: 68 `[propext, Classical.choice, Quot.sound]`, 21 `[propext]`, 3 `[propext, Quot.sound]`, 17 none, 0 `sorryAx`. - No sorry / admit / native_decide / bv_decide / axiom / maxHeartbeats in the diff; every new module is imported from `Fl4ProofsA64`. - `python3 xtask/scripts/port_p2_a64.py --check proofs`: exit 0. - No x86 root build: the x86 users of `Fl4P2Base` are the unchanged re-export modules `Fl4Proofs.P2.Serial` / `SerialHw` / `SafeCert` / `SerialSafe`, built as modules. Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
losfair
pushed a commit
that referenced
this pull request
Dec 3, 2026
…ins from boot with the kernel-table column (#151) The AArch64 P1 S1A line: the R2 reachable-VSpace invariant, the R3 ASID/pool columns and the B2 decode step, completed after the #146 snapshot. - syscall.decode_invocation.s1aStepR2K: one decode_invocation step on every DecArmS1aH arm re-establishes S1aR2, S1aKtUt and the kernel-table level column S1aHiK. No per-step typing input remains: the former HiDelTy witness (full typing of every HighVSpace root) is false on reachable states after delete_asid_pool / unmap / retype, and is replaced by the reachability- guarded HiDelTyR, a projection of R2. - BootWit.w0_s1aStepEntryK / w1K_s1aStepEntryK: the step's entry facts at boot. - README and DESIGN section 9 list the covered and uncovered AArch64 arms and the step's outer entry inputs. Statements merged in #146 changed with the line's later generations (FinKZ widened over Pt, decode-state parameter sd / FrCw write sets, FE over any device bit, PoolPost/AsgPost fields); cdt.delete.armQIAt moved to MdbDelVsZ with the FrC / ArmVsZ premises, DecArmKK3 moved unchanged to S1aHiK. Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This stage brings the AArch64 P1 line (a64 gens up to 164), the S1A line (gens up to 23) and the A64-Boot window
(gen 9) onto main (
5d044787a). Proofs only: nocrates/,proofs/Fl4Core*,proofs/Fl4Proofs/orproofs/Fl4Spec/file changes;TRUSTEDis unchanged.What is proved (all in
proofs/Fl4ProofsA64/P1, root-imported):syscall.decode_invocation.armQHAt(MdbArmQHD): fromSysL,SymL, the deletion inputDelInand thedecode's placement facts, every
DecArmQHarm ofdecode_invocationends inArmQIAt(SysL ∧ SymL ∧ BlkOKatthe result plus cap carries, including the page-table cap placement
PtCap) with the ASID table kept or one entryzeroed. The arms: CNode and the deletion family, TCB SetSchedParams / Suspend / ReadRegisters, IRQ control,
Notification / Endpoint send, every VCPU invocation (Run, AckVPPI, WriteReg, InjectIRQ, ReadState, WriteState,
SetTCB; ported to proofs (aarch64): re-extract Fl4CoreA64 and adapt P0/P1 after #130 and #134 #139's re-extraction), and the VSpace arms: Stage-1 and
HighVSpacePage Map / Unmap,PageTable Map / Unmap, TestAndClearAccessed, the flushes, GetAddress, and every Stage-2 (EPT) operation.
syscall.decode_invocation.s1aStepH/s1aStepPt/armQH_s1aPt(S1aStepH,S1aPtCol) add UntypedRetype, ASIDPool Assign and ASIDControl MakePool and carry the untyped column and the per-step page-table cap
invariants (
PtCap,PtHG: every page table inside one heap object;S1aPtColwithHiCap511) across every arm.w1's root task is moved into the kernel window (BootW1Win: addresses in[PPTR_BASE, PPTR_TOP), physical addresses below2^44);w1_sysL(P1'sSysLatw1) andw1_s1aPtCol(the page-table column atw1).Named premises: [P]
ArchTotal,MaxSpi,ArchPlat(the IPA width), the thread factsmcp,cs,fh(QueueDecTcb'sTcbPlace.mcp/curSc,SspHyps.fh); no new [J] / [W].Per-step inputs, not yet invariants:
hvs: the VSpace typing witness (Stage-1VsTywithNoTag3/HighRoot511, and Stage-2S2DecTy), andHiCap511(everyHighVSpacecap's root has a table descriptor at entry 511).hvscannot hold after an ASIDPool Assign of aHighVSpaceroot whose copied kernelTTBR1 L0 entries are non-zero (the kernel's TTBR1 tables are boot memory, not heap objects, while
PtHGputs everytyped table in a heap object). The step theorems are therefore vacuous at such states until a platform contract for
the kernel tables (
KTab, R1) is added.S2DecTyfrom QueueS2Ty's object-levelS2Ty+S2OKis proved (S2DecTy.ofS2Ty,S1aS2Dec) under two facts thathold in the code but are not yet derived:
hR(Stage-2 roots have 13 bits:STAGE2_VSPACE = 13) andhD(noStage-2 object starts at a 13-bit object's upper granule: heap disjointness, once
Teis tied to the typed heap).They are discharged in the later closure pass; until then
S2DecTystays insidehvs.Recorded for later: R1
KTab(B2), R2 the reachability / unmapped-table-zero invariant (S1aVsUnm, B3), R3 thedeletion arms through S1A's
Ty(B1), thenhvs/HiCap511as invariants.Checks:
lake build Fl4ProofsA64(module build) green, 0 errors, 0 sorry;#print axiomsover 49,890 constants: onlypropext,Classical.choice,Quot.sound.xtask/scripts/port_p2_a64.py --check proofspasses. No sorry / admit /native_decide / bv_decide.
🤖 Generated with Claude Code