Zeldovich et al. (both papers) Reading Group by Theo.

Slides:



Advertisements
Similar presentations
Memory Protection: Kernel and User Address Spaces  Background  Address binding  How memory protection is achieved.
Advertisements

EECS 470 Virtual Memory Lecture 15. Why Use Virtual Memory? Decouples size of physical memory from programmer visible virtual memory Provides a convenient.
Computer Organization CS224 Fall 2012 Lesson 44. Virtual Memory  Use main memory as a “cache” for secondary (disk) storage l Managed jointly by CPU hardware.
The Memory Hierarchy (Lectures #24) ECE 445 – Computer Organization The slides included herein were taken from the materials accompanying Computer Organization.
Virtual Memory Virtual Memory Management in Mach Labels and Event Processes in Asbestos Ingar Arntzen.
Memory Management (II)
1 Lecture 14: Virtual Memory Topics: virtual memory (Section 5.4) Reminders: midterm begins at 9am, ends at 10:40am.
Computer ArchitectureFall 2008 © November 10, 2007 Nael Abu-Ghazaleh Lecture 23 Virtual.
Computer ArchitectureFall 2007 © November 21, 2007 Karem A. Sakallah Lecture 23 Virtual Memory (2) CS : Computer Architecture.
Microkernels: Mach and L4
1 Last Class: Introduction Operating system = interface between user & architecture Importance of OS OS history: Change is only constant User-level Applications.
Early OS security Overview by: Greg Morrisett Cornell University, Edited (by permission) for CSUS CSc250 by Bill Mitchell.
OS Organization. OS Requirements Provide resource abstractions –Process abstraction of CPU/memory use Address space Concurrency Thread abstraction of.
1 OS & Computer Architecture Modern OS Functionality (brief review) Architecture Basics Hardware Support for OS Features.
1 RAKSHA: A FLEXIBLE ARCHITECTURE FOR SOFTWARE SECURITY Computer Systems Laboratory Stanford University Hari Kannan, Michael Dalton, Christos Kozyrakis.
Basics of Operating Systems March 4, 2001 Adapted from Operating Systems Lecture Notes, Copyright 1997 Martin C. Rinard.
Address Translation Mechanism of 80386
Some VM Complications Extra memory accesses Page tables are huge
G53SEC 1 Reference Monitors Enforcement of Access Control.
Three fundamental concepts in computer security: Reference Monitors: An access control concept that refers to an abstract machine that mediates all accesses.
COS 598: Advanced Operating System. Operating System Review What are the two purposes of an OS? What are the two modes of execution? Why do we have two.
1 Lecture: Virtual Memory, DRAM Main Memory Topics: virtual memory, TLB/cache access, DRAM intro (Sections 2.2)
Operating Systems ECE344 Ashvin Goel ECE University of Toronto OS-Related Hardware.
Virtual Memory Expanding Memory Multiple Concurrent Processes.
Hardware process When the computer is powered up, it begins to execute fetch-execute cycle for the program that is stored in memory at the boot strap entry.
Chapter 4 Memory Management Virtual Memory.
G53SEC 1 Reference Monitors Enforcement of Access Control.
1 Virtual Memory Main memory can act as a cache for the secondary storage (disk) Advantages: –illusion of having more physical memory –program relocation.
1 Lecture 16: Virtual Memory Topics: virtual memory, improving TLB performance (Sections )
Operating Systems Security
Processes and Virtual Memory
CS2100 Computer Organisation Virtual Memory – Own reading only (AY2015/6) Semester 1.
Virtual Memory Ch. 8 & 9 Silberschatz Operating Systems Book.
Protection of Processes Security and privacy of data is challenging currently. Protecting information – Not limited to hardware. – Depends on innovation.
Lecture 12 Page 1 CS 111 Summer 2014 Security in Operating Systems: Basics CS 111 Operating Systems Peter Reiher.
1 Lecture: Virtual Memory, DRAM Main Memory Topics: virtual memory, TLB/cache access, DRAM intro (Sections 2.2)
Lecture 4 Page 1 CS 111 Online Modularity and Memory Clearly, programs must have access to memory We need abstractions that give them the required access.
Running Commodity Operating Systems on Scalable Multiprocessors Edouard Bugnion, Scott Devine and Mendel Rosenblum Presentation by Mark Smith.
ARM 7 & ARM 9 MICROCONTROLLERS AT91 1 ARM920T Processor.
Memory Protection: Kernel and User Address Spaces Andy Wang Operating Systems COP 4610 / CGS 5765.
Explicit Information Flow in the HiStar OS Nickolai Zeldovich, Silas Boyd-Wickizer, Eddie Kohler, David Mazières.
Translation Lookaside Buffer
CMSC 611: Advanced Computer Architecture
Introduction to Kernel
Memory COMPUTER ARCHITECTURE
Memory Protection: Kernel and User Address Spaces
CS 6560: Operating Systems Design
Virtual Memory Use main memory as a “cache” for secondary (disk) storage Managed jointly by CPU hardware and the operating system (OS) Programs share main.
Address Translation Mechanism of 80386
Modularity and Memory Clearly, programs must have access to memory
Morgan Kaufmann Publishers
ECE 391 Exam 2 HKN Review Session
Memory Protection: Kernel and User Address Spaces
Memory Protection: Kernel and User Address Spaces
Memory Protection: Kernel and User Address Spaces
Lecture 14 Virtual Memory and the Alpha Memory Hierarchy
Making Information Flow Explicit in HiStar Lecture 25, cs262a
AEGIS: Secure Processor for Certified Execution
Translation Lookaside Buffer
Morgan Kaufmann Publishers Memory Hierarchy: Virtual Memory
CSE 451: Operating Systems Autumn 2003 Lecture 10 Paging & TLBs
CSE451 Virtual Memory Paging Autumn 2002
CSE 451: Operating Systems Autumn 2003 Lecture 10 Paging & TLBs
Lecture 8: Efficient Address Translation
Virtual Memory Lecture notes from MKP and S. Yalamanchili.
Virtual Memory Use main memory as a “cache” for secondary (disk) storage Managed jointly by CPU hardware and the operating system (OS) Programs share main.
Virtual Memory.
Memory Protection: Kernel and User Address Spaces
Presentation transcript:

Zeldovich et al. (both papers) Reading Group by Theo

Part 1/2 Slides based on Zeldovich’s talk 2

 Untrustworthy code everywhere ◦ Legitimate programs are vulnerable  Even antivirus scanners… ◦ Users authorize malicious software  Not getting any better ◦ Software becomes more complex  Can the O/S guarantee security? ◦ Probably not… 3

Virus Scanner Live Update Internet Private User Files /tmp Virus Database Acceptable flow Private files should not leak to the internet! 4

Virus Scanner Live Update Internet Private User Files /tmp Virus Database O/S 5

Virus Scanner Live Update Internet Private User Files /tmp Virus Database O/S 6

Virus Scanner Live Update Internet Private User Files /tmp Virus Database Or: Create file SecretBitIs1.txt 2 malicious apps cooperating hard to detect! Covert Channel: Lock virus DB 7

 Existing O/S are too complex ◦ Too many protection mechanisms  File descriptors, user ids  Doesn’t help with security Unix P3 P2 P1 Unix Kernel (TCB) Unix Kernel (TCB) H/W Complex Objects 8

UnixHiStar Unix Lib P3 P2 P1 Unix Kernel (TCB) Unix Kernel (TCB) H/W P2 P1 U1 P3 U3 U2 HiStar Kernel (TCB) HiStar Kernel (TCB) H/W Simple Objects 9

 Most Unix implemented as user-level libraries ◦ Narrow, easily controlled interface  All kernel objects have the same, flat namespace ◦ Files, users, processes, address spaces are kernel objects  All information flow is made explicit 10

High Data High Process Low Data Low Process e.g.: credit card processing Web Server Globally visible, read-only confi- guration file e.g.: Untrusted user process ‘High’ information should never modify ‘low’! Information only flows upwards 11

 Each kernel object has a label ◦ Files, users, programs, etc  Each label is a set of categories  For each category, each object has a level  E.g. ‘unmodifiable’, ‘secret’ file of user X 12

LevelMeaning 0Unmodifiable (read-only) 1Default Level 2Cannot be exported from PC 3Inaccessible (no read) ⋆ Super access (can R/W anything, change tags) Fully trusted Top Secret Process can read less secret data (lower level), can write less trusted data (higher level) Objects can have multiple labels (top secret & unmodifiable) 13

Bob’s Files Bob’s Files Bob’s Process Bob’s Shell Internet Alice’s Files Alice’s Files Alice’s Process Alice’s Shell Color Mismatch 14

Bob’s Secret Files Bob’s Secret Files Bob’s Files Bob’s Shell Alice’s Files Alice’s Files Alice’s Shell Root shell 15

 S/W only implementation  11,600 TCB kernel code ◦ Hmmm. Can we do better? (LoStar) ◦ 1,300 extra bootstrapping code  HiStar ensures that you have enough rights to execute, read, write data  Malicious web app can leak data only of the users that called it.  Does not protect against DoS 16

17

Part 2/2 18

 HiStar has few kernel objects ◦ Process, files, address space, etc  Each object has a label ◦ ‘Colored’ objects ◦ Access allowed only when I have enough credentials for that label  Let’s color the physical RAM! ◦ Using Raksha-like H/W 19

UnixHiStar P2 P1 U1 P3 U3 U2 HiStar Kernel (TCB) HiStar Kernel (TCB) DRAM Unix Lib P3 P2 P1 Unix Kernel (TCB) Unix Kernel (TCB) DRAM LoStar P1 U1 P2 Ker nel P3 U3 U2 Ker nel (TCB) Security Monitor (TCB) Security Monitor D D R R A A M M Super -Visor Moni- tor Physical RAM Authorized Colors Protection Domain 20

 Each 32-bit word has a 32-bit color  Every memory reference (I and D) will retrieve the associated color  The security monitor checks the HiStar label for that color and the current thread’s rights  Check will be cached for future reuse 21

Tags L1-I PC De- code Reg. File Permission Checks EXC WB ALU Preexisting Loki Logic Loki Tags L1-D Execute P-Cache R/W P-Cache Memory Controller Memory Tags Tag Handling 22

 Color: 32-bit physical address of HiStar’s label ◦ 1 color per page  Indirect entry for multi-colored pages (color/word)  Colors stored in RAM ◦ Physical address space reserved  Virtual memory manager not in the TCB  Colors associated with physical addresses ◦ No aliasing problem 23

 A cache of recently checked labels ◦ 32-bit color tag and 3 bit permissions (RWX)  32-entry 2-way set associative  Can be thought as TLB ◦ Permission Lookaside Buffer ◦ Normal TLB tricks apply  Eg P-Cache-I and P-Cache-D  Saved on context switch 24

 Security exception calls LoStar’s monitor ◦ Not the kernel (HiStar) of the active thread  Security monitor in TCB ◦ No checks performed ◦ No physical – virtual translation ◦ ‘Trusted’ mode above the H/W supervisor move 25

 HiStar calls LoStar for new labels ◦ LoStar will write-protect the new label  LoStar protects critical global HiStar structures ◦ E.g., kernel object hash table ◦ HiStar kernels do not have to trust each other  So virtual memory manager not in the TCB  LoStar does not guarantee liveness 26

Pipeline Depth7L1-I16 KB, 2-way SA Register Windows8L1-D32 KB, 2-way SA Memory512 MBI-TLB8-entry, fully assoc. Bus width64 bitsD-TLB8-entry, fully assoc. Frequency65 MHzI-Tag Cache8-entry, fully assoc.* D-Tag Cache8-entry, fully assoc.* P-Cache32-entry 2-way SA *Store page granularity tags. Multicolored pages store tags in ‘modified’(?) caches 27

 Hardware Overhead  Trusted Code Base ComponentBlock RAMs4-input LUTs Base Leon4314,502 Loki Logic22,756 % increase519 Lines of codeHiStarLoStar Kernel code11,60012,700 Bootstrapping code1,300 Security monitor-5,200 TCB size11,6005,200 28

29

30

HiStar LoStar LoStar without page tags Average Slowdown primes syscall IPC fork/exec small-file large-file wget gzip Benchmarks 31

 HiStar is an O/S with strict information flow ◦ Most O/S implemented as user library ◦ ~11,000 TCB ◦ Achieves good performance  LoStar is a hardware-assisted HiStar ◦ ~5,000 TCB ◦ Similar performance to HiStar  Unclear whether the benefit of reduced TCB outweighs the cost of extra H/W 32

 Questions? 33