Commit Graph

344 Commits

Author SHA1 Message Date
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 53996e94d9 arm-hyp refine: proof update for user_context refactor 2018-03-08 18:41:28 +11:00
Gerwin Klein 2d9de5b9a6 ARM refine: proof update for user_context refactor 2018-03-08 18:41:28 +11:00
Gerwin Klein 72c4123d10 x64 refine: proof update for user_context refactor 2018-03-08 18:41:28 +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
Joel Beeren 3d225cde69 VER-910: add msgLabelBits to haskell
message_info structs have 20 bit labels. On 32-bit systems, the label
does not need to be masked as there are no extra padding bits in the
struct, but this is not true for 64-bit systems. As a result, the
haskell needs to mask msgLabelBits (=20) when extracting the label in
messageInfoFromWord.
2018-02-07 10:36:59 +11:00
Matthew Fernandez d675e253ba fix broken README links 2018-01-29 13:24:35 +11:00
Michael Sproul 995b88cefa SELFOUR-707: schedule highest priority thread on setPriority 2018-01-19 16:08:11 +11:00
Gerwin Klein 7c0e7970d6 x64 refine: proof update for ASIDMap removal 2018-01-11 18:48:37 +11:00
Matthew Brecknell 2f540e802c add constant definitions for bounds on untyped object sizes 2017-12-18 12:58:27 +11:00
Miki Tanaka dcca6d496f x64 ainvs/refine: simple_ko setter/getter 2017-12-14 18:03:41 +11:00
Miki Tanaka 6eb2cb74ad arm-hyp: simple_ko setter/getter 2017-12-14 18:03:31 +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
Joel Beeren ffc0640869 VER-853: put arch_check_irq into the Arch locale, and update x64 to match C 2017-12-13 12:13:36 +11:00
Joel Beeren 0c9d7269d4 x64: miscellaneous constant updates (VER-845, VER-852)
Updated syscallMessage register list, maxIRQ to match C code
2017-12-13 12:13:36 +11:00
Joel Beeren b01b341b3c x64: adjust definition of Arch.switchToIdleThread (VER-848) 2017-12-13 12:13:36 +11:00
Joel Beeren a5a5edc832 VER-849: abstractly declare a threads registers have changed
This removes an ifdef present in invokeTCB_(Copy|Write)Registers, and
adds the function Arch_postModifyRegisters which does nothing on any
arch except x86-64.
2017-12-13 12:13:36 +11:00
Rafal Kolanski 2f28bfeaec x64: revise scheduler / fastpath / scheduler bitmaps (SELFOUR-242)
Apply "invert-fastpath" changes to x64 (ainvs, refine, partial crefine).
See main commit for arm for more context.
2017-11-27 22:05:46 +11:00
Rafal Kolanski 7b36283c70 arm-hyp: revise scheduler / fastpath / scheduler bitmaps (SELFOUR-242)
Apply "invert-fastpath" changes to arm-hyp (ainvs, refine, crefine).
See main commit for arm for more context.
2017-11-27 22:05:46 +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
Gerwin Klein 68ae97454e lib: more modifiers for wpsimp (wp_del, simp_del) 2017-11-03 08:09:29 +11:00
Matthew Brecknell 3cb118fe02 Isabelle2017: update Refine for RC0 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
Miki Tanaka 9bdb47e114 reintroduce Orphanage test (for ARM only)
- Orphanage files in the ARM_HYP and X64 directories are not tested at the moment
- once we finish proving them, we will remove the restriction to ARM
2017-10-24 13:49:21 +11:00
Pang Luo 6b9912c47a manually adjust non-obvious cases of tab to space replacement 2017-10-20 14:22:36 +11:00
Matthew Brecknell 184d6b70b7 remove most tab characters 2017-10-20 14:22:36 +11:00
Joel Beeren 7e915e39bd x64: adjusted abbreviation in ArchAcc_AI to restore global name-clash counter to be consistent between architectures.
A private abbreviation in an anonymous context incidentally incremented
the global counter Variable.max_idxof which is used to avoid
name-collisions in lemmas.

For some reason (not obvious) the abbreviation in question was
incrementing the counter, and because it
was only in an X64 file, this resulted in X64 and the other
architectures getting out of sync. This was file previously, but became
a problem when processing the generic file lib/clib/Corres_C.

This commit adjusts the abbreviation to not increment the counter, and
fixes Refine and SR_lemmas_C to account for this change.
2017-09-19 12:07:02 +10:00
Miki Tanaka 07e9bfa417 remove_valid_arch_objs: updates for X64 2017-08-18 09:44:00 +10:00
Miki Tanaka 6d8e917087 Remove valid_arch_objs
now that we have valid_vspace_objs to express validiy of
vspace objects, we do not need valid_arch_objs: we have
valid_objs to state the validity of non-vspace arch objects.
2017-08-17 22:44:23 +10:00
Joel Beeren 42401684b0 refine: integrate all architectures 2017-08-09 17:02:49 +10:00
Matthew Brecknell 238e8b307e x64: merge master 2017-07-21 11:27:12 +10:00
Daniel Matichuk d38a19f1bb fix ARM_HYP Refine for newest corres method after ARM_HYP rebase
VER-737
2017-07-18 12:19:48 -06:00
Daniel Matichuk c72bece06f fix ARM Refine for newest corres method after ARM_HYP rebase
VER-737
2017-07-18 12:19:27 -06:00
Daniel Matichuk 2d2f2a1e1d fix refine proofs for improved corres_pre
minor fix - verification condition no longer
generated mid-proof

VER-737
2017-07-17 13:09:46 -06:00
Daniel Matichuk 8c7163457a remove explicit use of corres_rv rules
This is now handled by the corres method

VER-737
2017-07-17 13:09:46 -06:00
Daniel Matichuk 206be43920 use correswp and correct corres_rv rules 2017-07-17 13:09:46 -06:00
Daniel Matichuk fa6112378d cleanup refine for latest corres_method
Some fallout from protecting return-value relations

VER-737
2017-07-17 13:09:08 -06:00
Daniel Matichuk 8d454f1deb use new lift_corres_args attribute to abstract function args
This avoids manually rewriting the lemma statements, but puts
the rules in the more general form
2017-07-17 13:08:19 -06:00
Daniel Matichuk 2bc620c670 addressing protect_r -> corres_protect rename 2017-07-17 13:08:19 -06:00
Daniel Matichuk 196e2e2e0a fix corres proofs for corres method
Fixing the fact that ex_abs is slightly rephrased

VER-737
2017-07-17 13:06:55 -06:00
Daniel Matichuk 9ab936e815 fix refine after changes to corres_method 2017-07-17 12:54:08 -06:00
Alejandro Gomez-Londono 796887d9b1 Removes all trailing whitespaces 2017-07-12 15:13:51 +10:00
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 2d20221396 arm refine: updates for the backport from arm-hyp completed 2017-06-19 14:32:44 +10:00
Alejandro Gomez-Londono b76709967b arm refine: Updating theories for ainvs changes 2017-06-19 14:32:44 +10:00