Commit Graph

3273 Commits

Author SHA1 Message Date
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 ddf222700f haskell: Update for GrantReply (SELFOUR-6) 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
Thibaut Perami 1b0b188679 aspec: Fix send_fault_ipc to call send_ipc with is_call at true 2018-12-10 20:01:37 +11:00
Thibaut Perami 10145250c2 aspec: Update ASpec for GrantReply (SELFOUR-6) 2018-12-10 20:01:37 +11:00
Gerwin Klein 5e51fa05d7 lib: tag correctly as BSD
(Two library files were incorrectly tagged as GPL).
2018-12-10 15:58:03 +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 21cc25f131 lib: Add stray lemmas and methods.
These were unused items in ARM CRefine, now kept for potential future
usefulness.
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
Edward Pierzchalski e7fa23ab2c lib: fix up Levity dependency tracking
Uses proof body terms to disambiguate the names encoutered in
dependency extraction, rather than using (for example)
Thm.full_prop_of.

The result is that this catches a few more missing dependencies,
enough to correctly identify unused lemmas large sessions
like CRefine.
2018-11-16 15:15:55 +11:00
Gerwin Klein b8a99035dc lib: an abbreviation command with pretty printing inside locales
Normal abbreviations are not contracted on pretty printing when defined
inside a locale. This commit provide the command locale_abbrev which does
contract on pretty print even when defined inside a locale. It cannot be
used with abbreviations that mention fixed locale variables (whereas the
standard abbreviations can).

Co-authored-by: Rafal Kolanski <rafal.kolanski@data61.csiro.au>
2018-11-15 22:56:01 +11:00
Gerwin Klein 558aa5ca05 riscv platform: address space layout diagram; fixed pAddr_base 2018-11-06 14:14:26 +11:00
Edward Pierzchalski ecc84ffc6e lib: fix up Levity JSON output
- Previously printed `~` for negative numbers, which is invalid
  JSON. Now prints `-`.

- Previously the outpout would unconditionally trim
  'underscore-number' suffixes. Now uses theory context to determine
  if it's likely to be an index into a theory list or an existing
  fact name.

- Changed JSON structure to avoid using dynamic names for keys, i.e.
  from this:

    {
      "my_theory_name": {...}
    }

  to this:

    {
      "theory": "my_theory_name",
      "content": {...}
    }

  This should make processing the output slightly nicer by matching
  what other tools expect.

- Changed JSON structure to consolidate dependencies. Lemmas are no
  longer special-cased.
2018-11-02 15:40:30 +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 021f3eedb5 riscv aspec: refactor RISC-V spec to use OptionMonad 2018-10-26 09:24:27 +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 a74b7b4079 lib: clean up BCorres_UL 2018-10-25 12:54:02 +11:00
Gerwin Klein f3dca6865c lib: option (reader) monad syntax and gets_map operator 2018-10-25 12:54:02 +11:00
Gerwin Klein 7a48f4c8c7 aspec: add function for mapping arch objects from objects 2018-10-25 12:54:02 +11:00
Gerwin Klein 516952bd9d aspec: clean up comments + warnings 2018-10-25 12:54:02 +11:00
Gerwin Klein f2613b2853 lib: additional setup for numeral types
In particular: instantiate to the size class so one can use bounded types
for automatic termination measures in fun.
2018-10-25 12:54:01 +11:00
Gerwin Klein 69f00fd7f7 word_lib: cleaning up some old proofs 2018-10-25 12:54:01 +11:00
Japheth Lim 0ab8491add lib/FastMap: add FIXME for conv_at hack 2018-10-23 15:44:11 +11:00