Commit Graph

193 Commits

Author SHA1 Message Date
Victor Phan 1689dd94fe cleanup
arm ainvs: cleanup

Abbreviate Hoare triples that do not care about the return value and
whose pre and post conditions are the same.

x64 ainvs: cleanup

ainvs: cleanup

x64 ainvs: cleanup

drefine: cleanup
2019-04-18 14:32:08 +10:00
Victor Phan 93888ccb07 infoflow: remove oopsied lemma 2019-04-18 14:32:08 +10:00
Victor Phan 3807eb3b8f infoflow: update for new definition of set_object 2019-04-18 14:32:08 +10:00
Japheth Lim 3fc4166e7e AInvs: cleaner way to express ARM page table alignment 2019-02-01 14:11:37 +11:00
Japheth Lim 016a5d33ac AInvs: adjust pointer alignment invariants for PTEs, PDEs, etc.
Addresses issue VER-1036.

Previously, there were pointer alignment invariants in valid_pte, etc.
However, these had two problems:
1. valid_pte was conditioned on the PTE being mapped, so we couldn't
   rely on PTE pointers being aligned unconditionally (see VER-1036).
2. The existing alignments were actually incorrect for large pages.
   Proofs that needed the true alignments, obtained them from other
   parts of invs (e.g. valid_objs).

This commit moves the alignment invariants to wellformed_pte, etc.
and changes them to use the correct values.
2019-02-01 14:11:37 +11:00
Japheth Lim bd6b934613 infoflow: clearer comment for the subjectAffects case for Reply 2018-12-10 20:01:38 +11:00
Japheth Lim c0fac42147 InfoflowC: fix for GrantReply (SELFOUR-6) 2018-12-10 20:01:38 +11:00
Japheth Lim 4d4de9098b infoflow: delete commented-out sections 2018-12-10 20:01:38 +11:00
Japheth Lim ab2e097e60 infoflow: proof style cleanup (for GrantReply patch)
As the title says, this commit introduces general formatting and style
cleanup, but only for the parts touched by the recent GrantReply patch.
2018-12-10 20:01:38 +11:00
Japheth Lim 9eaf630e48 infoflow: more minor FinalCaps cleanup 2018-12-10 20:01:38 +11:00
Japheth Lim f49aefd4a4 infoflow: style cleanup (for GrantReply patch): FinalCaps and Noninterference 2018-12-10 20:01:38 +11:00
Japheth Lim 99bd4b0723 access, infoflow: replace "pi_cases" proofs with structured cases 2018-12-10 20:01:38 +11:00
Japheth Lim 6dfe687ac1 access: fix incorrect spec for bound notifications 2018-12-10 20:01:38 +11:00
Thibaut Perami d3542f1cbf infoflow: Fix for GrantReply (SELFOUR-6)
Mainly repercusion of changes occuring for Access:
  - Fix subjectReads and subjectAffects with new authorities
  - SILC label is forbidden to contain any transferable cap
  - Lots of lemma that required is_subject on their parameter now only
    require aag_can_read when possible
  - Major cleanup of the integrity ==> subjectAffects proofs for kheap,
    CDT and user memory.
2018-12-10 20:01:38 +11:00
Santiago Bautista ab259704c7 access+infoflow+drefine: update for new definition of `idle_tcb_at`
* Context :

 We would like to prove that, for ARM_HYP architecture,
  the current vcpu is always the vcpu associated to the current thread.
 See issue https://jira.csiro.au/browse/VER-770
  and PR 291 http://bitbucket.keg.ertos.in.nicta.com.au/projects/SEL4/repos/l4v/pull-requests/291

 In this process, we changed the definition of `idle_tcb_at`

* In this commit :

 Update some proofs in access, infoflow and drefine to take
  the new definition of `idle_tcb_at` into account.
2018-10-31 18:04:59 +11:00
Gerwin Klein c53f7850d7 Base ASpec + machine on OptionMonad_ND; fix proof fallout 2018-10-25 12:54:02 +11:00
Edward Pierzchalski c4dc578bc3 Fix up proofs after word lemma moves 2018-10-10 14:15:01 +11:00
Mitchell Buckley 8173a37c2d Updated specs and proofs for SELFOUR-1491: control IRQ triggering on ARM. 2018-09-19 16:18:09 +10:00
Gerwin Klein 9092aa0308 infoflow: retire old unmaintained files 2018-08-20 09:06:37 +10:00
Gerwin Klein bce80f80fd Isabelle2018: InfoFlowC 2018-08-20 09:06:37 +10:00
Gerwin Klein 296043b7e8 Isabelle2018: InfoFlow 2018-08-20 09:06:36 +10:00
Gerwin Klein 6b9d9d24dd Isabelle2018: new "op x" syntax; now is "(x)"
(result of "isabelle update_op -m <dir>")
2018-08-20 09:06:35 +10:00
Gerwin Klein 011e08458e Isabelle2018: new comment syntax
(result of "isabelle update_comments <dirs>")
2018-08-20 09:06:35 +10:00
Gerwin Klein b5cdf4703f globally use session-qualified imports; add Lib session
Session-qualified imports will be required for Isabelle2018 and help clarify
the structure of sessions in the build tree.

This commit mainly adds a new set of sessions for lib/, including a Lib
session that includes most theories in lib/ and a few separate sessions for
parts that have dependencies beyond CParser or are separate AFP sessions.
The group "lib" collects all lib/ sessions.

As a consequence, other theories should use lib/ theories by session name,
not by path, which in turns means spec and proof sessions should also refer
to each other by session name, not path, to avoid duplicate theory errors in
theory merges later.
2018-08-20 09:06:34 +10:00
Gerwin Klein 9a4d2677e3 lib+spec: move definition of machine_word to Word_Lib
JIRA VER-963
2018-08-06 11:22:52 +10:00
Gerwin Klein 5ae7cc23b1 aspec: msg_align_bits and related are arch independent
While the numerical value is arch dependent, the definition and symbolic value
are not. This commit factors out the symbolic computation and only unfolds the
numeric value in the architecture dependent spec.
2018-08-06 11:22:51 +10:00
Thomas Sewell 26049db669 Repair proofs for wpsimp/crunch changes.
A handle of fiddly proofs change slightly. A common offender involves
tcb_cap_cases, which should be unfolded with the ran_tcb_cap_cases
rule where possible rather than with tcb_cap_cases_def.
2018-08-03 18:25:30 +10:00
Japheth Lim 8392624f6c infoflow: hacky speedups for Noninterference.thy
This speeds up a bunch of the slowest uwr and automaton proofs in
Noninterference, mainly by adjusting the simp depth limit to avoid
unneeded backtracking. Inspired by a rant from Tom Sewell.
2018-08-02 16:53:04 +10:00
Japheth Lim 31737df065 infoflow: improve header comment for Noninterference.thy 2018-08-02 16:53:04 +10:00
Japheth Lim 166af9e5ee access, infoflow: cleanup from previous commit; some style cleanup 2018-08-02 16:53:04 +10:00
Japheth Lim a6c11a2b28 access-control, infoflow: use generic relation for pasDomainAbs
This patch generalises the mapping between authority labels and
scheduler domains, so that the access-control integrity property still
holds when labels are not partitioned into domains. This lets us use
the integrity result on systems that don't use the domain scheduler.

The information flow proofs still rely on the domain partitioning,
hence we add constraints on the label-domain mapping for the info-flow
results to hold.

Jira VER-945
2018-08-02 15:01:42 +10:00
Thibaut Perami 9523eea0d6 infoflow: Clean up infoflow, comment, wrap lines, ... 2018-07-16 15:36:21 +10:00
Corey Lewis c71fa27e14 Whitespace and typos 2018-07-03 13:42:23 +10:00
Corey Lewis 571ef6d0ca crefine+drefine+access+infoflow: update proofs for SetTLSBase (VER-807) 2018-07-03 13:42:22 +10:00
Rafal Kolanski 15d6b62040 arm: address setCurrentPD mismatch between abstract/haskell/C
ARM setCurrentPD was recently refactored as part of multi-VM support for
ARM_HYP. The Haskell was updated correctly, and the C was not.
Unfortunately, setCurrentPD was manually redefined in MachineOps.thy for
ARM hiding the change, making the C look correct when it wasn't.

We scrap the second definition of setCurrentPD, load it from the Haskell,
and have an abstract set_current_pd that's a bit simpler to refine down
from.

The proofs are updated for the above change and the update to the C
setCurrentPD that was breaking on KZM.
2018-06-22 11:59:30 +10:00
Corey Lewis 2d0baab462 Proof update for crunch changes 2018-04-04 14:13:55 +10:00
Thomas Sewell 0f38e20094 Many proof repairs. 2018-03-16 14:57:51 +11:00
Thomas Sewell 652cbb966e Initial proof updates for combinator changes. 2018-03-16 14:53:22 +11:00
Gerwin Klein 3f7d6e1ce9 ARM infoflow: proof update for user_context refactor 2018-03-08 18:41:28 +11:00
Gerwin Klein 79cea8452f retire out-of-date effort calculation 2018-03-08 08:32:42 +11:00
Michael Sproul f0795805d1 SELFOUR-1016: fix confused deputy problem when setting priorities 2018-02-26 11:19:43 +11:00
Joel Beeren 4601f2a1ab Genericise deletion actions that occur after empty_slot
This patch adds a generic "post_cap_deletion" step that is called by
finalise_slot. Previous to this, the only caps which had actions
required at this stage were IRQHandlerCaps -- it was required that the
IRQ bitmap be updated after the cap itself was removed (as the
invariants state that for any existing IRQHandlerCap, the corresponding
bit in the IRQ bitmap must be set).

By genericising this, we add the capacity for new, arch-specific post
cap deletion actions to occur in the future.
2018-02-23 09:12:55 +11:00
Matthew Brecknell 2f540e802c add constant definitions for bounds on untyped object sizes 2017-12-18 12:58:27 +11:00
Miki Tanaka 2a1beffac1 arm: update for simple_ko getter/setter 2017-12-14 18:02:48 +11:00
Miki Tanaka 3841b6e8ba arm : add AEndpoint and ANTFN a_type simplification
in addition to the a_type ATCB simplification, the following two are now in the simpset:
  "a_type (Endpoint x) = AEndpoint"
  "a_type (Notification v) = ANTFN"
2017-12-14 07:17:27 +11:00
Rafal Kolanski 3a22487cf3 arm: revise scheduler / fastpath / scheduler bitmaps (SELFOUR-242)
Colloquially known as "invert-fastpath".

Update verification efforts on ARM for the following seL4 changes:
- scheduling decisions done in possibleSwitchTo are moved to the
  scheduler
  - possibleSwitchTo only checks whether the candidate is valid for a
    fast switch, not its priority, accepting possible candidates
    immmediately as a switch-to scheduler action
  - the scheduler checks the candidate against the current thread and
    against the bitmaps before making a decision
  - attemptSwitchTo and switchIfRequiredTo are gone
  - scheduler is now more complicated, and numerous proofs related to it
    are rewritten from scratch
- fast path now checks ready queues via the scheduler bitmaps
- L2 scheduler bitmap order reversed for better cache locality

Many iterations between the kernel and verification teams were needed
to get this right.
2017-11-27 22:05:34 +11:00
Rafal Kolanski f641d70b6d infoflow: add InfoFlow_Image_Toplevel
It's really tiring figuring out whether we loaded all of the right
InfoFlow theory files in jEdit. This file lists what "the theories for
InfoFlow" are and should be loaded instead.

ROOT file adjusted to target it instead of a bunch of files, some of
which already include some of the others.
2017-11-27 21:00:14 +11:00
Matthew Brecknell a2dd6d1777 autocorres-crefine: update CRefine proofs for AutoCorres 2017-11-22 15:37:36 +11:00
Alejandro Gomez-Londono 8f5bf9b1ae Isabelle2017: updates InfoFlow for RC0
* Rename zmod_eq_dvd_iff -> mod_eq_dvd_iff
2017-10-30 12:23:26 +11:00
Matthew Brecknell 48b3a8b4ca update object and field widths for x64, and remove some magic numbers
In X64 update the following to match the C kernel:
  - TCB size-bits (11).
  - Endpoint size-bits (4).
  - Guard bits (58).
  - Message registers.

For all architectures, replace magic numbers with defined constants in
specifications, and as far as possible in proofs:
  - tcb_bits in abstract spec.
  - tcbBlockSizeBits, cteSizeBits, ntfnSizeBits, epSizeBits in Haskell
    spec, Haskell and C refinement proofs.
2017-10-26 14:05:35 +11:00