Repository navigation
P1 (aarch64): close the S1A invariant (R2/R3/B2) — the decode step chains from boot - #151
Merged
Merged
Conversation
…ins from boot with the kernel-table column The AArch64 P1 S1A line: the R2 reachable-VSpace invariant, the R3 ASID/pool columns and the B2 decode step, completed after the losfair#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 losfair#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>
losfair
pushed a commit
that referenced
this pull request
Dec 4, 2026
…-decode kernel functions (#152) Extends #151's s1aStepR2K: - syscall.decode_invocation.s1aStepR2All: the S1a step (S1aR2, S1aKtUt, S1aHiK) over every AArch64 decode arm (DecArmS1aAll), adding the rejected and unknown-label arms, TCB WriteFPU / SetTimer / BindNotification / Resume / Write/CopyRegisters, CNode CancelBadgedSends, SchedContext Bind / YieldTo, SchedControl ConfigureFlags and Reply. Frame DeriveSubframe stays open (FrObj exact size, SysL.sub_false). - Boot: SymL at w0/w1 and DelIn at w0/w1 under a new [P] BootCanon (boot objects in the kernel window, witness bootCanon_ex), so w1K_bundleOf is unconditional. - Non-decode kernel functions: faults and timeouts, budget checks, yield, receive, interrupts and VCPU exits, reply_error / reply_success, the MCS preemption point, each re-establishing the S1a step. - S1aStepEnt / s1aStepEntAll: the entry-invariant fields in P1 terms on the fixed-heap arms (Retype and MakePool-create open). Entry wrappers are composed at the entry level. Every statement already on main is unchanged. 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.
Summary
This PR completes the AArch64 P1 S1A invariant line after the #146 snapshot:
The main result is
syscall.decode_invocation.s1aStepR2K: onedecode_invocationstep on anyDecArmS1aHarm re-establishes three things:S1aR2;S1aKtUt;S1aHiK, the kernel-table level column.The step takes no per-step typing input, so it chains from boot. The boot entries are
BootWit.w0_s1aStepEntryKandBootWit.w1K_s1aStepEntryK.Why the old witness was dropped
The earlier step took a witness
HiDelTy: full typing of every live HighVSpace root and everything below it. That is false on reachable states. A concrete sequence:R+4096.delete_asid_poolclears only the ASID-table entry, so R's cap stays live.unmap_page_tablereturns early because the ASID lookup now fails, soR+4096 → Qstays.HiDelTywould then force Q to be a page table. The replacement:HiDelTyRtypes only what is reachable from the ASID table. This is the same shape as l4v'svalid_vspace_objs.HiDelTyRis a projection of R2.S1aHiKcolumn.S1aR2.relabeladjusts levels on unreachable tables.Scope
README.mdandDESIGN.md§9 list exactly what is covered.DecArmS1aHarm. That is the null and zombie caps, Endpoint/Notification send, Domain, Untyped, IrqControl and IRQ handler, the CNode copy/move/revoke/delete family, 16 TCB labels, SchedContext Unbind/UnbindObject/Consumed, every VCPU and EPT invocation, Frame/PageTable/root operations, and ASIDPool Assign / ASIDControl MakePool.IoPort*andTdxControlare x86_64-only.kernel_entry. It still takes outer inputs that its post does not return:DelIn,DecPre,SysPlace,hIq,hSC,mcp,csandfh.Named premises are tagged in each module docstring:
[P] MaxSpi,ArchPlat,KTab,A64FrameMasks,P0.ArchTotal.Changes to statements merged in #146
#146 squashed an intermediate state of this same line. Measured against it:
mainthat this PR leaves untouched still builds.Changes by cause:
FinKZgained aPtparameter and now means "everyVsR kb Ptword is kept or zeroed". This implies the old form. It affects 91 statements;finKZ_s2discharges the new premise.RunW/RunB/DMU/DMB/VFWtake a decode-state parametersd, with narrowerFrBw ∧ FrCwwrite sets.FEcovers any device bit.PoolPostgainszr/vs,AsgPostgainsal, andArmQIAtgainsArmVs.ArmVs*,FrC,XV, page alignment.cdt.delete.armQIAtmoved toMdbDelVsZwith premisesFrCandArmVsZ. Its only user is updated. No alias is kept, because the old form cannot be proved without those premises.DecArmKK3moved unchanged toS1aHiK.Verification
Final gate on this exact commit
967b763bf, private lake, tree hash checked per file:Fl4ProofsA64root: 6,035 jobs, including the P2 (AArch64): the fl4-sync gate and locks refine the gate model, with the CDT and IPC-buffer history (DESIGN §9 item 4) #149 P2 modules. 0 errors, 0sorry.proofs/scratch/a64/a64_ax2.lean: 52,614 constants. Every one uses at mostpropext,Classical.choice,Quot.sound.sorry/admit/native_decide/bv_decide/axiomin the diff.proofs/Fl4ProofsA64/**,proofs/Fl4ProofsA64.lean,README.md,DESIGN.mdandproofs/scratch/a64/a64_ax2.lean. No Rust, no x86 proofs, no ported spec.An independent review asked for documentation and docstring fixes. Those are included, and a re-check approved them.
🤖 Generated with Claude Code