Expand description
Deep embedding of the VmSpace and VmReader/VmWriter API.
VmStore is the abstract state of a caller of these APIs: it holds
the MetaRegionOwners plus a registry of every owner object the
caller currently has access to.
Op is an ADT enumerating the public exec API. lemma_step is the
single proof-mode dispatcher; it requires s.inv() and the
per-op precondition op_pre (which says the ids referenced in
op resolve to existing entries with the right cross-store
relationships). op_pre contains all preconditions necessary
to dispatch each operation, which makes it the cornerstone of soundness.
See its documentation for analysis.
§Module layout
vm_space: ops on thecrate::mm::vm_space::VmSpacetype (new, drop).cursor: ops onCursor/CursorMut(open, drop,query,find_next,jump,map,unmap,protect_next).io: ops onVmReader/VmWriter(creation, drop, the user-space and kernel-space IO methods).trace: explicit-induction theorems overSeq<Op>.
§Soundness boundary: _embedded axioms
Each axiom named <exec_function_path>_embedded mirrors the
ensures clause of one public exec function. Naming is the only
mechanism keeping the axiom in sync with its exec counterpart;
reviewers touching either side should grep for the partner.
Modules§
- cursor
- Embedding of
Cursor/CursorMutoperations: open, drop, navigation (query/find_next/jump), and mutation (map/unmap/protect_next). - frame
- Embedding of
Framelifecycle operations: allocate (from_unused), acquire-by-paddr (from_in_use), and drop. - io
- Embedding of
VmReader/VmWriteroperations. - kvirt_
store - Kernel-side one-step-soundness store for the kernel virtual area API
([
crate::mm::kspace::kvirt_area::KVirtArea]) — the kernel analog ofsuper::VmStore. - list_
store - Self-contained one-step-soundness harness for the frame
LinkedList(crate::mm::frame::LinkedList) — the embedding’s companion tosuper::VmStore, specialised to linked-list operations. - segment
- Embedding of
Segmentlifecycle operations: contiguous-range allocate (segment_from_unused_embedded) and drop (lemma_segment_drop_embedded). - trace
- Lazy trace generation:
rungenerates a trace on the fly by repeatedly stepping with arbitrary-but-valid Ops. - unique
- Embedding of
UniqueFramelifecycle operations: allocate (unique_from_unused_embedded) and drop (unique_drop_embedded). - vm_
space - Embedding of
VmSpace-level operations: creation and drop.
Structs§
- Cursor
Entry - Per-cursor entry in the store.
- Frame
Entry - Per-Frame entry in the store. Represents one outstanding handle to
the slot at
paddr— i.e., one unit of refcount inregions.slot_owner(paddr). - Segment
Entry - Per-Segment entry in the store. Represents one outstanding
Segment<M>covering the contiguous physical rangerange. - Unique
Entry - Per-
UniqueFrameentry in the store. - VmIo
Entry - Per-VmIo entry in the store.
- VmStore
- Resource store: the abstract state visible to a caller of the VmSpace + VmReader/VmWriter API.
Enums§
- Cursor
Kind - Whether a cursor is a read-only
Cursoror a mutableCursorMut. - Op
- Public exec API of
ostd::mm::vm_spaceandostd::mm::io, lifted to data. - VmIo
Kind - Whether a
VmIoOwnerbacks aVmReaderor aVmWriter.
Functions§
- fresh_
cursor_ id - fresh_
frame_ id - fresh_
segment_ id - fresh_
unique_ id - fresh_
vm_ io_ id - fresh_
vm_ space_ id - handle_
count - lemma_
frame_ drop_ pre_ derivable - lemma_
fresh_ cursor_ id_ not_ in_ dom - lemma_
fresh_ frame_ id_ not_ in_ dom - lemma_
fresh_ segment_ id_ not_ in_ dom - lemma_
fresh_ unique_ id_ not_ in_ dom - lemma_
fresh_ vm_ io_ id_ not_ in_ dom - lemma_
fresh_ vm_ space_ id_ not_ in_ dom - lemma_
handle_ count_ insert_ fresh - lemma_
handle_ count_ remove - lemma_
segment_ cover_ contains - lemma_
segment_ cover_ insert_ inside - lemma_
segment_ cover_ insert_ outside - lemma_
segment_ cover_ remove_ inside - lemma_
segment_ cover_ remove_ outside - lemma_
segment_ cover_ shrink_ front - lemma_
segment_ cover_ split - lemma_
segment_ cover_ witness - lemma_
step - op_pre
- segment_
cover_ count - tracked_
cursor_ entry_ new - tracked_
frame_ entry_ new - tracked_
segment_ entry_ new - tracked_
unique_ entry_ new - tracked_
vm_ io_ entry_ new
Type Aliases§
- Cursor
Id - Logical identifier for a
CursorOwnerin the store. - FrameId
- Logical identifier for a held
crate::mm::frame::Framehandle in the store. - Segment
Id - Logical identifier for a held
crate::mm::frame::Segmenthandle in the store. - Unique
Id - Logical identifier for a held
crate::mm::frame::UniqueFramehandle in the store. - VmIoId
- Logical identifier for a
VmIoOwnerin the store. - VmSpace
Id - Logical identifier for a
VmSpaceOwnerin the store.