UNICORE: a Toolkit to Automatically Build Unikernels

UNICORE: a Toolkit to Automatically Build Unikernels

UNICORE: A toolkit to automatically build unikernels Gain Gaulthier Soldani Cyril Mathy Laurent University of Liege University of Liege University of Liege Belgium Belgium Belgium [email protected] [email protected] [email protected] ABSTRACT Furthermore, due to their large size, they waste disk space and limit Recent years have seen the IT industry move massively towards the boot and shut down time. use of virtualization for the deployment of applications. However, These drawbacks lead the IT industry to embrace containers to the two most prominent virtualization technologies, i.e. virtual replace virtual machines. This transition is intended to improve per- machines (VMs) and containers, both present serious drawbacks. formance, speed-up software deployment and reduce costs. Rather Full-blown VMs provide a good level of isolation, but are generally than virtualizing the underlying hardware like VMs do, containers heavyweight. On the other hand, containers are generally more virtualize the OS itself, sharing the host OS kernel and its resources lightweight, but offer less isolation and thus a much greater attack with both the host and other containers. This model considerably surface. reduces the memory wasted by duplicating OS functionality across Unikernels have been proposed to virtualize applications in a VMs and improves the overall performance. way that is both safe, and efficient. They are specialized operating In recent times, container-based technologies such as Docker [3] systems, tailored for a specific application, which allows to build and LXC [8] have gained enormous traction. Large internet com- minimalist VMs with tiny memory footprints. They keep the in- panies such as Google and Amazon decided to set aside virtual creased security of VMs, but with performance equivalent to or machines by running all of their services in containers [20]. The even better than equivalent containers. Unfortunately, porting an reasons of this major change are quite clear. In contrast to heavy- application to the unikernel paradigm currently requires expert weight VMs, containers provide fast instantiation times, small mem- knowledge, and can be very time-consuming. ory footprint and reduce size on disk. In this paper, we introduce UNICORE, a common code base and Nevertheless, no technology is perfect, and containers are no toolkit to automate the building of efficient unikernels from existing exception. Indeed, as they share the host OS kernel and contains off-the-shelf applications. Although UNICORE is still in the early numerous binaries and libraries, the attack surface is large. They stages, we present early results showing that UNICORE images are thus subject to a lot of vulnerabilities [2]. In addition, the kernel are able to yield performance similar or better than lightweight system call API that containers use to interact with the host OS virtualization technologies such as containers. represents also a serious flaw and is the target of an increasing number of exploits [9]. CCS CONCEPTS At this point, software corporations face a dilemma between inherently insecure containers and heavyweight but isolated virtual • Software and its engineering → Virtual machines. machines. Could we do better by having a lightweight but isolated environment? Fortunately, it is possible and a new technique taking KEYWORDS the best of two worlds exists. Virtualization, unikernels, specialization, operating systems, Xen, Offering a great trade-off between performance and isolation, containers, hypervisor, virtual machine. a new model has been designed to replace virtual machines and containers: unikernels. Also known as lightweight VMs, they are specialized VMs that include only the minimum feature(s) to run 1 INTRODUCTION a specific application. Unikernels [23] are thus the smallest light- Cloud computing is becoming the core business of the IT industry. weight virtual machines that can be created. They can run directly This trend is justified by the fact that network operators and ser- on top on a hypervisor or bare metal, eliminating the need for a vice providers need high-performance services to deploy their net- host operating system. In a unikernel, the application is compiled worked applications to the market. When public clouds appeared, only with the necessary components of the operating system (e.g., the basic technology used was hardware virtualization. In this par- memory allocators, schedulers, device buses, ...). Their size are thus adigm, the virtual machine (VM) is defined as the standard unit considerably reduced, resulting in better performance and attack of deployment. Each VM is represented as a self-contained com- surface. Finally, because unikernels are minimalist, they are also puter, booting a standard OS kernel and then running a specific easier to verify, not only for quality but also for safety and security. application (e.g., a database, a web server, ...). Running multiple Many unikernels have been developed already such as ClickOS [13], VMs on the same machine significantly reduces costs. Although LightVM [12], IncludeOS [1]... They all offer great performance and VMs strongly reduce the required number of physical machines, low memory footprint for their chosen task. Figure 1 illustrates the they introduce considerable drawbacks. Indeed, since they require major differences between VMs, containers and unikernels. a full operating system image to run (kernel and applications), they The fundamental drawback of this paradigm is that it is nec- are heavyweight. Running many of them on the same hardware re- essary to manually port existing application(s) to the underlying quires thus a lot of RAM and CPU cycles and impacts performance. unikernel. For example, a web server can be ported as a unikernel GDD’19, November 22, 2019, Namur, BE Gain Gaulthier, Soldani Cyril, and Mathy Laurent App App App fully support multi-threaded applications and multi-core VMs [5]. Libs Libs Libs The first advantage of this approach concerns the reduced attack App App App surface and exploitable operating system code. In contrast to virtual Libs Libs Libs App App App machines and containers which offer solutions that are packed with Kernel Kernel Kernel Libs Libs Libs more tools and libraries than required by the running application, Kernel Kernel Kernel Kernel unikernels only contain the necessary operating system functions. Hypervisor Hypervisor Furthermore, such a paradigm allows also to exclude shells. Indeed, Hardware Hardware Hardware a number of attacks try to invoke a shell to alter the system they Virtual Machine (VM) Container Unikernel are attacking. Without a shell, an attacker does not have this op- portunity. This forces the attacker to use machine code to subvert Figure 1: Comparison of virtual machine, container and the system which decreases the chances of successfully completing unikernel system architecture. the attack. In addition to security, unikernels also allow to improve per- formance. They use a single address space, without distinction between kernel-space and user-space. Consequently, system calls by selecting and extracting the right operating system components become equivalent to regular function calls, avoiding the overhead and primitives (e.g., network stack, network drivers, ...) while re- of context switches and data copies between user and kernel spaces. specting a given API. Porting legacy applications is in general not Single address space means running application in kernel mode. trivial. Indeed, several factors such as incompatible or missing li- This model implies that software bugs will critically break the braries/features, complex build infrastructures, lack of developer running unikernel. Due to this design, unikernels are also harder to tools (debuggers/profilers), and unsupported languages prevent debug since they usually do not provide their own sets of debugging unikernels to gain significant traction from developers. Further- tools. To use existing tools, it is necessary to cross-compile them. more, the migration represents only a small portion of the work. Additionally, third party libraries used by the debugging tools must Indeed, other processes such as verification and optimization are be included into the image, ballooning the size of the unikernel. necessary to obtain a fully operational and optimized unikernel Any debugging tools based on multiple parallel processes can not for a particular platform and architecture. All these manual steps work in a unikernel by design. involve significant resources and complex operations which are tedious for developers. These challenges prevent unikernels from being widely used by the software industry. 3 RELATED WORK To circumvent costly operations related to unikernel develop- There exist plenty of related work showing that unikernels bring ment and deployment, a new research project is being studied and great benefits and impressive performance compared to traditional developed: UNICORE. The main objective of UNICORE is to develop VMs and containers. It is possible to divide research-related area an open-source toolkit to automatically build minimalist operating into two main categories: (1) Development of minimalist operating systems targeting a single (or multiple) existing application(s) that systems that are POSIX-compliant. These can run existing and legacy is/are optimized to run on different architectures (e.g., x86, ARM, application by using cross-compiling techniques. Generally, they MIPS) and platforms (e.g.,

View Full Text

Details

  • File Type
    pdf
  • Upload Time
    -
  • Content Languages
    English
  • Upload User
    Anonymous/Not logged-in
  • File Pages
    6 Page
  • File Size
    -

Download

Channel Download Status
Express Download Enable

Copyright

We respect the copyrights and intellectual property rights of all users. All uploaded documents are either original works of the uploader or authorized works of the rightful owners.

  • Not to be reproduced or distributed without explicit permission.
  • Not used for commercial purposes outside of approved use cases.
  • Not used to infringe on the rights of the original creators.
  • If you believe any content infringes your copyright, please contact us immediately.

Support

For help with questions, suggestions, or problems, please contact us