Commit Graph

136 Commits

Author SHA1 Message Date
Joel Beeren 81064fdb55 idle-thread-pd: run idle thread with the global PD all the time.
This avoids the multicore scenario of the idle thread running in the
address space that has been deleted by a thread running on another core.
2017-07-11 11:29:34 +10:00
Miki Tanaka 41fe1a0845 update proofs for SELFOUR-30/291 "Reschedule on self-modification"
- SELFOUR-30 Reschedule when changing own IPC buffer
Previously if you invoked the TCB of the current thread and
changed the IPC buffer frame this would not immediately take
affect, as the kernels view of the current IPC buffer is
updated in Arch_switchToThread. This change forces Arch_switchToThread
to get called, even if we would switch back to the original
thread.

- SELFOUR-291 Reschedule when changing own registers
Previously if you wrote to TCB of the current thread and
changed the TLS_BASE this would not immediately take
affect, as the kernel only updates this register in
Arch_switchToThread. This change forces Arch_switchToThread
to get called, even if we would switch back to the original
thread.
2017-06-26 15:52:35 +10:00
Joel Beeren 392d055e99 SELFOUR-748: rename tlb invalidation functions 2017-06-20 14:05:45 +10:00
Alejandro Gomez-Londono 492d6c1817 arm infoflow: Fix argument of getActiveIRQ in check_active_irq_if
* This is trivial/irrelevant since getActiveIRQ ignores its argument
    in ARM, but it makes a bit more sense to have it being this way,
    and it is consistent with the equivalent function in InfoFlowC.
2017-06-19 14:32:45 +10:00
Alejandro Gomez-Londono 8bac9cc586 arm infoflowc: Refactors proofs for new definitions (pteBits, pdeBits, etc) 2017-06-19 14:32:45 +10:00
Alejandro Gomez-Londono a8258ae6a3 arm infoflowc: Updates for the new argument of getActiveIRQ 2017-06-19 14:32:45 +10:00
Miki Tanaka c21127eb0f arm InfoFlow: fixes for the backports from arm-hyp 2017-06-19 14:32:44 +10:00
Joel Beeren 71e2db88a4 arm: refactor sanitise_register to take a bool instead of a kernel_object
This simplified the sanitise_register logic in CRefine for arm-hyp.
2017-05-03 21:51:57 +10:00
Rafal Kolanski c41c7a97ca update references from/to moved crefine, parametrise over L4V_ARCH 2017-03-31 16:13:41 +11:00
Miki Tanaka 7ad3ef3b3e wp: update the proofs for the new wp/wpc/wpsimp 2017-03-16 19:39:11 +11:00
Miki Tanaka a95b9cca7c InfoFlowC: updates for Hypervisor stub 2017-02-22 15:26:50 +11:00
Miki Tanaka b2f2034bbc Bisim / Access / InfoFlow: updates for Hypervisor stub 2017-02-22 15:26:49 +11:00
Miki Tanaka d7026b5bad Access and InfoFlow fix for prepare_thread_delete 2017-02-20 09:23:55 +11:00
Gerwin Klein 520921351a provide TCB argument for sanitiseRegister
Other platforms such as arm-hyp will need to look into additional TCB state
such as VCPU in sanitiseRegister. This commit provides the scaffolding for
that.
2017-02-12 12:54:42 +11:00
Rafal Kolanski 7657681fca move refine/* to refine/ARM/*, parametrise over $L4V_ARCH 2017-01-30 12:22:22 +11:00
Joel Beeren 3dafec7d46 backport changes to ARM proofs from X64 work in progress
- replace ARM-specific constants and types with aliases which can be
  instantiated separately for each architecture.
- expand lib with lemmas used in X64 proofs.
- simplify some proofs.

Also-by: Matthew Brecknell <Matthew.Brecknell@data61.csiro.au>
2017-01-27 08:31:07 +11:00
Gerwin Klein 8ac1200329 cleanup: remove accidentally declared const 2017-01-15 17:05:52 +01:00
Gerwin Klein 45df23b3e1 infoflow examples: clean out unnecessary warnings 2017-01-13 14:04:15 +01:00
Gerwin Klein 47119bf43e wp_cleanup: update proofs for new wp behaviour
The things that usually go wrong:
  - wp fall through: add +, e.g.
      apply (wp select_wp) -> apply (wp select_wp)+

  - precondition: you can remove most hoare_pre, but wpc still needs it, and
    sometimes the wp instance relies on being able to fit a rule to the
    current non-schematic precondition. In that case, use "including no_pre"
    to switch off the automatic hoare_pre application.

  - very rarely there is a schematic postcondition that interferes with the
    new trivial cleanup rules, because the rest of the script assumes some
    specific state afterwards (shouldn't happen in a reasonable proof, but
    not all proofs are reasonable..). In that case, (wp_once ...)+ should
    emulate the old behaviour precisely.
2017-01-13 14:04:15 +01:00
Matthew Brecknell aadc5125ba Isabelle2016-1: follow Isabelle's choice of meta-forall bindings
Fix some proofs that were broken because Isabelle chose different
names for meta-forall-bound variables.
2017-01-05 14:25:18 +11:00
Matthew Brecknell 511c6b2d3a Isabelle2016-1: rename free variables to avoid capture 2017-01-05 14:24:36 +11:00
Matthew Brecknell 7d0425dd3e Isabelle2016-1: fix proofs using lemmas now removed
Some lemmas that were specific instances of more general lemmas have
been removed from the library. In most cases, broken references could
simply be replaced with the more general fact.
2017-01-05 14:23:11 +11:00
Matthew Brecknell 41d4aa4f1d Isabelle2016-1: update references to renamed constants and facts 2017-01-05 14:23:05 +11:00
Matthew Brecknell 4905a589bf trivial: remove some uses of find_theorems 2016-12-13 22:10:31 +11:00
Thomas Sewell 77d86cfc5f GraphRefine + CRefine: handle slightly more cases.
New testfile for graph-refine export with new handling code. Also
some slight tweaks to some CRefine proofs that will be needed to
remove DONT_TRANSLATE markers from certain key places in the seL4
code. These proofs are also compatible with previous seL4.
2016-12-08 16:12:17 +11:00
Alejandro Gomez-Londono 1289f7bc6e Updating remaining proofs for tcb_arch reserved_irq and arch_fault changes
* tcb_context rephrasing to (tcb_context o tcb_arch) and respectively
  for set operations

* unfolding of reserved_irq for trivially solving most lemmas

* Changes to the inductive definition of integrity_obj to account for
  tcb_arch and tcb_context new location

* Changes to the tcb examples in ExampleSystem to include tcb_arch

* Rephrasing of domain_sep_inv to accommodate the ReservedIRQ case

* Mostly rephrasing  of tcb_context to (some form of) (tcb_context o tcb_arch)

* Trivial unfolding of handle_reserved_irq for hoare rules

* Examples in Example_Valid_State.thy were updated

* Nothing remarkable, mostly rephrasing of tcb_context and ReservedIRQ
  handling

* Fun fact, some proofs are now shorter

  tags: [VER-623][SELFOUR-413]
2016-11-25 13:51:07 +11:00
Xin,Gao d7450607a8 SELFOUR-553: rebase and fix styles and comments 2016-11-21 20:47:15 +11:00
Miki Tanaka a2d707d17e SELFOUR-553: update rpidrurw in TCBConfigure for simpler Infoflow proofs. 2016-11-18 16:27:26 +11:00
Joel Beeren 2553371a14 SELFOUR-64: Remove general Recycle operation
This removes the RecycleCap CNodeInvocation, whilst
retaining recycle behaviour for Endpoints -- now renamed
CNodeCancelBadgedSends.
2016-11-18 14:11:12 +11:00
Joel Beeren eb5badce92 l4v: Add intermediate image for InfoFlowC.
This allows one to skip the Access, InfoFlow proofs
when building InfoFlowC, hopefully allowing faster
turn arounds when doing maintenance.
2016-11-16 09:12:18 +11:00
Rafal Kolanski ff7ca60df7 ADT: add kernel entry/exit constraints on domain time left
These changes to the automatons are required by:
  SELFOUR-242: invert bitfield scheduler and optimise fast path

Details:

When we enter the kernel, the domain time left (ksDomainTime) is never zero.
If we entered on a timer interrupt, we may decrement it to zero before the
scheduler runs. If we do so, we set the scheduler state to choose_new_thread.

When choosing a new thread, the scheduler switches to a new domain if the
present one is required, and sets the new domain time left from domain_list
(ksDomSchedule).

When entering the kernel on a non-interrupt event, we never touch the domain
time left, which trivially preserves the new constraints.

To prove these, we had to ban a transition from kernel entry to kernel being
preempted when handling an interrupt event in InfoFlow. This is fine, as by
design handling interrupts is not meant to be preempted by interrupts.
2016-11-11 06:01:30 +11:00
Thomas Sewell 0fa247199b SELFOUR-444: Repair InfoFlow. 2016-11-02 11:19:10 +11:00
Thomas Sewell 74adb7a283 SELFOUR-444: Avoid unnecessary cache clears.
Adjust both specs and propagate the changes.
2016-11-02 11:19:09 +11:00
Thomas Sewell a96346e308 SELFOUR-444: Finished InfoFlow and DRefine. 2016-11-02 11:19:09 +11:00
Matthew Brecknell a3714e8190 SELFOUR-276: Finish proofs for maximum controlled priority (MCP)
To finish the proof of refinement to C, the specification for checkPrio
needed strengthening: the checkPrio spec now takes a machine word
argument. In the spec, priorities are still stored as 8-bit quantities,
however. Once the spec was strenthened, it was possible to remove some
redundant checks and mask operations from the C code.

A thread's maximum controlled priority (MCP) determines the maximum
thread priority or MCP it can assign to another thread (or itself).
2016-10-05 02:43:41 +11:00
Xin,Gao 8d4a8eb238 SELFOUR-421: fix coding style 2016-09-22 19:23:28 +10:00
Xin,Gao 113315d9a6 SELFOUR-421: merge and fix up to ArmConfidentiality proof 2016-09-22 19:21:56 +10:00
Xin,Gao e00e4c4e64 SELFOUR-421: add device bit in UntypedCap and FrameCap in capdl 2016-09-22 19:11:37 +10:00
Xin,Gao 252ce8df4c SELFOUR-421: infoflow and infoflow_c builds 2016-09-22 19:11:37 +10:00
Matthew Brecknell 1013e959c1 arch_split: give some vspace concepts more generic names
In particular rename "pd" to "vspace", when the pd represents
an address space.
2016-08-03 14:46:48 +10:00
Matthew Brecknell ed2f1e1ca3 arch_split: split PDPTEntries_AI, rename as VSpaceEntries_AI [VER-580] 2016-07-12 16:50:32 +10:00
Miki Tanaka eb7f7b1564 arch-split: Tcb_AI.thy done 2016-07-07 13:57:16 +10:00
Matthew Brecknell d50e43d717 arch_split: invariants: split CNodeInv_AI [VER-573] 2016-07-04 11:56:53 +10:00
Japheth Lim 40570bc4fe regression: add test to check theory import paths
This commit also fixes all bad imports reported by the test script.
Jira issue VER-560
2016-05-27 16:17:13 +10:00
Japheth Lim 26a7907c95 Merge pull request #43 in SEL4/l4v from ~JALIM/l4v:autocorres-seL4 to master
* commit 'ecbb860532b4c576fc4726a805802f16bcf5302c': (29 commits)
  autocorres-crefine: specialise corres_no_failI for compatibility with Refine
  Add license tags for autocorres-crefine files
  crefine: refactor AutoCorresTest a bit
  autocorres-crefine: remove local debugging imports
  Fix InfoFlowC to accommodate corres_underlying changes.
  Fix DRefine to accommodate corres_underlying changes.
  autocorres-crefine: experiment with manually translating a function (clzl).
  autocorres-crefine: experiment with translating bitfield_gen specs.
  autocorres-crefine: start a test case for function calls.
  autocorres-crefine: update example proofs to work with no_c_termination, which does not require proving termination for the C spec.
  autocorres: add user option "no_c_termination" for previous patch.
  Making termination proof optional for AutoCorres.
  WIP: autocorres: hacky proof of concept for incremental translation.
  autocorres: add some missing WordAbstract rules.
  autocorres-crefine: fix some comments in work theory.
  autocorres-crefine: prove modifies and (simple) terminates specs.
  autocorres-crefine: experiment with generating modifies proofs
  autocorres-crefine: run autocorres in kernel_all_substitute locale
  autocorres-crefine: update another corres_UL that snuck in before rebasing.
  autocorres-crefine: working ccorres for handleYield (modulo some white lies).
  ...
2016-05-19 01:19:58 +00:00
Gerwin Klein 322f1023f5 word_lib: adjust theory dependencies 2016-05-16 21:11:40 +10:00
Japheth Lim a5694be550 Fix InfoFlowC to accommodate corres_underlying changes. 2016-05-13 17:39:33 +10:00
Matthew Brecknell b16496e7cf arch_split: InfoFlowC checking 2016-05-06 13:15:37 +10:00
Daniel Matichuk 9ceed1eb12 arch_split: fix proofs after removing shadow and unqualify commands and adding fix for crunch. Checks up to DPolicy. 2016-05-04 15:14:41 +10:00
Matthew Brecknell 0c3a12771d arch_split: merge master 2016-04-28 14:36:43 +10:00