4 research outputs found

    Verification of TLB Virtualization Implemented in C

    No full text
    Abstract. Efficient TLB virtualization is a core component of modern hypervisors. Verifying such code is challenging; the code races with TLB virtualization code in other processors, with other guest threads, and with the hardware TLBs, and implements an abstract TLB that races with other abstract TLBs and guest threads. We give a general methodology for verifying virtual device implementations, and demonstrate the verification of TLB virtualization code (using shadow page tables) in the concurrent C verifier VCC. To our knowledge, this is the first verification of any kind against a realistic model of a modern hardware MMU

    Towards the pervasive formal verification of multi-core operating systems and hypervisors implemented in C

    Get PDF
    This thesis deals with a semantic model stack for verification of functional correctness of multi-core hypervisors or operating systems. In contrast to implementations based on single-core architectures, there are additional features and resulting challenges for verifying correctness properties in the multi-core case, e.g. weak memory models (store buffers), or an inter processor interrupt mechanism. The Verisoft XT project had the goal of verifying correctness of the Microsoft Hyper-V hypervisor and achieved great code verification results using the concurrent C verification tool VCC developed by our project partners during the project. A sound mathematical theory to support code verification was not established. To remedy this shortcoming, we sketch a model stack for a simplified multi-core architecture based on a simplified MIPS model for system programmers and illustrate on a high level of abstraction how to obtain a simulation between neighboring models. A hardware model for this architecture is formalized at a detailed level of abstraction of the model stack. In addition, this thesis provides operational semantics for a quite simple intermediate language for C as well as an extension of this semantics with specification (ghost) state and code which can serve as a basis for arguing the soundness of VCC. Due to the powerful nature of specification code, a simulation between annotated and original program is not trivial. Thus, we give a pencil and paper proof.Die Arbeit befasst sich mit einem semantischen Modell-Stack fĂŒr die Verifikation der Korrektheit von Multi-Core Hypervisoren oder Betriebssystemen. Im Gegensatz zu auf Implementierungen auf Single-Core Architekturen stellen sich im Multi-Core Fall zusĂ€tzliche Herausforderungen fĂŒr die Verifikation von Korrektheitseigenschaften, z.B. durch schwache Speichermodelle, Speicherzugriffsmodi welche in begrenztem Rahmen kompatibel sind, Cache-Konsistenz-Protokolle welche (bei korrekter Benutzung der Speicherzugriffsmodi) ein einheitliches Bild des Speichers fĂŒr alle Maschinen garantieren, oder die Nutzung eines Inter-Prozessor-Interrupt Mechanismus (sowohl zum Starten der Maschine nach Reset als auch zum Zweck der Kommunikation zwischen Programmcode der auf verschiedenen Prozessoren ausgefĂŒhrt wird). Im Verisoft Projekt (gefördert durch bmbf, 2003-2007) wurde die Korrektheit eines Betriebssystemes welches auf einem sequentiellen VAMP Prozessor mit nebenlĂ€ufigen Devices ausgefĂŒhrt wird durchgĂ€ngig formal verifiziert -- von Gatterebene der Hardwarekonstruktion bis hin zur korrekten AusfĂŒhrung des Betriebssystemes auf eben dieser Hardware. Das Nachfolgerprojekt Verisoft XT (2007-2010), welches unter anderem zum Ziel hatte die Korrektheit des Microsoft Hyper-V Hypervisors zu verifizieren, erreichte unter Benutzung des Verifikationstools VCC (welches im VerisoftXT Projekt durch den Projektpartner Microsoft Research entwickelt wurde) hervorragende Resultate im Bereich der Codeverifikation. Die Erstellung einer durchgĂ€ngigen mathematischen Theorie um diese Resultate zu untermauern wurde jedoch vernachlĂ€ssigt. Um diesen Mangel zu beheben, skizzieren wir in der Dissertation einen Modell-Stack fĂŒr eine Multi-Core Architektur basierend auf einem vereinfachten MIPS-Modell fĂŒr Systemprogrammierer und illustrieren wie eine Simulation zwischen benachbarten Modellen erreicht wird. Teilweise ist die Erweiterung sequentieller Resultate auf die Multi-Core Architektur möglich indem man durch geeignete Software-Bedingungen (z.B. ZugriffsbeschrĂ€nkungen fĂŒr den gemeinsamen Speicher der Prozessoren gegeben durch ein Ownership-Modell) die AusfĂŒhrungsreihenfolgen der nebenlĂ€ufigen Maschine gerade soweit sequentialisiert dass eine Anwendung der alten Resultate möglich wird. In der Dissertation wird ein formales Hardwaremodell fĂŒr die Multi-Core-MIPS-Architektur auf einer detaillierten Abstraktionsebene prĂ€sentiert. ZusĂ€tzlich enthĂ€lt die Arbeit die operationale Semantik einer fĂŒr die Hypervisor- und Betriebssystemverifikation geeignete Zwischensprache fĂŒr C und deren Erweiterung um Spezifikationszustand und -code. Die um Spezifikationszustand und -code erweiterte Zwischensprache kann als Basis fĂŒr einen Korrektheitsbeweis des Tools VCC dienen. Da aufgrund der mĂ€chtigen Spezifikationssprache von VCC (welche es z.B. erlaubt Spezifikationscode zu schreiben der nicht terminiert) eine Simulation zwischen annotiertem und originalem Programm nicht trivial ist, fĂŒhren wir den Beweis auf Papier

    Advancing Deductive Program-Level Verification for Real-World Application: Lessons Learned from an Industrial Case Study

    Get PDF
    This thesis is concerned with practicability of deductive program verification on source code level. As part of a case study for the verification of real-world software, the specification and verification approach to show correctness of the virtualizing kernel PikeOS is presented. Issues within the verification process using current tools and methodologies are discussed and several aspects of these problems are then addressed in detail to improve the verification process and tool usability

    TLB virtualization in the context of hypervisor verification

    Get PDF
    In this thesis we address the challenges of hypervisor verification for multicore processors. As a first contribution we unite different pieces of hypervisor verification theory into a single theory comprising the stack of highly nontrivial computational models used. We consider multicore hypervisors for x8664 architecture written in C. To make code verification in a C verifier possible, we define a reduced hardware model and show that under certain safety conditions it simulates the full model. We introduce an extension of the C semantics, which takes into consideration possible MMU and guest interaction with the memory of a program. We argue that the extended C semantics simulates the hardware machine, which executes compiled hypervisor code, given that the compiler is correct. The second contribution of the thesis is the formal verification of a software TLB and memory virtualization approach, called SPT algorithm. Efficient TLB virtualization is one of the trickiest parts of building correct hypervisors. An SPT algorithm maintains dedicated sets of ‘‘shadow’’ page tables, ensuring memory separation and correct TLB abstraction for every guest. We use our extended C semantics to specify correctness criteria for TLB virtualization and to verify a simple SPT algorithm written in C. The code of the algorithm is formally verified in Microsoft’s VCC automatic verifier, which is ideally suited for proofs performed on top of our semantic stack.Die vorliegende Arbeit beschĂ€ftigt sich eingehend mit der Verifikation von Hypervisorn und den Herausforderungen, die dabei auftreten. Als ein Hauptergebnis werden erstmalig die verschiedenen Teile der HypervisorVerifikationstheorie zu einer einheitlichen Theorie zusammengefasst, in der mehrere komplexen Rechenmodelle auf einander aufbauen. Als Zielplattform fĂŒr die Virtualisierung wĂ€hlten wir eine x86-64 Architektur und betrachten Hypervisoren fĂŒr Multicore-Prozessoren, die in C implementiert sind. Um Code-Verifikation in einem C-Verifizierer zu ermöglichen, definieren wir ein reduziertes Hardware-Modell und zeigen, dass unter bestimmten Bedingungen das ursprĂŒngliche Modell davon simuliert wird. Die C-Semantik wird so erweitert, dass mögliche MMU- und Gast-Interaktionen mit dem Speicher eines Programms berĂŒcksichtigt werden. Unter der Annahme, dass der HyperviserCode mit einem korrekten Compiler kompiliert wird, argumentieren wir, dass die erweiterte C-Semantik die Hardware-Maschine, welche den kompilierten Code ausfĂŒhrt, simuliert. Ein weiterer Beitrag dieser Arbeit ist die formale Verifikation eines Algorithmus zur Speicher und TLB-Virtualisierung, der mit Shadow Page Tables (SPTs) arbeitet. Ein SPT-Algorithmus verwaltet Seitentabellen und garantiert Speicherseparierung sowie eine korrekte TLB-Abstraktion fĂŒr alle GĂ€ste. Wir benutzen unsere erweiterte C-Semantik, um die Korrektheitskriterien fĂŒr die TLB-Virtualisierung zu spezifizieren und um einen einfachen SPT-Algorithmus zu verifizieren. Die Korrektheit des in C implementierten Algorithmus wurde formal bewiesen mit Hilfe des automatischen Beweiser VCC, der von Microsoft entwickelt wurde
    corecore