1 / 11

Formally Certified Virtual Memory Manager

Formally Certified Virtual Memory Manager. Quick Refresher. Verifying VMM using multi-machine v erification Verify each module at natural level of abstraction Use refinement to connect modules Framework makes the process easier Benefits: Easier verification Enforces hard modularity

elijah
Download Presentation

Formally Certified Virtual Memory Manager

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Formally Certified Virtual Memory Manager

  2. Quick Refresher • Verifying VMM using multi-machine verification • Verify each module at natural level of abstraction • Use refinement to connect modules • Framework makes the process easier • Benefits: • Easier verification • Enforces hard modularity • Reuse of certified code

  3. Our First Certified VMM • Green bars – machine models • 50-200 lines of Coq • Yellow bars – code • Mostly boilerplate definitions • Orange proof circles: • actual code verification • 100-400 lines of Coq • Arrows: • code depends on primitive • Lines with circles: • refine and show compatibility • Circle side is weaker • 100-300 lines of Coq each • Not shown: • Machine relations (200-400) • Framework (3000+)

  4. Recent Accomplishments • Cleaner refinements • Less messy definitions • Should be easier to mix and match refinements • Publications • CPP12 • Dissertation • Enhancements to the VMM • Handling of Translation Look-aside Buffer (Nearly Complete) • Dynamic location of page tables (Fully verified) • Multiple address spaces and multiple page tables (Full Design) • Support for multi-level page tables (Initial Planning)

  5. Translation Look-Aside Buffer • Simulate it as a bit indicating whether TLB is consistent • TLB becomes inconsistent when current page table is updated • Semantics of hardware change • TLB is made consistent when paging is reenabled

  6. TLB’s Effect • 3 memory models altered • Gain the TLB bit • Update store semantics (to desync TLB) • Gain resetTLB primitive • Redo cert. and compatibility proofs: • Page table driver • Memory allocator • All other proofs unchanged

  7. Dynamic Location of Page Tables • PE and ALE models have PTROOT register instead of PT constant • pt_set() and pt_lookup() updated to use dynamic location • pt_init() must now allocate space for page table • Requires a special allocator for contiguous pages • init() must now set PTROOT to the dynamic location • Direct-mapped property is now based on dynamic location

  8. Dynamic PT – Changes Summary • PMAP and AS machines and verification unchanged • ALD-PD refinement and mem_init() cert. unchanged • Completely verified in Coq

  9. Multiple Address Spaces • A new API for the kernel – ability to have multiple spaces • Requires an ability to support multiple page tables • Address Space and Pagemap memory models more powerful

  10. Multiple AS - Changes AS PMAP ALE • Huge changes to most parts of the VMM • New memory models / relations • Verification of memory allocator reused • Semantics did not change • Initialization should be unaffected • Upcall to the kernel will be though • However, must propagate ability to select page tables to AS

  11. Multi-Level Page Tables • Page tables that are defined as a tree structure • Require handling complex data invariants • We have planned a set of predicates to work with data structure • We may have other priorities • Code and design should go through a code review • Should consider other components: • Interrupts • Contexts / context switching • Formal specification may take as much as 1 person-year! • Silver lining: changes are limited to page table drivers • We can verify this later, and it should fit right in.

More Related