Commit Graph

47 Commits

Author SHA1 Message Date
Gerwin Klein 0d984f3fa3
camkes: update to Isabelle2023 mapsto syntax
Signed-off-by: Gerwin Klein <gerwin.klein@proofcraft.systems>
2023-10-06 14:41:53 +11:00
Gerwin Klein 68bb97ef66 isabelle2021-1: CamkesCdlRefine
Signed-off-by: Gerwin Klein <gerwin.klein@proofcraft.systems>
2022-03-29 08:38:25 +11:00
Gerwin Klein d92b4dcadb isabelle-2021: update CamkesCdlRefine
Signed-off-by: Gerwin Klein <gerwin.klein@proofcraft.systems>
2021-09-30 16:53:17 +10:00
Ryan Barry 8dd93a52a0 infoflow+dpolicy+cdl-refine: misc fixes
Signed-off-by: Ryan Barry <ryan.barry@unsw.edu.au>
2021-06-21 20:10:32 +10:00
Gerwin Klein a424d55e3e licenses: convert license tags to SPDX 2020-03-13 14:38:24 +08:00
Japheth Lim f053fb0181 CamkesAdlSpec: allow ad-hoc additions to integrity policy
Each CAmkES assembly gets an extra field `policy_extra` to specify
extra policy edges. These are added to the default policy graph from
`policy_of`.

This feature is intended to support endpoint merging in the
`global-endpoint` CAmkES template, which could add communication
edges that were not present in the ADL.
2019-09-05 17:03:41 +10:00
Japheth Lim a4019be323 camkes: allow specifying integrity groups
The new field `group_labels` specifies a mapping from ADL component
names to integrity policy labels. This will be used to support the
`group` keyword in CAmkES that allows components to share an address
space. See Jira VER-1109.
2019-09-05 17:03:41 +10:00
Japheth Lim d00426a669 CamkesCdlRefine: helper lemmas for faster `policy_wellformed` proof 2019-08-27 17:08:35 +10:00
Japheth Lim 6b54ecea33 camkes: further generalised connector semantics
This allows connectors to also grant access rights between the
from-ends themselves (and similarly the to-ends).

It was previously thought that production CAmkES systems would not
need these rights. However, some connectors (e.g. VirtQueue) don't
follow the standard ADL semantics and we need these rights to
express their behaviour. Limitations of the Access model also cause
`policy_wellformed` systems to have more rights than necessary; see
Jira VER-1108.
2019-08-27 17:08:35 +10:00
Japheth Lim 2c3b4c24fc CamkesCdlRefine, Lib: add debug tag for integrity policy
This tags each generated policy goal with the object and cap that
led to that goal.

We create a new constant `generic_tag` in Lib for this purpose.
2019-08-21 14:23:22 +10:00
Japheth Lim 61e184a0ab CamkesCdlRefine: delete Generator theory
This theory was a project to specify the behaviour of the CAmkES
toolchain as an Isabelle function. However, this copy of the theory
is incomplete, the toolchain has moved on, and the ADL model is also
undergoing changes, so there is no longer much value in maintaining
this file.
2019-07-24 16:08:14 +10:00
Japheth Lim 6c599a8dee camkes: support generalised connector semantics
The classic ADL formal model has a fixed palette of connectors, with
the interface type and seL4 integrity model also being fixed for each
connector type. This is unable to model new CAmkES connectors.

We change the ADL model to allow more combinations of connector
semantics, including arbitrary sets of Access rights between the
policy labels that a connector touches.

See Jira VER-1110 for more context.
2019-07-24 16:08:14 +10:00
Japheth Lim f785e6fcf5 trivial: CamkesCdlRefine: add license header 2019-07-16 17:58:40 +10:00
Japheth Lim fe3a0449eb CamkesCdlRefine: better base cases for `assign_schematic` methods 2019-07-15 17:21:37 +10:00
Japheth Lim 261c7a308f CamkesCdlRefine: detect ARM sections in mapped_pts_of 2019-07-15 17:21:37 +10:00
Japheth Lim c79fb455cb trivial: CamkesCdlRefine: drop unused lemma 2019-07-15 17:21:14 +10:00
Japheth Lim e1ca4baab7 CamkesCdlRefine: add support library for capDL refinement toolchain
This adds a library theory of useful lemmas, simpsets and methods,
to be used in the camkes-tool's capDL refinement templates.
2019-07-15 17:20:55 +10:00
Gerwin Klein c34840d09b global: isabelle update_cartouches 2019-06-14 11:41:21 +10:00
Michael McInerney c13432b0c4 misc updates for Isabelle2019 2019-06-14 11:41:20 +10:00
Japheth Lim 252991e9a7 CamkesCdlRefine: update policy_of to work with GrantReply 2019-01-11 14:39:11 +11:00
Japheth Lim 95cae4756c camkes: initial updates for new CDL refinement framework
Summary of changes:
- change ADL spec to support connectors with many endpoints [VER-992]
- more connector synonyms
- refactor integrity policy spec
2018-09-06 20:45:58 +10:00
Gerwin Klein e2f8ec0bab Isabelle2018: CamkesCdlRefine 2018-08-20 09:06:37 +10:00
Gerwin Klein 6b9d9d24dd Isabelle2018: new "op x" syntax; now is "(x)"
(result of "isabelle update_op -m <dir>")
2018-08-20 09:06:35 +10:00
Gerwin Klein b5cdf4703f globally use session-qualified imports; add Lib session
Session-qualified imports will be required for Isabelle2018 and help clarify
the structure of sessions in the build tree.

This commit mainly adds a new set of sessions for lib/, including a Lib
session that includes most theories in lib/ and a few separate sessions for
parts that have dependencies beyond CParser or are separate AFP sessions.
The group "lib" collects all lib/ sessions.

As a consequence, other theories should use lib/ theories by session name,
not by path, which in turns means spec and proof sessions should also refer
to each other by session name, not path, to avoid duplicate theory errors in
theory merges later.
2018-08-20 09:06:34 +10:00
Japheth Lim a6c11a2b28 access-control, infoflow: use generic relation for pasDomainAbs
This patch generalises the mapping between authority labels and
scheduler domains, so that the access-control integrity property still
holds when labels are not partitioned into domains. This lets us use
the integrity result on systems that don't use the domain scheduler.

The information flow proofs still rely on the domain partitioning,
hence we add constraints on the label-domain mapping for the info-flow
results to hold.

Jira VER-945
2018-08-02 15:01:42 +10:00
Matthew Brecknell 41d4aa4f1d Isabelle2016-1: update references to renamed constants and facts 2017-01-05 14:23:05 +11:00
Xin,Gao 8f3a4dee31 SELFOUR-421: merge with master, fix wholesystem proofs 2016-09-22 19:23:19 +10:00
Alejandro Gomez-Londono 93adccc141 license-tool: missing license headers + .licenseignore [VER-551] 2016-07-14 16:34:31 +10:00
Gerwin Klein 322f1023f5 word_lib: adjust theory dependencies 2016-05-16 21:11:40 +10:00
Miki Tanaka 386e33bbbd CamkesCdlRefine finished ... 2016-02-11 11:15:59 +11:00
Joel Beeren 457a55a831 add arch_tcb object to C, rename aep -> ntfn 2015-11-20 16:02:13 +11:00
Matthew Fernandez b780e57759 camkes: Shuffle some helper lemmas around; labels as strings.
Moves some unnecessary stuff out of the locale and now specifies the label type
as `string` rather than a locale parameter. The purpose of the latter is to
allow us to talk about concrete labels rather than continually falling back on
the user's projection, but it's not clear yet whether this is a big win.
2015-07-27 16:09:59 +10:00
Matthew Fernandez 232ecb183f camkes: Rename `generate` to `state_of`.
This makes more sense for upcoming changes where we generate a policy as well.
2015-07-27 16:09:06 +10:00
Matthew Fernandez 9b13489a1f camkes: Update control TCB naming scheme.
This commit corresponds to CAmkES changes to disambiguate the name of a TCB for
a control thread.

See also camkes-tool/master@PR#113 on GINCA
2015-07-27 16:04:15 +10:00
Matthew Fernandez 0e19da32f4 camkes: Remove Grant from IPC buffer caps.
This makes no difference in the implementation, but is conceptually cleaner.

See also camkes-tool/master@c4e81e6116
2015-07-27 16:01:44 +10:00
Matthew Fernandez 422b1ee5ec camkes: Also depend on DPolicy in CamkesCdlBase. 2015-07-27 15:59:42 +10:00
Matthew Fernandez f84a427591 camkes: Remove empty TCB cap slots.
These were phrased as slots containing NULL caps, but the translation of CapDL
specifications into Isabelle actually just restricts the domain of the
underlying capability map. This is much cleaner and we now have exact
equivalence.
2015-06-11 15:01:45 +10:00
Matthew Fernandez b49a072fea camkes: Fix cap rights on endpoints of the seL4RPC connector.
This connection actually uses read/write caps on both sides because it is
implemented using Send and Wait. It may be worthwhile modelling seL4RPCCall
(which is implemented using Call and ReplyWait) as well. This would be a
trivial extension.
2015-06-11 15:00:19 +10:00
Matthew Fernandez b91d873d7d camkes: Skip the NULL slot when calculating CSlot offsets.
CAmkES deliberately skips over CSlot 0 when allocating caps to allow typos and
misallocations to be more easily detected. This commit captures this logic in
the generator function.
2015-06-11 14:59:04 +10:00
Matthew Fernandez a55d61cb42 camkes: Implement the actual CNode size calculation of the implementation.
Previously, the CapDL-generating function assumed a CNode size of 12 bits for
each component instance, though this was known to be inaccurate. In the
implementation of CAmkES, the code generator calculates the minimum required
size of each CNode on the fly. This commit updates the formalised generator to
perform the same calculation. The calculation is currently written in terms of
the `LEAST` binder, which as it turns out is sometimes awkward to reason about.
It may be worthwhile rephrasing this in future.
2015-06-11 14:55:50 +10:00
Matthew Fernandez cabb3e8124 camkes: Remove `no_intent` for generated TCBs.
The CapDL translation tools produce threads with an undefined intent, rather
than no intent. This commit modifies the CAmkES generation to do the same to
ease the correspondence proof.
2015-06-05 14:50:24 +10:00
Matthew Fernandez fc9048afee camkes: Fix: IRQ CNodes appear as 0 bits, not 1 bit.
Presumably this is only the case for when there are no assigned interrupts in
the system. These theories will need some tweaking to support systems with
interrupts.
2015-06-04 15:57:22 +10:00
Matthew Fernandez 2a9c060daf camkes: Introduce IRQs as a second addendum to the base generated spec.
Current example systems do not involve hardware interrupts, but each interrupt
in such a system is represented in CapDL as an empty single-slot CNode. We need
to note their existence or the final correspondence proof becomes tricky. This
commit adds support for (assumed empty) IRQ CNodes and pushes this through the
existing proofs. The generated label mapping will need some associated updates
following this.
2015-06-02 18:22:12 +10:00
Matthew Fernandez 32163d73c3 camkes: Prove the only caps in a CAmkES system are to endpoints.
This is a relatively straightforward property, but shows that CAmkES systems
fall into a constrained class of seL4 systems that it is easier to reason
about. In particular a lack of caps to more dynamic objects like untypeds
guarantees a tighter seL4 worst case execution time and an absence of many
possible dynamic behaviours.

We prove this property across all CapDL specifications produced by the high-
level generator, rather than on a concrete specification. In this way, we can
do the proof manually once and for all.
2015-05-30 15:14:08 +10:00
Gerwin Klein baa5a9c7e9 camkes: 2015 port of CamkesCdlRefine 2015-05-28 14:19:31 +10:00
Matthew Fernandez 075349ec40 camkes: Prove there are no address space objects in a low-level generated spec.
The low-level specification roughly maps to the code generator and template
instantiation phases of CAmkES. At this point no address space objects exist
(excepting slight infidelity with respect to page directories). The address
space objects are introduced in the "extra" objects that we append, which map
roughly to the ELF derivation and CapDL filters.

Separating the two collections of objects gives us some nice preserved
properties that can be shown over generation from an abstract input. In
particular, we can phrase some provable properties that are resilient against
things like changes in compiler optimisation levels and allocation strategies.
2015-05-27 17:13:07 +10:00
Matthew Fernandez abb783acbd camkes: Add CAmkES↔CapDL beginnings.
These theories construct a locale with holes that are filled in by generated
code. Interpreting the locale manually is quite tedious and error prone, but we
entirely automate this process during code generation. For the details of this,
see the CAmkES 'architecture-semantics' and 'label-mapping' back ends.
2015-05-27 16:06:14 +10:00