Skip to content

AArch64 Information Flow - #1018

Merged
lsf37 merged 11 commits into
masterfrom
aarch64-infoflow
Aug 7, 2026
Merged

AArch64 Information Flow#1018
lsf37 merged 11 commits into
masterfrom
aarch64-infoflow

Conversation

@ryybrr

@ryybrr ryybrr commented Jun 11, 2026

Copy link
Copy Markdown
Contributor

Completed information flow proofs for AARCH64. Please see c10da23 when reviewing the non-interference proofs and 8f7e892 when reviewing the refinement proofs, as these provide the most minimal diffs. The main additions are:

  • An equiv_hyp relation equating VCPU machine/architectural state. The equivalence is only enforced when the current VCPU, if it exists, belongs to the domain under consideration. Certain fields need only be equivalent when the VCPU is active.
  • An equiv_fpu relation equating FPU machine state. The equivalence is only enforced when the current FPU belongs to the domain under consideration.

@lsf37
lsf37 force-pushed the aarch64-noltimer-rebased branch from 3eb8d6c to eca4978 Compare June 11, 2026 07:57
@ryybrr
ryybrr force-pushed the aarch64-infoflow branch from 22c4abf to c6be825 Compare June 11, 2026 11:34
@lsf37
lsf37 force-pushed the aarch64-noltimer-rebased branch from eca4978 to 04465e5 Compare June 14, 2026 09:34
Base automatically changed from aarch64-noltimer-rebased to master June 15, 2026 02:00
@ryybrr
ryybrr force-pushed the aarch64-infoflow branch 4 times, most recently from ac7b505 to 5bb57dc Compare June 17, 2026 05:13
@ryybrr
ryybrr force-pushed the aarch64-infoflow branch from 5bb57dc to c81edd2 Compare July 8, 2026 00:20
@wsun-code

Copy link
Copy Markdown

Hello! I am caring about this pr because I want to integrate this into the seL4 deployment in my company.

It is known that Isabelle version updates break proofs often. What Isabelle version should I use to run isabelle build on these? I tried Isabelle2025 but it errors.

@lsf37

lsf37 commented Jul 8, 2026

Copy link
Copy Markdown
Member

Hello! I am caring about this pr because I want to integrate this into the seL4 deployment in my company.

I'd recommend waiting until this PR is merged, because cleanup is still in progress and while that happens the proofs might break in between (as happened just now). Should be at most another week or two.

It is known that Isabelle version updates break proofs often. What Isabelle version should I use to run isabelle build on these? I tried Isabelle2025 but it errors.

If you follow the setup instructions in https://github.com/seL4/l4v/blob/master/docs/setup.md you will get the correct Isabelle version automatically. You will also get the seL4 version the proof applies to. (To get the proofs in this PR , after the repo checkout, you need to go into the l4v directory and check out the PR branch -- but as mentioned above, I'd recommend just waiting until it is merged, then this step is not needed and the proofs will definitely work).

The current version this repo is using is Isabelle2025, but we may change to Isabelle2025-2 in the next month or two.

@wsun-code

This comment was marked as resolved.

@ryybrr
ryybrr force-pushed the aarch64-infoflow branch 2 times, most recently from 37aedf9 to 2b6bde2 Compare July 8, 2026 06:32
@ryybrr
ryybrr marked this pull request as ready for review July 8, 2026 06:35
Comment thread proof/access-control/AARCH64/ArchArch_AC.thy Outdated
Comment thread proof/access-control/AARCH64/ArchArch_AC.thy Outdated
Comment thread proof/access-control/Access_AC.thy Outdated
@ryybrr
ryybrr force-pushed the aarch64-infoflow branch 2 times, most recently from 29535b7 to 1863e34 Compare July 13, 2026 00:30
@Xaphiosis

Copy link
Copy Markdown
Member

I spent a while hunting which commit the changes came from for the infoflow refine interfaces... would be nice to get a bit more commit text for the relevant aarch64 infoflow: prove refinement.
Since I'm yoinking some of this to fix arch-split (with attribution and big thanks), you might also get some merge conflict from that, but I tried to keep it minimal. Will start reviewing properly once the arch-split PR is up.

Comment thread proof/infoflow/AARCH64/ArchCNode_IF.thy Outdated
Comment thread proof/infoflow/AARCH64/ArchDecode_IF.thy
Comment thread proof/infoflow/AARCH64/ArchDecode_IF.thy
Comment thread proof/infoflow/AARCH64/ArchDecode_IF.thy Outdated
Comment on lines +56 to +62
(* FIXME AARCH64 IF: move *)
locale_abbrev numlistregs :: "'s state \<Rightarrow> nat" where
"numlistregs s \<equiv> arm_gicvcpu_numlistregs (arch_state s)"

(* FIXME AARCH64 IF: move *)
locale_abbrev current_vcpu :: "'s state \<rightharpoonup> obj_ref \<times> bool" where
"current_vcpu s \<equiv> arm_current_vcpu (arch_state s)"

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we do this move before we merge? To ASpec or AInvs?

@ryybrr ryybrr Jul 16, 2026

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If we agree these abbreviations are preferable, it would be nice to have broader adoption throughout the proof stack. I feel that's beyond the scope of this PR, however

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure how much these abbreviations help really; can you elaborate? These don't exist on any arches other than Arms, and the abbreviation hides the arch_state dependency. I can probably be persuaded on the current_vcpu, but the numlistregs seems too specialised.

Comment thread proof/infoflow/AARCH64/ArchInfoFlow.thy Outdated
Comment thread proof/infoflow/AARCH64/ArchInfoFlow.thy Outdated
Comment thread proof/infoflow/AARCH64/ArchInfoFlow.thy Outdated
Comment thread proof/infoflow/refine/RISCV64/ArchADT_IF_Refine_C.thy Outdated
Comment thread proof/infoflow/refine/ARM/ArchADT_IF_Refine_C.thy Outdated
Comment thread proof/infoflow/RISCV64/ArchUserOp_IF.thy Outdated
Comment thread proof/infoflow/RISCV64/ArchUserOp_IF.thy
Comment thread proof/infoflow/RISCV64/ArchInfoFlow_IF.thy
Comment thread proof/infoflow/ARM/ArchScheduler_IF.thy Outdated
Comment thread proof/infoflow/ARM/ArchInfoFlow_IF.thy Outdated
Comment thread proof/infoflow/ARM/ArchInfoFlow_IF.thy
@Xaphiosis

Copy link
Copy Markdown
Member

I missed where this happened exactly, but there were a couple of:
using wellformed apply (clarsimp simp: associated_vcpu_invisible) or similar uses of using.*apply which should end up on separate lines.

@Xaphiosis

Copy link
Copy Markdown
Member

Done with review pass from my side. Overall, really nice work and thank you for all the cleanup and improvements (some of which I yoinked to be able to deal with Syscall_R). I would ask that this goes in after the Syscall_R arch-split PR, which I hope to be done with today or tomorrow.

There's mostly style stuff, mostly related to existing infoflow style. A few things to consider, especially the situation with those interface locale instantiations picking up increasing amounts of logic, which I really would prefer to be as non-thinking as possible.

@ryybrr
ryybrr force-pushed the aarch64-infoflow branch 3 times, most recently from d781948 to 8363f9d Compare July 27, 2026 01:52
@ryybrr
ryybrr force-pushed the aarch64-infoflow branch from 8363f9d to 7860411 Compare August 4, 2026 11:14
ryybrr added 11 commits August 5, 2026 20:43
Remove various instances of pspace_aligned, valid_vspace_objs, and
valid_arch_state from the preconditions of valid and equiv_valid
predicates.

Signed-off-by: Ryan Barry <ryan.barry@proofcraft.systems>
When the irqs parameter is false, domain_sep_inv asserts
that all non-timer IRQs must be disabled. This change
asserts that the interrupt state of any non-kernel IRQ is
inactive, and therefore not a timer IRQ.

Signed-off-by: Ryan Barry <ryan.barry@proofcraft.systems>
Use the RISCV64 InfoFlow proofs as a basis for AARCH64. Proofs have been
copied verbatim modulo renaming the architecture.

Signed-off-by: Ryan Barry <ryan.barry@proofcraft.systems>
The vgic_lr field is defined as a total function from nats to virqs,
with the domain restricted only in practice via the parameter
arm_gicvcpu_numlistregs. To establish value-level equivalence between
vcpus in the InfoFlow proofs, the vcpu integrity relation must therefore
ensure out-of-bounds list registers remain untouched.

Signed-off-by: Ryan Barry <ryan.barry@proofcraft.systems>
Signed-off-by: Ryan Barry <ryan.barry@proofcraft.systems>
Signed-off-by: Ryan Barry <ryan.barry@proofcraft.systems>
Signed-off-by: Ryan Barry <ryan.barry@proofcraft.systems>
Signed-off-by: Ryan Barry <ryan.barry@proofcraft.systems>
Add a top-level image to the InfoFlowC proofs, mirroring the top-level
image introduced to the InfoFlow proofs.

Signed-off-by: Ryan Barry <ryan.barry@proofcraft.systems>
Signed-off-by: Ryan Barry <ryan.barry@proofcraft.systems>
Example states were designed with an overlapping kernel window and ELF window
in mind. Recent changes to how the ELF window is implemented on AARCH64 mean
these windows no longer overlap. This commit comments out affected parts of
the example state until the changes can be properly addressed.

Signed-off-by: Ryan Barry <ryan.barry@proofcraft.systems>
@ryybrr
ryybrr force-pushed the aarch64-infoflow branch from 7860411 to 5395db2 Compare August 5, 2026 10:43
@lsf37

lsf37 commented Aug 7, 2026

Copy link
Copy Markdown
Member

This is now good to merge from my side. We'll do a separate cleanup pass for some of style questions raised in the review.

@lsf37
lsf37 merged commit 4ac893d into master Aug 7, 2026
13 of 14 checks passed
@lsf37
lsf37 deleted the aarch64-infoflow branch August 7, 2026 07:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants