OSes. Arvind Seshadri Mark Luk Ning Qu Adrian Perrig SOSP2007. CyLab of CMU. SecVisor: A Tiny Hypervisor to Provide



Similar documents
Virtualization Technology. Zhiming Shen

Virtual Machines. COMP 3361: Operating Systems I Winter

Hardware Based Virtualization Technologies. Elsie Wahlig Platform Software Architect

AMD 64 Virtualization

Full and Para Virtualization

x86 Virtualization Hardware Support Pla$orm Virtualiza.on

Virtual machines and operating systems

The Microsoft Windows Hypervisor High Level Architecture

Uses for Virtual Machines. Virtual Machines. There are several uses for virtual machines:

CS5460: Operating Systems. Lecture: Virtualization 2. Anton Burtsev March, 2013

Intel s Virtualization Extensions (VT-x) So you want to build a hypervisor?

Hybrid Virtualization The Next Generation of XenLinux

A Hypervisor IPS based on Hardware assisted Virtualization Technology

Virtualization. Types of Interfaces

CS 695 Topics in Virtualization and Cloud Computing. More Introduction + Processor Virtualization

Nested Virtualization

Security Challenges in Virtualized Environments

Windows Server Virtualization & The Windows Hypervisor

System Virtual Machines

Hypervisors and Virtual Machines

Architecture of the Kernel-based Virtual Machine (KVM)

Chapter 5 Cloud Resource Virtualization

Xen and the Art of. Virtualization. Ian Pratt

Operating Systems. Lecture 03. February 11, 2013

Implementation of a Purely Hardware-assisted VMM for x86 Architecture

Leveraging Thin Hypervisors for Security on Embedded Systems

Attacking Hypervisors via Firmware and Hardware

Attacking Hypervisors via Firmware and Hardware

Last Class: OS and Computer Architecture. Last Class: OS and Computer Architecture

VMware Server 2.0 Essentials. Virtualization Deployment and Management

Virtualization in the ARMv7 Architecture Lecture for the Embedded Systems Course CSD, University of Crete (May 20, 2014)

Last Class: OS and Computer Architecture. Last Class: OS and Computer Architecture

Virtualization. Jia Rao Assistant Professor in CS

Guardian: Hypervisor as Security Foothold for Personal Computers

Microkernels, virtualization, exokernels. Tutorial 1 CSC469

Virtualization is set to become a key requirement

FRONT FLYLEAF PAGE. This page has been intentionally left blank

Chapter 16: Virtual Machines. Operating System Concepts 9 th Edition

Virtualization. Pradipta De

Virtualization in Linux KVM + QEMU

Using Linux as Hypervisor with KVM

Advanced Computer Networks. Network I/O Virtualization

BHyVe. BSD Hypervisor. Neel Natu Peter Grehan

A Tour Beyond BIOS Supporting an SMM Resource Monitor using the EFI Developer Kit II

Virtual Computing and VMWare. Module 4

Intel Virtualization Technology Overview Yu Ke

Windows Server Virtualization & The Windows Hypervisor. Background and Architecture Reference

ARM Virtualization: CPU & MMU Issues

Understanding Full Virtualization, Paravirtualization, and Hardware Assist. Introduction...1 Overview of x86 Virtualization...2 CPU Virtualization...

Cloud Computing. Dipl.-Wirt.-Inform. Robert Neumann

Bluepilling the Xen Hypervisor

Hardware accelerated Virtualization in the ARM Cortex Processors

KVM: Kernel-based Virtualization Driver

Operating Systems 4 th Class

COS 318: Operating Systems. Virtual Memory and Address Translation

MODULE 3 VIRTUALIZED DATA CENTER COMPUTE

Virtual Machines. Virtual Machine (VM) Examples of Virtual Systems. Types of Virtual Machine

Security Overview of the Integrity Virtual Machines Architecture

VMkit A lightweight hypervisor library for Barrelfish

Virtual vs Physical Addresses

Taming Hosted Hypervisors with (Mostly) Deprivileged Execution

LSM-based Secure System Monitoring Using Kernel Protection Schemes

The Xen of Virtualization

Knut Omang Ifi/Oracle 19 Oct, 2015

The Turtles Project: Design and Implementation of Nested Virtualization

COS 318: Operating Systems. Virtual Machine Monitors

Chapter 2: Computer-System Structures. Computer System Operation Storage Structure Storage Hierarchy Hardware Protection General System Architecture

IOMMU: A Detailed view

Intel Virtualization Technology and Extensions

KVM Security Comparison

Introduction. What is an Operating System?

Kernel Virtual Machine

Virtualizing a Virtual Machine

An Introduction to Virtual Machines Implementation and Applications

Optimizing Network Virtualization in Xen

1. Computer System Structure and Components

Outline. Outline. Why virtualization? Why not virtualize? Today s data center. Cloud computing. Virtual resource pool

An Implementation Of Multiprocessor Linux

Thomas Fahrig Senior Developer Hypervisor Team. Hypervisor Architecture Terminology Goals Basics Details

Virtual Machine Monitors. Dr. Marc E. Fiuczynski Research Scholar Princeton University

Lecture Embedded System Security Dynamic Root of Trust and Trusted Execution

Secure In-VM Monitoring Using Hardware Virtualization

Virtualization. P. A. Wilsey. The text highlighted in green in these slides contain external hyperlinks. 1 / 16

Distributed Systems. Virtualization. Paul Krzyzanowski

OS Virtualization Frank Hofmann

Exploiting the x86 Architecture to Derive Virtual Machine State Information

Brian Walters VMware Virtual Platform. Linux J. 1999, 63es, Article 6 (July 1999).

novm: Hypervisor Rebooted Adin Scannell

CS 61C: Great Ideas in Computer Architecture Virtual Memory Cont.

Real-time KVM from the ground up

matasano Hardware Virtualization Rootkits Dino A. Dai Zovi

Frontiers in Cyber Security: Beyond the OS

CS161: Operating Systems

COS 318: Operating Systems

Introduction to the NI Real-Time Hypervisor

Memory Management Outline. Background Swapping Contiguous Memory Allocation Paging Segmentation Segmented Paging

Chapter 14 Virtual Machines

Transcription:

SecVisor: A Seshadri Mark Luk Ning Qu CyLab of CMU SOSP2007

Outline Introduction Assumption SVM Background Design Problems Implementation Kernel Porting Evaluation Limitation

Introducion Why? Only approved code could run in kernel mode What? A tiny hypervisor How? Using hardware memory protection to tell approved code from un-approved code

Deploy Requirement CPU with SVM feature support TCB(Trust Computing Base) CPU, Memory Controller and Memory Assumption

SVM Background: 1/3 2 Mode Support Host Mode for VMM, e.g. VMM runs at Ring0 Guest Mode for Guest OS, e.g. Kernel runs at Ring0, App at Ring3

SVM Background: 2/3 Host-Guest Execute Model Each Guest has a data structure called VMCB(Virtual Machine Control Block) which contain its execution state The execution of Guest is triggered when VMM call vmrun(vmcb) On hitting an intercept, CPU suspends the Guest, store its state to VMCB, then exit to Host Guest will execute until Host call vmrun(vmcb) again

SVM Background: 3/3 ASID(Address Space IDentifier) Extra 1 bit to TLB-entry to tell from the Host-AP and Guest-AP Intercept Events Including instruction, interrupt, exception, io, MSR intercept DEV(Device Exclusion Vectors) Extra 1 bit to per Physical-Page(4k), set to 1 means to disable DMA read or write NPT(Nested Page Table) Translate Guest physical address to CPU physical address, provide hardware-supported physical memory virtualization

Background of Background TLB(hw): A Translation Lookaside Buffer (TLB) is a CPU cache that is used by MMU to improve the speed of virtual address translation MMU(hw): A memory management unit (MMU) is a computer hardware component responsible for handling accesses to memory requested by CPU Page Table(OS):A page table is the data structure used by a virtual memory system in OS to store the mapping between virtual addresses and physical addresses When CPU send out the request to memory, will first check TLB. if TLB hit, return the Physical Address from L1 or L2 cache. Otherwise TLB miss, will look up Page Table or trigger Page Fault.

Design Problems How to protect SecVisor itself? How ensure only approved code executes in kernel mode? How ensure the Kernel-User Mode switch?

Requirement Analysis p1 Entry into kernel mode, IP should point to Approved Code p2 Inside the kernel mode, IP should still point to Approved Code p3 Exit from the kernel mode, should set to User Mode p4 Memory containing Approved Code should not be modified

SecVisor Memory Management Virtualizing Memory Virtualizing DEV Kernel Mode Entry& Exit Implementation

SecVisor Memory Management: Implementation Allocate its physical memory just after the ACPI code in RAM Pass a command line parameter when kernel boot to inform the RAM reduction SecVisor execute in Host mode, which owns the different address space from Guest

Implementation Virtualizing Memory based on NPT(Nested Page Table): NPT is the second page table, which is suited for setting page-table-based protections Allocate physical pages from SecVisor own memory for NPT, since SecVisor s physical pages are never accessible to the Guest, and they are protected against DMA write Basic Idea: SecVisor maintains a list of Guest physical pages that contain approved code. When executing in kernel mode, SecVisor clears the non-execute permission only for those entries within the approved list Optimization: Maintain 2 NPTs, one for User Mode, the other for Kernel Mode

Implementation Virtualizing Memory based on SPT(Shadow Page Table): SPT modify execute permission over user and kernel memroy on each mode transition SPT maintains the mappings between virtual and host physical address, synchronize with the Page Table(OS Kernel) by intercept triggered by Page Table related operations, e.g. modify page table, handle page fault.

Virtualizing DEV: Implementation Allocate physical pages for DEV from its own memory SecVisor intercepts all writes to the DEV configuration registers

Kernel Mode Entry& Exit: Implementation Kernel Mode Exit All kernel mode exit will cause a protection exception, as its handling, SecVisor will set the CPL field of VMCB to 3, to ensure when Guest resumes execution, the CPU is in Ring3 Kernel Mode Entry Maintain the shadow copies of GDT, LDT, IDT and some MSRs to make sure they are approved. For these registers are only written in kernel mode, SecVisor only needs to modify these registers before allowing user mode to execute. It is done by changing related values in the VMCB as part of handling a kernel to user mode transition.

Kernel Porting(1/2) Kernel bootstrap code: 1 setup(): initialize the hardware with calls to BIOS 2 decompress kernel(): perform further hardware init, decompress the runtime code, then jump to the start address of the runtime Porting: decompress kernel() will invoke SecVisor, also pass the start& end address of runtime code segment to SecVisor. After the policy approve the runtime, SecVisor creates a VMCB, set memory protection over the runtime code, then transfer control to the runtime code by vmrun instruction.

Load/Unload kernel modules load module() free module() Kernel Porting(2/2) Porting: In load module(), invoke SecVisor via a hypercall, the argument is the start& end addresses of the relocated module.

Evaluation Design Compliance Performance

Design Compliance Evaluation Small Size Kernel Interface 1 Load&Unload Kernel Module 2 Kernel Init Effort to port a kernel a) decompress kernel() b) load module(),free module()

LMBench results: Performance Evaluation

Application performance: Performance Evaluation

Performance Evaluation Application performance:

Limitation& Future Work Limitation SecVisor guarantee integrity of the code that executes in kernel mode, but not the integrity of the control flow Future Work Multi-CPU support

SecVisor: A Q&A Thank you. Any questions?