Commit Graph

1449 Commits

Author SHA1 Message Date
Callum Bannister 4c79675879 sysinit: implement support for shared frames
Co-authored-by: Michael Sproul <michael.sproul@data61.csiro.au>
2019-02-19 14:47:00 +11:00
Michael Sproul 01fb050e42 sep-capDL: delete sep_state_irq_map print transl
The print translation triggered over-eagerly and would abbreviate all mappings
from words to word options (sizes were ignored).
2019-02-19 14:25:10 +11:00
Michael Sproul 045683cd9c ainvs: Rights_AI theory with facts about VM rights
SysInit requires some facts about VM rights that are shared with AInvs, so this
commit introduces a new theory to contain the shared lemmas.
2019-02-19 14:24:41 +11: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
Matthew Brecknell 8272f79c0f arm-hyp crefine: remove named interrupt identifiers
Recent changes to the C kernel mean that various structures and
constants are generated from DTS files. In particular, verification now
sees interrupt identifiers as integer literals instead of defined
constants.
2019-01-30 17:13:03 +11:00
Japheth Lim 5516fea8a0 capDL-api, sys-init: fix for GrantReply (SELFOUR-6)
The badge condition for the CNode_Mint lemmas was incorrect and ought
to be untangled. This commit patches up the specs, but with ad-hoc
proof fixes.
2018-12-11 14:54:42 +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 186d610db7 DPolicy: fix for GrantReply (SELFOUR-6) 2018-12-10 20:01:38 +11:00
Japheth Lim 3758df05df dspec, drefine: fix for GrantReply (SELFOUR-6)
Nothing too exciting here, just duplicating the new GrantReply logic
from ASpec and repairing the proofs.
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 2735ad42a1 access: proof cleanup for tro_alt_trans_spec
The proof structure still largely follows Thibaut's scheme; this commit
merely adds some speedup, style cleanup, and documentation.

Unfortunately, the proof state seems to be just large enough that the
built-in record update ruleset runs into limitations, and the standard
clasimp tactics start to fail on subgoals in an unpredictable way.
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 6e2fbbe7f1 access: improve comments for policy_wellformed and integrity_obj 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 6b48805ef1 access: use monad_commute to prove empty_slot commute lemma
This is ostensibly more principled than the earlier proof, which simply
unfolded all the monad combinators. However, there was also no existing
framework for using monad_commute, so we need to make one up just to
do this single proof.
2018-12-10 20:01:38 +11:00
Japheth Lim 5d1525bb7a access: 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 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
Thibaut Perami 86bbe323c8 access: Fix for GrantReply (SELFOUR-6)
Integrity and pasRefined are majorly changed

The main repercussions are:
 - 3 new authorities in the policy: Call, Reply, and DeleteDerived
 - The cdt and the caps state are linked in pasRefined
 - CDT parentship no longer implies control in certain cases (is_transferable)
 - CDT parentship now implies DeleteDerived
 - Introduction of cdt_change_allowed that specifies which slot your are
   allowed to modify
 - Integrity for CDT and CDT list use cdt_changes_allowed
 - Integrity for objects in now expressed as a transitive closure of
   atomic transition rules
2018-12-10 20:01:38 +11:00
Rafal Kolanski 4ee84d6348 x64 crefine: update for GrantReply (SELFOUR-6) 2018-12-10 20:01:38 +11:00
Rafal Kolanski 0d292f48dd arm-hyp crefine: update for GrantReply (SELFOUR-6) 2018-12-10 20:01:38 +11:00
Rafal Kolanski 103fc3656e x64 refine: update for GrantReply (SELFOUR-6) 2018-12-10 20:01:38 +11:00
Rafal Kolanski 0ead52863d arm-hyp refine: update for GrantReply (SELFOUR-6) 2018-12-10 20:01:38 +11:00
Rafal Kolanski 8d137b4e86 x64 ainvs: update for GrantReply (SELFOUR-6) 2018-12-10 20:01:38 +11:00
Rafal Kolanski 25a6d636e0 arm-hyp ainvs: cleanup: unused lemmas 2018-12-10 20:01:37 +11:00
Rafal Kolanski 1975b57c11 arm-hyp ainvs: update for GrantReply (SELFOUR-6) 2018-12-10 20:01:37 +11:00
Rafal Kolanski a34e0fc6f8 arm crefine: update for GrantReply (SELFOUR-6) 2018-12-10 20:01:37 +11:00
Rafal Kolanski c02d0406f5 arm refine: update for GrantReply (SELFOUR-6)
Initial setup and sorrying by Thibaut Perami.
2018-12-10 20:01:37 +11:00
Thibaut Perami c955ff4917 aspec + arm ainvs: Update mask_rights to mask master reply caps 2018-12-10 20:01:37 +11:00
Thibaut Perami d3548a5720 arm ainvs: Cleanup 2018-12-10 20:01:37 +11:00
Thibaut Perami 2c065aa62c arm ainvs: Add is_valid_vtable_root as vtable_slot invariant 2018-12-10 20:01:37 +11:00
Thibaut Perami 3f26cde16a arm ainvs: Update for GrantReply (SELFOUR-6) 2018-12-10 20:01:37 +11:00
Michael Sproul cac9472e44 sys-init: eliminate non-constructive UNIV 2018-11-26 16:05:37 +11:00
Michael Sproul 94ede44f36 sys-init: make slots_of_list constructive 2018-11-26 15:25:00 +11:00
Michael Sproul 7a92cd4f63 sys-init: make bound_irq_list constructive
This takes the set comprehension and existential of `bound_irqs` out of the
model, which makes translating it to executable code more straightforward.
2018-11-26 15:24:44 +11:00
Edward Pierzchalski 3d49538f2f arm crefine: mark some lemmas as FIXME.
There are some good simp set candidates as well as ones that should be
moved.
2018-11-21 17:12:23 +11:00
Edward Pierzchalski 17f3263d5e arm crefine: remove some unused lemmas.
Add some comments on unused lemmas that we want to move or keep.
2018-11-21 17:12:23 +11:00
Japheth Lim fd6d4b87ae refactor einvs from Refine and Access into AInvs 2018-11-20 16:34:29 +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
Santiago Bautista d930ef2c09 arm-hyp ainvs: prove that the vcpu of the idle thread is always None
* 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

* Intermediate step : the vcpu of the idle thread is always None

 In this commit we update the proofs of abstract invariants for
  the arm_hyp architecture, so that the new version of `valid_idle`,
  stating that the vcpu of the idle thread is always None, holds.
2018-10-31 18:04:59 +11:00
Santiago Bautista 611ec8c5e0 ainvs: changed definition of `valid_idle` + `idle_tcb_at` ; defined `valid_arch_idle` invariant
* 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

* Intermediate step : the vcpu of the idle thread is always none

 In this commit, we modify the `valid_idle` invariant so that it includes
  the fact that the vcpu of the idle thread is always None.
 This is needed for PR291 (see Context above).
  `valid_idle` beeing defined with `idle_tcb_at`,
  we changed the definition of `idle_tcb_at`
  so that it can convey information about the architecture.
 And we defined `valid_arch_idle`
  that states that the vcpu of an iarch_tcb is None.

* What changed :

 Even if these changes are only interesting for the
  abstract invariants for arm_hyp architecture
  (that are being extended),
  it implied changes to several generic and architecture-specific
  files of the astract invariants (AInvs) sessions.

Co-authored-by : Corey Lewis <corey.lewis@data61.csiro.au>
Co-authored-by : Santiago Bautista <santiago.bautista@data61.csiro.au>
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
Gerwin Klein b064281eb5 ainvs: clean up and arch split BCorres
RISCV64 will need slight variations in the arch dependent proofs
2018-10-25 12:54:02 +11:00
Gerwin Klein 5efa3bbde7 test: allow CBaseRefine to run concurrently with Refine
If Refine fails, it can still be useful to test CBaseRefine skipping over the
failed Refine proofs (when that works).
2018-10-22 13:21:11 +11:00
Gerwin Klein 52117a4a6b drefine test: record reduced dependency 2018-10-22 13:21:11 +11:00
Gerwin Klein 15bfcdd98b reduce DRefine dependencies from Refine to AInvs
This needs (and includes) some deduplication and moving of lemmas formerly in
refine.
2018-10-22 13:21:11 +11:00