Commit Graph

158 Commits

Author SHA1 Message Date
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
Matthew Brecknell 0e5ffd1ea0 arch_split: requalify abstract theories 2016-04-27 18:46:16 +10:00
Matthew Brecknell 67ba864d2f arch_split: InfoFlow checking 2016-04-24 15:44:40 +10:00
Sophie Taylor d7fd88727a SELFOUR-420: Verification of maxIRQ check in handle_interrupt. 2016-03-17 11:20:52 +11:00
Miki Tanaka 6f6c58168c SELFOUR-56: Remove diminish rights from IPC 2016-02-24 13:24:10 +11:00
Matthew Brecknell 84d2889d45 Isabelle2016: merge master into 2016 2016-02-19 16:17:26 +11:00
Xin,Gao 1aed16085f l4v-sabre: move a few word lemmas to WordLemmaBucket and fix styles of some proofs 2016-02-17 11:18:03 +11:00
Gao Xin 33b5dab6a1 l4v-sabre: proof fix upto InfoFlowC 2016-02-17 11:18:03 +11:00
Gao Xin 0d260252ff l4v-sabre: rebase and fix proofs to infoflow 2016-02-17 11:18:02 +11:00
Gao Xin bc73b112bd l4v-sabre: change type of irq to be 10 word 2016-02-17 11:18:02 +11:00
Matthew Brecknell c65e290a8b Isabelle2016: merge master into 2016 2016-02-16 12:52:24 +11:00
Ramana Kumar a99a4b2bbc 2016: InfoFlowC
forgot Noninterference_Refinement in last commit
2016-02-11 11:16:00 +11:00
Ramana Kumar 87931790ff 2016: InfoFlowC 2016-02-11 11:16:00 +11:00
Matthew Brecknell d93ab3cf20 Isabelle2016: InfoFlow updated 2016-02-11 11:15:59 +11:00
Matthew Brecknell 5228a0ec78 Isabelle2016: infoflow update (partial) 2016-02-11 11:15:59 +11:00
Joel Beeren 1d0366ac5e msi: Restructure IOAPIC, MSI interrupts for x86, fix up ARM proofs for new API 2016-02-02 15:57:28 +11:00
Daniel Matichuk ac03bb3dd9 arch_split: everything but WholeSysExamplesC? 2016-01-28 18:26:27 +11:00
Daniel Matichuk 7aaa8ed774 arch_split: Access and InfoFlow now build 2016-01-25 18:42:06 +11:00
Joel Beeren efb4c61816 archirq: Remove redundant invocation, renamed
arch_decode_interrupt_control.
2016-01-14 17:50:33 +11:00
Matthew Fernandez 24aaad4f8b infoflow: Remove a find_theorems invocation. 2015-11-25 10:30:29 +11:00
Gerwin Klein 0f2d557679 terminology in comments: async ep -> notifications 2015-11-24 16:58:22 +13:00
Gerwin Klein ac632c5aaa Wait -> Recv: update proofs 2015-11-20 16:02:14 +11:00
Joel Beeren 457a55a831 add arch_tcb object to C, rename aep -> ntfn 2015-11-20 16:02:13 +11:00
Thomas Sewell 7c3a06a8d7 Minor adjustments caused by Strengthen changes. 2015-10-29 11:27:54 +11:00
Rafal Kolanski d51402a5a2 Merge remote-tracking branch 'verification/master' into priority-bitmap
(seL4_NBWait)
2015-10-21 16:23:01 +11:00
Joel Beeren e403eb8f0a poll: added non blocking sync wait 2015-10-21 14:24:49 +11:00
Joel Beeren d6f7579be7 poll: Added new syscall for polling async endpoints (non-blocking wait) 2015-10-21 14:24:49 +11:00
Rafal Kolanski c1eb235105 Merge 'verification/master' into priority-bitmap
Green build except for:
CParserTest (WTF Duplicate fact declaration "dc_20081211.dc_20081211.test_modifies")
AutoCorresSEL4 (waiting on result)

There is still a carefully managed sorry in Schedule_R, waiting on the C
parser FNSPEC+DONT_TRANSLATE fix.
2015-10-21 06:19:20 +11:00
Rafal Kolanski 3230d601ae priority-bitmap: Update InfoflowC 2015-10-20 23:52:14 +11:00
Joel Beeren e3704742f0 aep-binding: cleanup 2015-10-07 14:18:09 +11:00
Joel Beeren 21f429fe60 aep-binding: finished InfoFlowC 2015-09-18 13:54:01 +10:00
Joel Beeren 8fa63f07ba aep-binding: finished infoflow 2015-09-16 11:41:01 +10:00
Daniel Matichuk 478ce437fe removed sorry 2015-09-16 11:19:49 +10:00
Daniel Matichuk 90a719dcf4 Merge branch 'aep-merge' of github.inside.nicta.com.au:seL4/l4v into aep-merge
Conflicts:
	proof/infoflow/PolicySystemSAC.thy
2015-09-16 11:10:08 +10:00
Daniel Matichuk aa1014d0d0 update SAC for coarser subjectAffects policy 2015-09-16 11:04:29 +10:00
Ramana Kumar ef5f419885 update rm_affects (also now affects more) 2015-09-16 10:43:03 +10:00
Ramana Kumar 1812925265 update r_affects (in SAC example) for aep binding
r now affects more
2015-09-16 10:24:29 +10:00
Daniel Matichuk 8109a05468 fixed Example_Valid_State.thy 2015-09-15 18:10:26 +10:00
Ramana Kumar 45629a38cc some progress fixing PolicySystemSAC
had to change definition of abd_affects_set

work done with Dan
2015-09-15 18:07:36 +10:00
Daniel Matichuk 8dfb775f34 finished Noninterference.thy 2015-09-15 16:31:40 +10:00
Daniel Matichuk 50adc350d9 Syscall_IF building (1 sorry in decode) 2015-09-15 12:04:46 +10:00
Daniel Matichuk 8451c17837 fixed decode with sorry 2015-09-15 12:02:26 +10:00
Ramana Kumar 53919eda6e handle_wait_globals_equiv 2015-09-15 11:53:40 +10:00
Ramana Kumar 2de96bb5bf handle_wait_reads_respects_f
most of the hard work done by Dan
2015-09-14 18:38:49 +10:00
Daniel Matichuk 229f521d3b finished Ipc_IF 2015-09-14 15:54:17 +10:00
Ramana Kumar 1bde303763 receive_ipc_reads_respects 2015-09-14 11:58:09 +10:00
Ramana Kumar cfc5841b38 complete_async_ipc_reads_respects 2015-09-14 09:47:46 +10:00
Daniel Matichuk f956842e93 finished send_async_ipc_reads_respects 2015-09-11 15:54:53 +10:00
Ramana Kumar 0fb88ea01c Merge branch 'master' into aep-merge
This commit should at least remove merge conflict markers, and the idea
is that at least refine, crefine, drefine, and infoflow (with sorrys)
build. Subsequent commits may be required to fix build issues that I
have not picked up.
2015-09-10 17:06:45 +10:00
Ramana Kumar d88a931ec7 history squashed patch for aep-binding 2015-09-02 15:43:39 +10:00
Joel Beeren 3372cd32a8 SELFOUR-220: When calling handleWait, only delete the
TCB's ReplyCap when actually waiting on a synchronous
endpoint.
2015-07-23 14:45:17 +10:00
Thomas Sewell 440081c0f4 Add a gsMaxObjectSize as needed. 2015-07-17 14:30:08 +10:00
Gerwin Klein f95b9dad9b infoflow: remove unused theory 2015-05-28 14:21:54 +10:00
Gerwin Klein cfec9ea0db Merge branch 'master' into 2015 2015-05-28 11:45:13 +10:00
Joel Beeren 002cf370bb Updated proof with new fastpath changes removing setCurrentASID and armv_contextSwitch_fp 2015-05-28 11:30:22 +10:00
Gerwin Klein c6564cb4cb infoflow: 2015 update for infoflow C refinement 2015-05-20 21:10:59 +10:00
Gerwin Klein cba6a4f59e infoflow: minor cleanup 2015-05-16 21:49:01 +10:00
Gerwin Klein 12fa86863a fewer warnings 2015-05-16 19:52:49 +10:00
Gerwin Klein b46bc4e78d infoflow: 2015 update (apart from C refinement) 2015-05-16 18:14:59 +10:00
Gerwin Klein 29eb636d31 re-establish InfoFlow; generalising ptable_xn
UserOp_IF had its own way of extracting the XN bit from page tables.
This is now unified with the existing functions in ADT_AI, which also
means that the proof for XN bit equality is basically the same as for
pt_rights and pt_lift.
2014-11-28 08:58:57 +11:00
deang f9b9f9ba53 infoflow: remove s0_ptrs_distinct from Example_Valid_StateH
subsumed by distinct command in Example_Valid_State
2014-11-19 16:01:49 +11:00
deang 77c600038f infoflow: fixed and added Example_Valid_StateH to testing
Some of the noninterference results depend on executions at the haskell level starting at a valid initial state. This file demonstrates this condition being realised.
2014-11-18 17:39:17 +11:00
deang f9ea932cfb noninterference: remove duplicate lemmas
Some redundant duplicate lemmas with duplicate names were proven under locale contexts 'unwinding_system' and 'complete_unwinding_system'.
2014-11-03 13:14:18 +11:00
David Greenaway 127c7cd63e infoflow: trivial: Add some comments to "do_user_op_if" definition. 2014-10-27 09:31:31 +11:00
David Greenaway 759a7fa8cb infoflow: trivial: Add some minor comments to "Noninterference_Base.thy".
Added while trying to work out some details. Perhaps more useful than
not?
2014-10-16 17:09:11 +11:00
deang 77f85b334d trivial: typo in comment 2014-10-14 17:29:47 +11:00
deang 6df2eb6cf9 infoflow: weakened assumptions for c refinement of infoflow adts
The fact that the C infoflow adt refines the abstract infoflow adt now only requires that given user operation is nonempty and not sane (nonempty and doesn't return an interrupt).
Also added some more general lemmas about fw_sim and refinement to lib/Simulation.thy.
2014-10-14 17:01:11 +11:00
David Greenaway 6c915fa629 infoflow: Move "EquivValid" out of "infoflow/", into "lib/".
More importantly, remove seL4 from the dependencies of "EquivValid", so
others can use it.

Also, we fixup the fallout.
2014-10-13 11:05:31 +11:00
David Greenaway b0832637e6 infoflow: Change definition of "the_nat_to_bl" to avoid undefined outputs.
...and clean up some fallout.

In particular, we now say that the output of "nat_to_bl sz n" is taken
to be the bitlist of "n mod 2^sz", so the output is always defined.

The idea is to remove the undefinedness of "the_nat_to_bl" so that it is
easier to generate simp rules for it; some of these are developed in the
theory below, and simplify some of the more concrete infoflow proofs.
2014-10-07 08:59:17 +11:00
David Greenaway bf2d517009 infoflow: Use the "distinct" command in "Example_Valid_State".
Use the previously-added "distinct" command to simplify the
"Example_Valid_State" proof. This brings quite significant speedups as
it means that raw definitions need not be unfolded, and hence automated
tactics don't get side-tracked with their numerical definitions.
2014-10-07 08:59:17 +11:00
David Greenaway 22b9118432 infoflow: Fix non-terminating proof for Isabelle 2014.
Remove useless ROOT.ML file, while I am here.
2014-09-19 14:33:54 +10:00
David Greenaway cf0d1abce6 Merge 'master' into 'isabelle-2014'.
Conflicts:
	proof/crefine/Fastpath_C.thy
	proof/drefine/KHeap_DR.thy
	proof/infoflow/Noninterference.thy
	spec/design/version
	sys-init/DuplicateCaps_SI.thy
	sys-init/InitTCB_SI.thy
	sys-init/Proof_SI.thy
	tools/asmrefine/SimplExport.thy
	tools/autocorres/tests/examples/SchorrWaite.thy
2014-09-17 14:21:13 +10:00
David Greenaway e141eecca8 infoflow: Port to Isabelle 2014. 2014-09-16 10:39:22 +10:00
Joel Beeren 463df8e083 Merge branch 'master' into ioapic 2014-08-29 13:14:53 +10:00
Joel Beeren b3e2eb1f9d ioapic: finished up to InfoFlowC 2014-08-28 15:56:26 +10:00
Thomas Sewell 0346fb20b6 SIMPL->Graph proofs largely working. 2014-08-27 15:30:34 +10:00
Thomas Sewell 71e7dcc319 Fix Access, InfoFlow and DRefine. 2014-08-13 16:45:40 +10:00
Thomas Sewell 9b01fada15 Refine working. 2014-08-11 18:51:04 +10:00
Thomas Sewell fc6e57716a Proof updates, working as far as AInvs. 2014-08-11 14:50:56 +10:00