Binary Component Adaptation Ralph Keller and Urs Hölzle Dept. of Computer Science University of California, Santa Barbara 1998.

Slides:



Advertisements
Similar presentations
Operating Systems Components of OS
Advertisements

Department of Computer Science and Engineering University of Washington Brian N. Bershad, Stefan Savage, Przemyslaw Pardyak, Emin Gun Sirer, Marc E. Fiuczynski,
Ensuring Operating System Kernel Integrity with OSck By Owen S. Hofmann Alan M. Dunn Sangman Kim Indrajit Roy Emmett Witchel Kent State University College.
Overview Motivations Basic static and dynamic optimization methods ADAPT Dynamo.
Java security (in a nutshell)
Introduction to JAVA Vijayan Sugumaran School of Business Administration Oakland University Rochester, MI
01/05/2015Leiden Institute of Advanced Computer Science 1 The Open Kernel Environment - spinning Linux - Herbert Bos Bart Samwel
Mobile Code Security Aviel D. Rubin, Daniel E. Geer, Jr. MOBILE CODE SECURITY, IEEE Internet Computing, 1998 Minkyu Lee
The Open Kernel Environment (opening up all levels of the processing hierarchy in a 'safe' manner) Herbert Bos Bart Samwel Leiden University
EXTENSIBILITY, SAFETY AND PERFORMANCE IN THE SPIN OPERATING SYSTEM B. Bershad, S. Savage, P. Pardyak, E. G. Sirer, D. Becker, M. Fiuczynski, C. Chambers,
Extensibility, Safety and Performance in the SPIN Operating System Presented by Allen Kerr.
Lightweight Abstraction for Mathematical Computation in Java 1 Pavel Bourdykine and Stephen M. Watt Department of Computer Science Western University London.
Hastings Purify: Fast Detection of Memory Leaks and Access Errors.
API Design CPSC 315 – Programming Studio Fall 2008 Follows Kernighan and Pike, The Practice of Programming and Joshua Bloch’s Library-Centric Software.
1 Extensible Security Architectures for Java Authors: Dan S.Wallch, Dirk Balfanz Presented by Moonjoo Kim.
Extensibility, Safety and Performance in the SPIN Operating System Brian Bershad, Stefan Savage, Przemyslaw Pardyak, Emin Gun Sirer, Marc E. Fiuczynski,
Edward Tsai – CS 239 – Spring 2003 Strong Security for Active Networks CS 239 – Network Security Edward Tsai Tuesday, May 13, 2003.
Programmability with Proof-Carrying Code George C. Necula University of California Berkeley Peter Lee Carnegie Mellon University.
Copyright © Clifford Neuman - UNIVERSITY OF SOUTHERN CALIFORNIA - INFORMATION SCIENCES INSTITUTE USC CSci599 Trusted Computing Lecture Three.
Extensibility, Safety and Performance in the SPIN Operating System Brian Bershad, Stefan Savage, Przemyslaw Pardyak, Emin Gun Sirer, Marc E. Fiuczynski,
Extensibility, Safety and Performance in the SPIN Operating System Dave Camarillo.
An Approach to Safe Object Sharing Ciaran Bryce & Chrislain Razafimahefa University of Geneva, Switzerland.
Exokernel: An Operating System Architecture for Application-Level Resource Management Dawson R. Engler, M. Frans Kaashoek, and James O’Toole Jr. M.I.T.
Silberschatz, Galvin and Gagne ©2009 Operating System Concepts – 8 th Edition Chapter 2: Operating-System Structures Modified from the text book.
Session-02. Objective In this session you will learn : What is Class Loader ? What is Byte Code Verifier? JIT & JAVA API Features of Java Java Environment.
ADVANCED LINUX SECURITY. Abstract : Using mandatory access control greatly increases the security of an operating system. SELinux, which is an implementation.
Peter Juszczyk CS 492/493 - ISGS. // Is this C# or Java? class TestApp { static void Main() { int counter = 0; counter++; } } The answer is C# - In C#
Proxy Design Pattern Source: Design Patterns – Elements of Reusable Object- Oriented Software; Gamma, et. al.
Page 1 Sandboxing & Signed Software Paul Krzyzanowski Distributed Systems Except as otherwise noted, the content of this presentation.
Java Security Updated May Topics Intro to the Java Sandbox Language Level Security Run Time Security Evolution of Security Sandbox Models The Security.
Efficient Software-Based Fault Isolation—sandboxing Presented by Carl Yao.
JAVA v.s. C++ Programming Language Comparison By LI LU SAMMY CHU By LI LU SAMMY CHU.
Java Security. Topics Intro to the Java Sandbox Language Level Security Run Time Security Evolution of Security Sandbox Models The Security Manager.
Previous Next 06/18/2000Shanghai Jiaotong Univ. Computer Science & Engineering Dept. C+J Software Architecture Shanghai Jiaotong University Author: Lu,
Introduction to .Net Framework
PKCS11 Key Protection And the Insider Threat.
Promile A Management Architecture for Programmable Modular Routers Miguel Rio (joint work with Nicola Pezzi, Luca Zanolin, Hermann De Meer, Wolfgang Emmerich.
Firewall and Internet Access Mechanism that control (1)Internet access, (2)Handle the problem of screening a particular network or an organization from.
Design patterns. What is a design pattern? Christopher Alexander: «The pattern describes a problem which again and again occurs in the work, as well as.
LWIP TCP/IP Stack 김백규.
Eric Keller, Evan Green Princeton University PRESTO /22/08 Virtualizing the Data Plane Through Source Code Merging.
Object Oriented Programming Elhanan Borenstein Lecture #4.
CS 390- Unix Programming Environment CS 390 Unix Programming Environment Topics to be covered: Distributed Computing Fundamentals.
Proof Carrying Code Zhiwei Lin. Outline Proof-Carrying Code The Design and Implementation of a Certifying Compiler A Proof – Carrying Code Architecture.
Algorithm Programming Bar-Ilan University תשס"ח by Moshe Fresko.
Java 2 security model Valentina Casola. Components of Java the development environment –development lifecycle –Java language features –class files and.
CE Operating Systems Lecture 3 Overview of OS functions and structure.
ADV. NETWORK SECURITY CODY WATSON What’s in Your Dongle and Bank Account? Mandatory and Discretionary Protections of External Resources.
SCALABLE EVOLUTION OF HIGHLY AVAILABLE SYSTEMS BY ABHISHEK ASOKAN 8/6/2004.
© Janice Regan, CMPT 300, May CMPT 300 Introduction to Operating Systems Memory: Relocation.
An OBSM method for Real Time Embedded Systems Veronica Eyo Sharvari Joshi.
EXTENSIBILITY, SAFETY AND PERFORMANCE IN THE SPIN OPERATING SYSTEM
1. 2 Preface In the time since the 1986 edition of this book, the world of compiler design has changed significantly 3.
Lecture 3 Classes, Structs, Enums Passing by reference and value Arrays.
1 CSCD 326 Data Structures I Software Design. 2 The Software Life Cycle 1. Specification 2. Design 3. Risk Analysis 4. Verification 5. Coding 6. Testing.
CE Operating Systems Lecture 17 File systems – interface and implementation.
Efficient software-based fault isolation Robert Wahbe, Steven Lucco, Thomas Anderson & Susan Graham Presented by: Stelian Coros.
SAFE KERNEL EXTENSIONS WITHOUT RUN-TIME CHECKING George C. Necula Peter Lee Carnegie Mellon U.
Efficient Software-Based Fault Isolation Authors: Robert Wahbe Steven Lucco Thomas E. Anderson Susan L. Graham Presenter: Gregory Netland.
The Execution System1. 2 Introduction Managed code and managed data qualify code or data that executes in cooperation with the execution engine The execution.
1 Chapter 2: Operating-System Structures Services Interface provided to users & programmers –System calls (programmer access) –User level access to system.
Computer System Structures
Efficient Software-Based Fault Isolation
Presentation by Omar Abu-Azzah
Java security (in a nutshell)
Computer Security CS May, 2018.
Security in Java Real or Decaf? cs205: engineering software
Chapter 2: Operating-System Structures
Outline Chapter 2 (cont) OS Design OS structure
Chapter 2: Operating-System Structures
Presentation transcript:

Binary Component Adaptation Ralph Keller and Urs Hölzle Dept. of Computer Science University of California, Santa Barbara 1998

Motivation A user should be able to easily integrate binary only code provided by multiple vendors. –It is unrealistic to expect different vendors to code with the same standards. A single vendor should have a better way to update modules while maintaining binary compatibility between releases. –Problematic with direct source code modification Currently you only get one chance to “get it right” with an interface.

Simple Example

Solution

The goal of BCA

Supported Modifications

A replacement example

Interface Evolution Example

Steps To Using BCA 1. Adaptation File Textual description of the changes desired. 2. Delta File Adaptation is compiled to a portable delta file containing delta information plus compiled bytecode for new methods. 3. Class File Modification Static: produce new class files Dynamic: modify class files based on available deltas at load time.

Delta File Compilation

Intermediate class file representation

Problems Naming clashes in “evolved” (distributor modified) versus adapted (user modified) versions. –To solve this every class file needs a record of the version of the module it was compiled against. If deltas contain renaming, composition order may be relevant. –To be solved by the user.

Integration with javac

Benchmark Summary BCA was acceptable fast The majority of slowdown was due to double parsing of the class file. Could be solved by integration into javac.

Conclusions Allows adaptation of any component without requiring source code access. Provides a mechanism for release to release binary compatibility. Robust- can add/rename fields and methods,change inheritance structure, extend interfaces. Efficient enough to be performed at load time. This is all good stuff.

This Slide Intentionally Left Blank

Safe Kernel Programming in the Open Kernel Environment (OKE) Herbert Bos and Bart Samwel Leiden Institute of Advanced Computer Sciences June 2002

Goals Load fully optimized native user code into the kernel. Use a language OS programmers will be comfortable with. Allow for various levels of freedom within the kernel depending on user credentials.

Predecessors DrScheme: Support for multiple language access levels. –OKE uses a modified version of Cyclone with the same effect Spin: Support for user code inside the kernel boundary. Modula-3. Trusted compiler. –Doesn’t handle resource management. Bad code can still consume the memory or cputime. FLAME : Cyclone + KeyNote + Static checking –Focus on networking code rather than full kernel programability. Proof Carrying Code(PCC): Uses formal proofs to ensure safety of code. –OKE relies on trust management and language mechanisms instead.

OKE & Trust Management Uses KeyNote and OpenSSL as the foundation. Public key certification System “Binds keys directly to the authorization to perform specific tasks.” Trust chains. Trusted users may delegate trust to others. –“Permission to load a module of type X or type Y, but only under condition Z”

Trust Management (cont.) Types: Rule sets for compiled code. A compiled module will have a signature verifying that it conforms to a given type. Roles: e.g. “student loading code in kernel” Types and Roles the responsibility of the administrator to manage.

OKE Architecture Framework A.The Code Loader B.The legislator C.The bygwyn compiler

The Code Loader Verifies the integrity of the module and the permission of the user to load the module(based on user credentials). Otherwise a standard loader.

The Legislator Designed to help automate language customizations for specific tasks while maintaining ‘safety’ in the kernel. Proof of concept implementation only “Mechanisms, not policies.” Does not manage any mapping between users and types.

The bygwyn Compiler “You can’t always get what you want, but you get what you need.” –Rolling Stones Allows for a dynamic set of restrictions using the forbid keyword. e.g.: forbid namespace Credentials must be supplied to the compiler to determine restrictions. Credentials may differ from CL credentials. Compiler binds customization types (rule sets) to compiled code with MD5. Generates a signed compilation record.

Putting it all together

Restricting Cyclone Untrusted Code must be contained within a single translation unit. Environmental Setup Code(ESC). ESC allowed to use inline “C” –Defines external APIs –forbid extern “C” –generates a unique random namespace No unauthorized imports No namespace clashes locked keyword. Allows a struct field to be passed as an argument, but not read or written.

Resource Protection cputime –Timer based(configurable). Generates an uncatchable exception. Stack Overflow –Static: maximum potential stack usage –Dynamic(for recursion): checks at runtime

Region based memory protection “Outlives” concept derived form Cyclone. –Pointers in one region may only point to data in regions which are guaranteed to outlive the pointer. Cyclone Heap may point to kernel memory, but not vise versa. –Correct because the kernel will always outlive the module, but problematic since the kernel can free whatever it wants. Tricks required.

Wrapping Calls from kernel to untrusted code are wrapped. –catch Cyclone Exceptions before reaching the kernel. –Free unreleased locks Calls to kernel functions are wrapped. –Allows insertion of Misbehavior Exceptions forbid catch –Usually kill a module by throwing an exception. If trying to kill while in the kernel, exception is deferred to the wrapper exit.

Applications Network Monitoring –Packet filters –Traffic analysis Packet Transcoding –Forward Error Correction (FEC) –Audio packet resampling

Open Monitoring Architecture

OMA Packet filtering Prevents access to various parts of the packet –Examples: Header only Header only, except for origination access. –Uses const locked fields to achieve this protection at no cost(checked at compile time). Module acts as a filter with Linux NetFilter hooks (inserted in forwarding path).

OMA Packet Transcoding The packet is removed from the forwarding path. Traditional solutions require a copy into user memory space. Example1: Add Forward Error Correction (FEC) to the packet. Example2: Audio Resampling

OMA Packet Transcoding

Overhead of Copy to Userspace

FEC Overhead- OKE vs. C

Overhead of Resampling

Other Work: Active Networking and The OKE Corral Goals similar to that of the Click Modular Router. Relies on trust management mechanism to allow modules to be loaded into the kernel over a network.

Conclusions The OKE allows optimized modules to be safely integrated into the kernel. There is a clear performance advantage against both user space implementations (frequently crossing the kernel boundary) and against interpreted solutions such as BPF. In many cases, performance can approach that of native C.