Commit Graph

5400 Commits

Author SHA1 Message Date
Gerwin Klein 9fe16760b7 github: auto-rebase platform branches
The action will abort when no clean rebase is possible, and force-push
the rebased branch when the rebase over origin/master was clean.

The push will trigger proof runs on the rebased branches.

Signed-off-by: Gerwin Klein <gerwin.klein@proofcraft.systems>
2023-06-07 15:58:57 +10:00
Gerwin Klein 443706fae8 github: distinguish proof PR checks from deployment run
Currently both workflows have the name "Proofs" which is confusing
in the GitHub UI.

Signed-off-by: Gerwin Klein <gerwin.klein@proofcraft.systems>
2023-06-07 15:58:57 +10:00
Gerwin Klein 9752444a81 run_tests: REFINE_QUICK_AND_DIRTY already set in Makefile
REFINE_QUICK_AND_DIRTY is already set correctly in proofs/Makefile,
so doesn't need to be set here.

Signed-off-by: Gerwin Klein <gerwin.klein@proofcraft.systems>
2023-06-06 15:37:01 +10:00
Gerwin Klein 290b7c73cc run_tests: update outdated comment
The Orphanage session is no longer conditional on L4V_ARCH_IS_ARM
(instead it is empty for those architectures that don't support it).

Signed-off-by: Gerwin Klein <gerwin.klein@proofcraft.systems>
2023-06-06 15:37:01 +10:00
Gerwin Klein 6da2d97c69 run_tests: echo L4V_FEATURES and L4V_PLAT
Signed-off-by: Gerwin Klein <gerwin.klein@proofcraft.systems>
2023-06-06 15:37:01 +10:00
Michael McInerney fc44f65175 aspec+haskell: add accessor names for scheduler_action datatype
This adds sch_act_target/schActTarget accessor names for the
switch_thread/SwitchToThread constructor of the scheduler_action
datatype at the aspec and Haskell level, respectively

Signed-off-by: Michael McInerney <michael.mcinerney@proofcraft.systems>
2023-06-05 17:52:06 +10:00
Matthew Brecknell c4d673b96d cspec: Use L4V_PLAT in build export script
CI is introducing an `L4V_PLAT` variable to support proof runs across
more platform configurations. This commit incorporates `L4V_PLAT` into
the paths generated by `export-kernel-builds.py`, to ensure that
exported builds can be disambiguated.

Signed-off-by: Matthew Brecknell <matt@kry10.com>
2023-06-05 13:34:14 +10:00
Gerwin Klein 7c422d7839 cspec: introduce L4V_PLAT
L4V_PLAT selects a platform variation within a L4V_ARCH. This mostly
affects which seL4 cmake config file is loaded when building config
data and the kernel C code. This in turn affects (and will rebuild)
ASpec, ExecSpec, and CSpec.

Examples:

    L4V_ARCH=ARM L4V_FEATURES="" L4V_PLAT=""

will load `ARM_verified.cmake`

    L4V_ARCH=ARM L4V_FEATURES="" L4V_PLAT=imx8mm

will load `ARM_imx8mm_verified.cmake`, and

    L4V_ARCH=ARM L4V_FEATURES=MCS L4V_PLAT=imx8mm

will load `ARM_MCS_imx8mm_verified.cmake`

Signed-off-by: Gerwin Klein <gerwin.klein@proofcraft.systems>
2023-06-05 12:04:29 +10:00
Gerwin Klein 971be5fe2d haskell: constrain run_tests to current L4V_ARCH
Provide L4V_ARCH targets in the Haskell Makefile and constrain
run_tests to use only the current L4V_ARCH, to avoid building all
architectures in all tests.

A manual invocation of just `make` will still build all architectures
for easier checking.

Signed-off-by: Gerwin Klein <gerwin.klein@proofcraft.systems>
2023-05-31 14:46:35 +10:00
Rafal Kolanski 1e619439d2
proof/ROOT: RefineOrphanage: add quick and dirty option
Piggybacking off of REFINE_QUICK_AND_DIRTY as they are usually linked.

Signed-off-by: Rafal Kolanski <rafal.kolanski@proofcraft.systems>
2023-05-26 18:04:49 +10:00
Rafal Kolanski 381ad05df9
run_tests: enable RefineOrphanage for AARCH64
Signed-off-by: Rafal Kolanski <rafal.kolanski@proofcraft.systems>
2023-05-26 18:04:49 +10:00
Rafal Kolanski 7cdd203136
aarch64 refine: first run through Orphanage
Signed-off-by: Rafal Kolanski <rafal.kolanski@proofcraft.systems>
2023-05-26 18:04:49 +10:00
Rafal Kolanski 496f70f7a6
run_tests: fix QUICK_AND_DIRTY handling
os.environ expects a string, not an integer

Signed-off-by: Rafal Kolanski <rafal.kolanski@proofcraft.systems>
2023-05-26 18:04:49 +10:00
Rafal Kolanski 7b73a18757
run_tests: enable Refine (quick_and_dirty) for AARCH64
Signed-off-by: Rafal Kolanski <rafal.kolanski@proofcraft.systems>
2023-05-26 18:04:49 +10:00
Rafal Kolanski 2f3e333500
aarch64 refine: first pass through EmptyFail_H (sorry-free)
Signed-off-by: Rafal Kolanski <rafal.kolanski@proofcraft.systems>
2023-05-26 18:04:48 +10:00
Rafal Kolanski 81d382ec71
aarch64 refine: first pass through Refine (sorry-free)
Signed-off-by: Rafal Kolanski <rafal.kolanski@proofcraft.systems>
2023-05-26 18:04:48 +10:00
Rafal Kolanski 7154cc9d31
aarch64 refine: remove final mention of vs_valid_duplicates'
Signed-off-by: Rafal Kolanski <rafal.kolanski@proofcraft.systems>
2023-05-26 18:04:48 +10:00
Rafal Kolanski c4dee689b0
aarch64: update Init_R+PageTableDuplicates for PT ghost state
Signed-off-by: Rafal Kolanski <rafal.kolanski@proofcraft.systems>
2023-05-26 18:04:48 +10:00
Gerwin Klein 9298456475
refine: update other architectures for ghost state change
Signed-off-by: Gerwin Klein <gerwin.klein@proofcraft.systems>
2023-05-26 18:04:48 +10:00
Gerwin Klein aa2eb9ad6d
design: fix ExecSpec for other architectures
Include the new ArchPSpace_H file, which on the other (non-AArch64)
architectures will only contain an empty placeholder function.

Signed-off-by: Gerwin Klein <gerwin.klein@proofcraft.systems>
2023-05-26 18:04:48 +10:00
Gerwin Klein d24d2f8397
aarch64 refine: first pass through ADT_H
Signed-off-by: Gerwin Klein <gerwin.klein@proofcraft.systems>
2023-05-26 18:04:47 +10:00
Gerwin Klein 064d102047
aarch64 ainvs+refine: proof updates for PT type ghost state
Signed-off-by: Gerwin Klein <gerwin.klein@proofcraft.systems>
2023-05-26 18:04:47 +10:00
Gerwin Klein e0ae44a577
aarch64 haskell+design: record PT types in ghost state
For making the state relation functional in refine/ADH_H we need to
know to which type of page table each PTE belongs. Record this
information in ghost state, similar to what we do for CNode size and
user page size.

Signed-off-by: Gerwin Klein <gerwin.klein@proofcraft.systems>
2023-05-26 18:04:47 +10:00
Gerwin Klein a4f944d094
aarch64 refine: copy PageTableDuplicates from RISCV64
Signed-off-by: Gerwin Klein <gerwin.klein@proofcraft.systems>
2023-05-26 18:04:47 +10:00
Rafal Kolanski c58c007f94
aarch64 refine: copy KernelInit_R from RISCV64
Signed-off-by: Rafal Kolanski <rafal.kolanski@proofcraft.systems>
2023-05-26 18:04:47 +10:00
Rafal Kolanski 72dfb53e91
aarch64 refine: copy IncKernelLemmas+InitLemmas from RISCV64
Signed-off-by: Rafal Kolanski <rafal.kolanski@proofcraft.systems>
2023-05-26 18:04:46 +10:00
Rafal Kolanski ee346ba108
aarch64 refine: first pass though Init_R
Signed-off-by: Rafal Kolanski <rafal.kolanski@proofcraft.systems>
2023-05-26 18:04:46 +10:00
Gerwin Klein 59d303b020
aarch64 refine: first pass through Syscall_R
Signed-off-by: Gerwin Klein <gerwin.klein@proofcraft.systems>
2023-05-26 18:04:46 +10:00
Rafal Kolanski 226c2f6a95
aarch64 refine: first pass through Arch_R
Signed-off-by: Rafal Kolanski <rafal.kolanski@proofcraft.systems>
2023-05-26 18:04:46 +10:00
Rafal Kolanski 7ed847638d
aarch64 haskell: update decodeARMASIDPoolInvocation
Check for mapping was incorrect (attempted to check the ASID cap for
ptIsMapped) and it turns out not necessary.

Signed-off-by: Rafal Kolanski <rafal.kolanski@proofcraft.systems>
2023-05-26 18:04:45 +10:00
Rafal Kolanski 7cea1dc893
aarch64 aspec: attribs_from_word used wrong bits
bit 0 set = cachable = NOT Device
bit 2 set = execute never = NOT execute

Signed-off-by: Rafal Kolanski <rafal.kolanski@proofcraft.systems>
2023-05-26 18:04:45 +10:00
Gerwin Klein 8de14306d4
aarch64 refine: first pass through Tcb_R
Signed-off-by: Gerwin Klein <gerwin.klein@proofcraft.systems>
2023-05-26 18:04:45 +10:00
Rafal Kolanski 20fad5b9fc
aarch64 refine: update vmattributes_map for devices
Page is cachable if not a device.

Signed-off-by: Rafal Kolanski <rafal.kolanski@proofcraft.systems>
2023-05-26 18:04:45 +10:00
Gerwin Klein a88bf412a5
aarch64 refine: remove 1 sorry
Signed-off-by: Gerwin Klein <gerwin.klein@proofcraft.systems>
2023-05-26 18:04:45 +10:00
Gerwin Klein f3bbd47537
aarch64 haskell: prefer fail over error
`error` is mapped to `undefined` which does not work well with `crunch`.
`fail` is mapped to monadic `fail` in Isabelle, works fine with crunch
and we have to prove that it's not called in `corres`.

Signed-off-by: Gerwin Klein <gerwin.klein@proofcraft.systems>
2023-05-26 18:04:45 +10:00
Gerwin Klein 4834c2589a
aarch64 refine: first pass through CNodeInv_R
Signed-off-by: Gerwin Klein <gerwin.klein@proofcraft.systems>
2023-05-26 18:04:44 +10:00
Gerwin Klein 835d82c253
aarch64 refine: first pass through Interrupt_R
Signed-off-by: Gerwin Klein <gerwin.klein@proofcraft.systems>
2023-05-26 18:04:44 +10:00
Gerwin Klein 865facfde9
aarch64 refine: first pass through Ipc_R
Signed-off-by: Gerwin Klein <gerwin.klein@proofcraft.systems>
2023-05-26 18:04:44 +10:00
Rafal Kolanski 4dfb6f8ad3
aarch64 refine: first pass through Finalise_R
Signed-off-by: Rafal Kolanski <rafal.kolanski@proofcraft.systems>
2023-05-26 18:04:44 +10:00
Gerwin Klein be22c7bfcc
aarch64 refine: set up Untyped_R from RISCV64, add hyp/vcpu
Signed-off-by: Gerwin Klein <gerwin.klein@proofcraft.systems>
2023-05-26 18:04:44 +10:00
Gerwin Klein 0a7eaece00
aarch64 refine: copy over Invocations_R from RISCV64
Signed-off-by: Gerwin Klein <gerwin.klein@proofcraft.systems>
2023-05-26 18:04:44 +10:00
Gerwin Klein f4c12a6d85
aarch64 refine: remove kernel_mappings in Retype/Detype
These do not exist on AARCH64

Signed-off-by: Gerwin Klein <gerwin.klein@proofcraft.systems>
2023-05-26 18:04:43 +10:00
Gerwin Klein 5601abc530
aarch64 refine: fill in VSpaceObject cases in Retype_R
Signed-off-by: Gerwin Klein <gerwin.klein@proofcraft.systems>
2023-05-26 18:04:43 +10:00
Rafal Kolanski a4536a17ce
aarch64 refine: first pass through Detype_R
Signed-off-by: Rafal Kolanski <rafal.kolanski@proofcraft.systems>
2023-05-26 18:04:43 +10:00
Rafal Kolanski e508693534
aarch64 refine: first pass through Retype_R
Signed-off-by: Rafal Kolanski <rafal.kolanski@proofcraft.systems>
2023-05-26 18:04:43 +10:00
Rafal Kolanski 3a77d097c4
aarch64 refine: first pass through IpcCancel_R
needed some changes to Schedule_R and VSpace_R

Signed-off-by: Rafal Kolanski <rafal.kolanski@proofcraft.systems>
2023-05-26 18:04:43 +10:00
Rafal Kolanski 044a97ed1a
aarch64 refine: first run through Schedule_R
Signed-off-by: Rafal Kolanski <rafal.kolanski@proofcraft.systems>
2023-05-26 18:04:42 +10:00
Rafal Kolanski 904056868d
aarch64 refine: add state_hyp_refs_of' to valid_state'
Somehow we missed this on the first pass. Adjusted existing proofs.

Signed-off-by: Rafal Kolanski <rafal.kolanski@proofcraft.systems>
2023-05-26 18:04:42 +10:00
Rafal Kolanski a79e06f419
aarch64 refine: first run through VSpace_R
This required a lot of adaptation from ARM_HYP, rearranging, and fixing.
The VCPU lemmas are mostly now constrained to one area, making it
theoretically possible to make a VCPU theory in the future.

Signed-off-by: Rafal Kolanski <rafal.kolanski@proofcraft.systems>
2023-05-26 18:04:42 +10:00
Gerwin Klein 0f11a7a52a
aarch64 refine: progress in ArchAcc
Co-authored-by: Rafal Kolanski <rafal.kolanski@proofcraft.systems>
Signed-off-by: Gerwin Klein <gerwin.klein@proofcraft.systems>
2023-05-26 18:04:42 +10:00