The most widely deployed mobile virtualization solution
To our knowledge, seL4 is the first-ever general-purpose OS kernel that is fully formally verified for functional correctness. As such, it is a platform of unprecedented trustworthiness, which will allow the construction of highly secure and reliable systems on top.
The functional-correctness property we prove for seL4 is much stronger and more precise than what automated techniques like model checking, static analysis or kernel implementations in type-safe languages can achieve. We not only analyse specific aspects of the kernel, such as safe execution, but also provide a full specification and proof for the kernel’s precise behaviour.
We have created a methodology for rapid kernel design and implementation that is a fusion of traditional operating systems and formal methods techniques. We found that our verification focus improved the design and was surprisingly often not in conflict with achieving performance.
In this paper, we present the design of seL4, discuss the methodologies we used, and provide an overview of the approach used in the formal verification from high-level specification to the C implementation. We also discuss the lessons we have learnt from the project, and the implications for similar efforts.
The remainder of this paper is structured as follows. In Sect. 2, we give an overview of seL4, of the design approach, and of the verification approach. In Sect. 3, we describe how to design a kernel for formal verification. In Sect. 4, we describe precisely what we verified, and identify the assumptions we make. In Sect. 5, we describe important lessons we learnt in this project, and in Sect. 6, we contrast our effort with related work.
This paper is primarily about the formal verification of the seL4 kernel, not its API design. We therefore provide only a brief overview of its main characteristics.
seL4 [20], similarly to projects at Johns Hopkins (Coyotos) and Dresden (Nova), is a third-generation microkernel, and is broadly based on L4 [46] and influenced by EROS [58]. It features abstractions for virtual address spaces, threads, inter-process communication (IPC), and, unlike most L4 kernels, capabilities for authorisation. Virtual address spaces have no kernel-defined structure; page faults are propagated via IPC to pager threads, responsible for defining the address space by mapping frames into the virtual space. Exceptions and non-native system calls are also propagated via IPC to support virtualisation. IPC uses synchronous and asynchronous endpoints (port-like destinations without in-kernel buffering) for inter-thread communication, with RPC facilitated via reply capabilities. Capabilities are segregated and stored in capability address spaces composed of capability container objects called CNodes.
As in traditional L4 kernels, seL4 device drivers run as normal user-mode applications that have access to device registers and memory either by mapping the device into the virtual address space, or by controlled access to device ports on Intel x86 hardware. seL4 provides a mechanism to receive notification of interrupts (via IPC) and acknowledge their receipt.
Memory management in seL4 is explicit: both in-kernel objects and virtual address spaces are protected and managed via capabilities. Physical memory is initially represented by untyped capabilities, which can be subdivided or retyped into kernel objects such as page tables, thread control blocks, CNodes, endpoints, and frames (for mapping in virtual address spaces). The model guarantees all memory allocation in the kernel is explicit and authorised.
Initial development of seL4, and all verification work, was done for an ARMv6-based platform, with a subsequent port of the kernel (so far without proof) to x86.
Build Secure Smartphones for the Enterprise
Learn How to Build a More Secure Smartphone
Build Mass-Market Smartphones with Mobile Virtualization
SecureIT Mobile Government White Paper (Chinese Version)
SecureIT Mobile Enterprise (Chinese Version)
Energy Management
Build a Smartphone for the Mass-Market (Korean Version)
The NirvanaPhone Concept Specification and Reference Architeture
Motorola Evoke Teardown
seL4: Formal Verification of an OS Kernel
Automatic Device Driver Synthesis with Termite
The Motorola Evoke QA4 - A Case Study in Mobile Virtualization
Android Migration at the Speed of Light
Virtualization and Componentization in Embedded Systems
Virtualization for Embedded Systems
Role of Virtualization in Embedded Systems
Your System is Secure? Prove it!
Towards Trustworthy Computing Systems: Taking Microkernels to the Next Level
Secure Embedded Systems Need Microkernels