SlideShare une entreprise Scribd logo
1  sur  63
Télécharger pour lire hors ligne
Genode OS Framework - Compositions




            Norman Feske
   <norman.feske@genode-labs.com>
Outline



1. Virtualization techniques


2. Enslaving services


3. Dynamic workloads


4. Current ventures




                        Genode OS Framework - Compositions   2
Outline



1. Virtualization techniques


2. Enslaving services


3. Dynamic workloads


4. Current ventures




                        Genode OS Framework - Compositions   3
Virtualization techniques


Flavors
    Faithful → virtual hardware platform


          Para → modified guest OS kernel


    OS-level → source-level user-land compatibility


Process-level → tailored process environment


  C-runtime → tailored runtime within process


                      Genode OS Framework - Compositions   4
Faithful virtualization



Requires CPU and kernel with virtualization support
→ Intel VT, AMD SVM, ARM Cortex-A15
→ NOVA, Fiasco.OC (not supported yet)



VMM emulates complete platform (CPU+memory+devices)



No guest OS modifications required



                 Genode OS Framework - Compositions   5
Faithful virtualization (2)




            Genode OS Framework - Compositions   6
Faithful virtualization (3)

<config>
  <machine>
    <mem start="0x0" end="0xa0000"/>
    <mem start="0x100000" end="0x2000000"/>
    <nullio io_base="0x80" />
    <pic io_base="0x20" elcr_base="0x4d0"/>
    <pic io_base="0xa0" irq="2" elcr_base="0x4d1"/>
    <pit io_base="0x40" irq="0"/>
    <scp io_port_a="0x92" io_port_b="0x61"/>
    <kbc io_base="0x60" irq_kbd="1" irq_aux="12"/>
    <keyb ps2_port="0" host_keyboard="0x10000"/>
    <mouse ps2_port="1" host_mouse="0x10001"/>
    <rtc io_base="0x70" irq="8"/>
    <serial io_base="0x3f8" irq="0x4" host_serial="0x4711"/>
    <hostsink host_dev="0x4712" buffer="80"/>
    <vga io_base="0x03c0"/>
    <vbios_disk/> <vbios_keyboard/> <vbios_mem/>
    <vbios_time/> <vbios_reset/> <vbios_multiboot/>
    <msi/> <ioapic/>
    <pcihostbridge bus_num="0" bus_count="0x10" io_base="0xcf8" mem_base="0xe0000000"/>
    <pmtimer io_port="0x8000"/>
    <vcpu/> <halifax/> <vbios/> <lapic/>
  </machine>
  <multiboot>
    <rom name="bootstrap"/> <rom name="fiasco"/>
    <rom name="sigma0.foc"/> <rom name="core.foc"/>
  </multiboot>
</config>

                               Genode OS Framework - Compositions                         7
Paravirtualization

No virtualization support needed
→ Can be used on current ARM platforms

Guest OS ported to virtual platform

Binary compatible to guest OS userland

Guest OS kernel must be modified
→ Solution inherently base-platform specific
    L4Linux for Fiasco.OC
   OKLinux for OKL4

→ Ongoing maintenance work

                 Genode OS Framework - Compositions   8
Paravirtualization (2)




            Genode OS Framework - Compositions   9
Paravirtualization (3)


Stub drivers
   Terminal    →   character device
      Block    →   block device
        NIC    →   net device
Framebuffer     →   /dev/fb* device
      Input    →   /dev/input/* device
   Nitpicker   →   ioctl extension to /dev/fb* (OKLinux only)
  Audio out    →   ALSA (OKLinux only)


no direct hardware access


                       Genode OS Framework - Compositions       10
OS-level virtualization


  Idea: Provide Unix kernel interface as a service

fundamentals                                    networking
     write, read                                       socket
     stat, lstat, fstat, fcntl                         getsockopt, setsockopt
     ioctl                                             accept
     open, close, lseek                                bind
     dirent                                            listen
     getcwd, fchdir                                    send, sendto
     select                                            recv, recvfrom
     execve, fork, wait4                               getpeername
     getpid                                            shutdown
     pipe                                              connect
     dup2                                              getaddrinfo
     unlink, rename, mkdir

  In contrast, Linux has more than 300 syscalls

                            Genode OS Framework - Compositions                  11
OS-level virtualization (2)



Things we don’t need to consider
    Interaction with device drivers
    Unix initialization sequence
    Users, groups
    Instance never shared by multiple users
    The opposite: One user may run many instances
    Multi-threading
    Scalability of a single instance
    Each instance serves one specific (limited) purpose
    Run many instances in order to scale!



                     Genode OS Framework - Compositions   12
OS-level virtualization (3)




            Genode OS Framework - Compositions   13
Noux: Running VIM



noux config

<config>
  <fstab> <tar name="vim.tar" /> </fstab>
  <start name="/bin/vim">
    <env name="TERM" value="linux" />
    <arg value="--noplugin" />
    <arg value="-n" /> <!-- no swap file -->
    <arg value="-N" /> <!-- no-compatible mode -->
  </start>
</config>




                     Genode OS Framework - Compositions   14
Noux: Bash + file system


noux config

<config>
  <fstab>
    <tar name="coreutils.tar" />
    <tar name="vim.tar" />
    <tar name="bash.tar" />
    <dir name="home"> <fs label="home" /> </dir>
    <dir name="ram"> <fs label="root" /> </dir>
    <dir name="tmp"> <fs label="tmp" /> </dir>
  </fstab>
  <start name="/bin/bash">
    <env name="TERM" value="linux" />
  </start>
</config>



                     Genode OS Framework - Compositions   15
Noux: Bash + file system (2)

ram fs config

<config>
  <content>
    <dir name="tmp">
      <rom name="init" as="something" />
    </dir>
    <dir name="home">
      <dir name="user">
         <rom name="timer" />
      </dir>
    </dir>
  </content>
  <policy label="noux -> root" root="/" />
  <policy label="noux -> home" root="/home/user" writeable="yes" />
  <policy label="noux -> tmp" root="/tmp"        writeable="yes" />
</config>

                     Genode OS Framework - Compositions               16
Noux features

    Executes unmodified GNU software
    Bash, VIM, GCC, Coreutils, Lynx, GDB...

    Supports stacked file systems

    Instance starts in fraction of a second

    Uses original GNU build system → Porting is easy

    Two versions
        noux/minimal
        noux/net (includes TCP/IP)

less than 5,000 LOC
                      Genode OS Framework - Compositions   17
Process-level virtualization




Opportunity: Virtualization of individual session interfaces
    Monitoring of session requests
    Customization of existing services
    → Reuse of existing components
    → Separation of policy and mechanisms




                    Genode OS Framework - Compositions         18
Process-level virtualization (2)




            Genode OS Framework - Compositions   19
Process-level virtualization (3)




            Genode OS Framework - Compositions   20
Process-level virtualization (4)




            Genode OS Framework - Compositions   21
GDB monitor features




Supported on Fiasco.OC and OKL4
Break-in by user or segfault
Source-level debugging
Backtraces
Breakpoints
Single-stepping
Debugging of multi-threaded processes
Debugging of dynamically linked binaries




                 Genode OS Framework - Compositions   22
C-runtime customization


FreeBSD libc turned into modular C runtime
libports/lib/mk/libc.mk
libports/lib/mk/libc log.mk
libports/lib/mk/libc fs.mk
libports/lib/mk/libc rom.mk
libports/lib/mk/libc lwip.mk
libports/lib/mk/libc ffat.mk
libports/lib/mk/libc lock pipe.mk
→ application-specific plugins

                     Genode OS Framework - Compositions   23
C-runtime customization example




          Genode OS Framework - Compositions   24
C-runtime customization example (2)




          Genode OS Framework - Compositions   25
C-runtime customization example (3)




          Genode OS Framework - Compositions   26
Outline



1. Virtualization techniques


2. Enslaving services


3. Dynamic workloads


4. Current ventures




                        Genode OS Framework - Compositions   27
Enslaving services


Idea: Run a service as a child


    Sandboxing



    Easy code reuse



    Plugin mechanism



                      Genode OS Framework - Compositions   28
Media player




           Genode OS Framework - Compositions   29
Media player (2)




           Genode OS Framework - Compositions   30
Slave API helper

#include <os/slave.h>
...
struct Policy : Slave_policy
{
  char const **_permitted_services() const
  {
    static char const *permitted_services[] = { "CAP", "RM", "RAM", "LOG", 0 };
    return permitted_services;
  };

     Policy(Rpc_entrypoint &slave_ep) : Slave_policy("ram_fs", slave_ep) { }

     bool announce_service(const char     *service_name,
                           Root_capability root,
                           Allocator      *alloc,
                           Server         *server)
     {
       /* policy goes here */
       ...
     }
};

...

Rpc_entrypoint ep(&cap, STACK_SIZE, "slave_ep");
Policy         policy(ep);
Slave          slave(ep, policy, RAM_QUOTA);


                                  Genode OS Framework - Compositions              31
Outline



1. Virtualization techniques


2. Enslaving services


3. Dynamic workloads


4. Current ventures




                        Genode OS Framework - Compositions   32
Challenges of dynamic systems



Typical problems of dynamic systems
    Clean revocation of resources

    Run-time discovery

    Dynamic policies

    Run-time adaptive components




                       Genode OS Framework - Compositions   33
Orderly destruction of subsystems


Challenges
    Resource leaks
    Dangling references
    Locked resources
    Used servers need cleanup


Genode comes with simple solution
   Parent closes all sessions in reverse order

→ Server side: looks like client closes session
→ Resource donations are reverted
→ Works for arbitrarily complex subsystems

                       Genode OS Framework - Compositions   34
Boot medium detection




          Genode OS Framework - Compositions   35
Boot medium detection (2)




          Genode OS Framework - Compositions   36
Boot medium detection (3)




          Genode OS Framework - Compositions   37
Dynamic system configuration




Problems
   Change screen resolution at runtime
   Audio-mixing parameters
   Touchscreen calibration
   Resizing terminal windows
   Policy for hot-plugged device resources




                    Genode OS Framework - Compositions   38
Dynamic system configuration (2)



Straight-forward approach
   Introduce problem-specific RPC interfaces


Disadvantages
    New RPC interfaces → added complexity

    Specific to the server implementation

    Redundancy to existing (static) configuration concept




                     Genode OS Framework - Compositions    39
Dynamic system configuration (3)




Generalized solution
    Turn static config mechanism into dynamic mechanism
How?
    Add single RPC function to ROM session interface:
    void sigh(Signal_context_capability sigh)
    Client responds to signal by re-acquiring session resources




                       Genode OS Framework - Compositions         40
Dynamic system configuration (4)




          Genode OS Framework - Compositions   41
Adaptable session interfaces




Pattern
    Install signal handler
    Respond to session-update signals
    Change mode of operation
    Transactional semantics
→ works for ROM, framebuffer, terminal




                    Genode OS Framework - Compositions   42
Loader service


Challenges
    Start and stop subsystems at runtime
    Controlled by software
    Decouple started subsystem from controlling software


Solution
    Trusted loader service
    Client pays
    Client configures subsystem
    Client cannot interfere during runtime



                     Genode OS Framework - Compositions    43
Loader service




           Genode OS Framework - Compositions   44
Loader service (2)




           Genode OS Framework - Compositions   45
Loader service (3)




           Genode OS Framework - Compositions   46
Outline



1. Virtualization techniques


2. Enslaving services


3. Dynamic workloads


4. Current ventures




                        Genode OS Framework - Compositions   47
Big picture




           Eating our own dog food


Using Genode as our primary OS by the end of 2012




               Genode OS Framework - Compositions   48
Big picture (2)




           Genode OS Framework - Compositions   49
Big picture (3)




           Genode OS Framework - Compositions   50
Live CD


Present vision of Genode as general-purpose OS

Scenarios:

    Webkit-based web browser

    Media replay

    (Para-)virtualized Linux

    Running the tool chain

    On-target debugging using GDB


                     Genode OS Framework - Compositions   51
Genode on raw hardware

Typical base platform
   kernel (> 10,000 LOC) + core (10,000 LOC)

→ TCB > 20,000 LOC

Idea: Merge kernel and core
    Reduce redundant data structures
    → No in-kernel mapping data base
    → No memory allocation in kernel

    Simplify interaction of kernel ↔ roottask

    Solve kernel resource management problem
→ Core on bare machine (ARMv7): 13,000 LOC

                     Genode OS Framework - Compositions   52
Self-hosting


Goal: Compile Genode on Genode

Approach
    Noux runtime
    Use unmodified build system
What is working
  GNU GCC, binutils, bash, coreutils, make

Current topics
    Corner cases of POSIX API
    Stability
    Performance

                    Genode OS Framework - Compositions   53
Noux: Unix networking tools


Needed command-line tools
    netcat, wget, ...
    Lynx + SSL
    SSH


Approach
   Integrate lwIP into Noux runtime


→ One TCP/IP stack per Noux instances



                        Genode OS Framework - Compositions   54
File systems



Current implementations
    In-memory file system (ram fs)
    VFAT file system (ffat fs)
Desired
    Transactional file system
    Advanced block allocation (avoiding fragmentation)
    Compatibility to Linux




                    Genode OS Framework - Compositions   55
Vancouver virtual machine monitor


Faithful virtualization on NOVA
    Runs Linux as guest at near-native performance
Current state on Genode
    Bootstaps Fiasco.OC and Pistachio kernels
    No interrupts
Working topics
    Complement port with interrupts
    Booting Linux
    Integration with Genode session interfaces
    NIC, Block, Framebuffer, Input



                     Genode OS Framework - Compositions   56
Genode.org hosted on Genode



Ingredients
    Static genode.org website
    lwIP
    NIC drivers
Options
    Custom web server
    Web server ported via libc + libc lwip
    Web server running as Noux process




                     Genode OS Framework - Compositions   57
Linux - Capabilities via SCM rights


Idea
       File descriptors are process-local names
       capability

       Unix domain sockets can carry file descriptors
       capability delegation

       Messages can be sent to file descriptors
       capability invocation

       Run sub system within chroot environment
→ Capability-based security on Linux


                        Genode OS Framework - Compositions   58
ARM platform support




Current focus on OMAP4 (Pandaboard)
   HDMI
   USB HID
   Networking
   SD-card




                 Genode OS Framework - Compositions   59
Multi-processor support



Kernels support SMP in different ways
transparent Linux, Codezero
explicit API L4ka::Pistachio, NOVA, Fiasco.OC



Challenge: Platform-independent API


→ Similar problem to supporting real-time priorities




                      Genode OS Framework - Compositions   60
ARM TrustZone


Promises solution for mobile security problems
    Two worlds: secure and non-secure world

    Run Genode in secure world

    Run Linux in non-secure world


→ Genode bootstraps and supervises non-secure world

→ Genode implements security functions

→ Using base-hw platform


                    Genode OS Framework - Compositions   61
A lot more...

More light-weight device-driver environments
IOMMU support on NOVA
HelenOS Spartan kernel
OSS
Virtual NAT
Genode on FGPA softcores
Trusted computing
Network of Genode systems
New base platforms (Xen, Barrelfish, seL4)
Language runtimes (D, Rust, Haskell, Go)
                 Genode OS Framework - Compositions   62
Thank you



What we covered today                        What to do next...
Compositions                                 Get involved
 1.   Virtualization techniques                     Join the mailing list
 2.   Enslaving services                            Check out the issue tracker
 3.   Dynamic workloads                             Seek inspiration
 4.   Current ventures                              http://genode.org/about/challenges
                                                    Discuss your ideas
                                                    Start hacking!

                    More information and resources:
                        http://genode.org


                         Genode OS Framework - Compositions                              63

Contenu connexe

Tendances

Linux Timer device driver
Linux Timer device driverLinux Timer device driver
Linux Timer device driver艾鍗科技
 
VxWorks - Holistic Security (Art of Testing)
VxWorks - Holistic Security (Art of  Testing)VxWorks - Holistic Security (Art of  Testing)
VxWorks - Holistic Security (Art of Testing)Aditya K Sood
 
Smartcard vulnerabilities in modern banking malware
Smartcard vulnerabilities in modern banking malwareSmartcard vulnerabilities in modern banking malware
Smartcard vulnerabilities in modern banking malwareAlex Matrosov
 
Linux Initialization Process (2)
Linux Initialization Process (2)Linux Initialization Process (2)
Linux Initialization Process (2)shimosawa
 
RunX: deploy real-time OSes as containers at the edge
RunX: deploy real-time OSes as containers at the edgeRunX: deploy real-time OSes as containers at the edge
RunX: deploy real-time OSes as containers at the edgeStefano Stabellini
 
LCA13: Android Kernel Upstreaming: Overview & Status
LCA13: Android Kernel Upstreaming: Overview & StatusLCA13: Android Kernel Upstreaming: Overview & Status
LCA13: Android Kernel Upstreaming: Overview & StatusLinaro
 
Linux SD/MMC device driver
Linux SD/MMC device driverLinux SD/MMC device driver
Linux SD/MMC device driver艾鍗科技
 
Modern Bootkit Trends: Bypassing Kernel-Mode Signing Policy
Modern Bootkit Trends: Bypassing Kernel-Mode Signing PolicyModern Bootkit Trends: Bypassing Kernel-Mode Signing Policy
Modern Bootkit Trends: Bypassing Kernel-Mode Signing PolicyAlex Matrosov
 
Linux Porting
Linux PortingLinux Porting
Linux PortingChamp Yen
 
Lecture 6 Kernel Debugging + Ports Development
Lecture 6 Kernel Debugging + Ports DevelopmentLecture 6 Kernel Debugging + Ports Development
Lecture 6 Kernel Debugging + Ports DevelopmentMohammed Farrag
 
Lecture2 process structure and programming
Lecture2   process structure and programmingLecture2   process structure and programming
Lecture2 process structure and programmingMohammed Farrag
 
High Performance Storage Devices in the Linux Kernel
High Performance Storage Devices in the Linux KernelHigh Performance Storage Devices in the Linux Kernel
High Performance Storage Devices in the Linux KernelKernel TLV
 
Lecture 4 FreeBSD Security + FreeBSD Jails + MAC Security Framework
Lecture 4 FreeBSD Security + FreeBSD Jails + MAC Security FrameworkLecture 4 FreeBSD Security + FreeBSD Jails + MAC Security Framework
Lecture 4 FreeBSD Security + FreeBSD Jails + MAC Security FrameworkMohammed Farrag
 
Signature verification of kernel module and kexec
Signature verification of kernel module and kexecSignature verification of kernel module and kexec
Signature verification of kernel module and kexecjoeylikernel
 
Porting Xen Paravirtualization to MIPS Architecture
Porting Xen Paravirtualization to MIPS ArchitecturePorting Xen Paravirtualization to MIPS Architecture
Porting Xen Paravirtualization to MIPS ArchitectureThe Linux Foundation
 
Windows Internals for Linux Kernel Developers
Windows Internals for Linux Kernel DevelopersWindows Internals for Linux Kernel Developers
Windows Internals for Linux Kernel DevelopersKernel TLV
 
VM Forking and Hypervisor-based fuzzing
VM Forking and Hypervisor-based fuzzingVM Forking and Hypervisor-based fuzzing
VM Forking and Hypervisor-based fuzzingTamas K Lengyel
 

Tendances (20)

Linux Timer device driver
Linux Timer device driverLinux Timer device driver
Linux Timer device driver
 
VxWorks - Holistic Security (Art of Testing)
VxWorks - Holistic Security (Art of  Testing)VxWorks - Holistic Security (Art of  Testing)
VxWorks - Holistic Security (Art of Testing)
 
Smartcard vulnerabilities in modern banking malware
Smartcard vulnerabilities in modern banking malwareSmartcard vulnerabilities in modern banking malware
Smartcard vulnerabilities in modern banking malware
 
Linux Initialization Process (2)
Linux Initialization Process (2)Linux Initialization Process (2)
Linux Initialization Process (2)
 
RunX: deploy real-time OSes as containers at the edge
RunX: deploy real-time OSes as containers at the edgeRunX: deploy real-time OSes as containers at the edge
RunX: deploy real-time OSes as containers at the edge
 
Embedded linux network device driver development
Embedded linux network device driver developmentEmbedded linux network device driver development
Embedded linux network device driver development
 
LCA13: Android Kernel Upstreaming: Overview & Status
LCA13: Android Kernel Upstreaming: Overview & StatusLCA13: Android Kernel Upstreaming: Overview & Status
LCA13: Android Kernel Upstreaming: Overview & Status
 
Linux SD/MMC device driver
Linux SD/MMC device driverLinux SD/MMC device driver
Linux SD/MMC device driver
 
Modern Bootkit Trends: Bypassing Kernel-Mode Signing Policy
Modern Bootkit Trends: Bypassing Kernel-Mode Signing PolicyModern Bootkit Trends: Bypassing Kernel-Mode Signing Policy
Modern Bootkit Trends: Bypassing Kernel-Mode Signing Policy
 
Linux Porting
Linux PortingLinux Porting
Linux Porting
 
Lecture 6 Kernel Debugging + Ports Development
Lecture 6 Kernel Debugging + Ports DevelopmentLecture 6 Kernel Debugging + Ports Development
Lecture 6 Kernel Debugging + Ports Development
 
Lecture2 process structure and programming
Lecture2   process structure and programmingLecture2   process structure and programming
Lecture2 process structure and programming
 
High Performance Storage Devices in the Linux Kernel
High Performance Storage Devices in the Linux KernelHigh Performance Storage Devices in the Linux Kernel
High Performance Storage Devices in the Linux Kernel
 
Linux Internals Part - 3
Linux Internals Part - 3Linux Internals Part - 3
Linux Internals Part - 3
 
Lecture 4 FreeBSD Security + FreeBSD Jails + MAC Security Framework
Lecture 4 FreeBSD Security + FreeBSD Jails + MAC Security FrameworkLecture 4 FreeBSD Security + FreeBSD Jails + MAC Security Framework
Lecture 4 FreeBSD Security + FreeBSD Jails + MAC Security Framework
 
Signature verification of kernel module and kexec
Signature verification of kernel module and kexecSignature verification of kernel module and kexec
Signature verification of kernel module and kexec
 
Porting Xen Paravirtualization to MIPS Architecture
Porting Xen Paravirtualization to MIPS ArchitecturePorting Xen Paravirtualization to MIPS Architecture
Porting Xen Paravirtualization to MIPS Architecture
 
Windows Internals for Linux Kernel Developers
Windows Internals for Linux Kernel DevelopersWindows Internals for Linux Kernel Developers
Windows Internals for Linux Kernel Developers
 
Lecture1 Introduction
Lecture1  IntroductionLecture1  Introduction
Lecture1 Introduction
 
VM Forking and Hypervisor-based fuzzing
VM Forking and Hypervisor-based fuzzingVM Forking and Hypervisor-based fuzzing
VM Forking and Hypervisor-based fuzzing
 

Similaire à Genode Compositions

Direct Code Execution - LinuxCon Japan 2014
Direct Code Execution - LinuxCon Japan 2014Direct Code Execution - LinuxCon Japan 2014
Direct Code Execution - LinuxCon Japan 2014Hajime Tazaki
 
Intel DPDK Step by Step instructions
Intel DPDK Step by Step instructionsIntel DPDK Step by Step instructions
Intel DPDK Step by Step instructionsHisaki Ohara
 
Running Applications on the NetBSD Rump Kernel by Justin Cormack
Running Applications on the NetBSD Rump Kernel by Justin Cormack Running Applications on the NetBSD Rump Kernel by Justin Cormack
Running Applications on the NetBSD Rump Kernel by Justin Cormack eurobsdcon
 
Kernel Recipes 2015 - Kernel dump analysis
Kernel Recipes 2015 - Kernel dump analysisKernel Recipes 2015 - Kernel dump analysis
Kernel Recipes 2015 - Kernel dump analysisAnne Nicolas
 
Talk 160920 @ Cat System Workshop
Talk 160920 @ Cat System WorkshopTalk 160920 @ Cat System Workshop
Talk 160920 @ Cat System WorkshopQuey-Liang Kao
 
Cobbler, Func and Puppet: Tools for Large Scale Environments
Cobbler, Func and Puppet: Tools for Large Scale EnvironmentsCobbler, Func and Puppet: Tools for Large Scale Environments
Cobbler, Func and Puppet: Tools for Large Scale EnvironmentsMichael Zhang
 
Fedora Virtualization Day: Linux Containers & CRIU
Fedora Virtualization Day: Linux Containers & CRIUFedora Virtualization Day: Linux Containers & CRIU
Fedora Virtualization Day: Linux Containers & CRIUAndrey Vagin
 
Android 4.2 Internals - Bluetooth and Network
Android 4.2 Internals - Bluetooth and NetworkAndroid 4.2 Internals - Bluetooth and Network
Android 4.2 Internals - Bluetooth and NetworkCaio Pereira
 
syzkaller: the next gen kernel fuzzer
syzkaller: the next gen kernel fuzzersyzkaller: the next gen kernel fuzzer
syzkaller: the next gen kernel fuzzerDmitry Vyukov
 
2. Vagin. Linux containers. June 01, 2013
2. Vagin. Linux containers. June 01, 20132. Vagin. Linux containers. June 01, 2013
2. Vagin. Linux containers. June 01, 2013ru-fedora-moscow-2013
 
Network Stack in Userspace (NUSE)
Network Stack in Userspace (NUSE)Network Stack in Userspace (NUSE)
Network Stack in Userspace (NUSE)Hajime Tazaki
 
[OpenStack 하반기 스터디] Interoperability with ML2: LinuxBridge, OVS and SDN
[OpenStack 하반기 스터디] Interoperability with ML2: LinuxBridge, OVS and SDN[OpenStack 하반기 스터디] Interoperability with ML2: LinuxBridge, OVS and SDN
[OpenStack 하반기 스터디] Interoperability with ML2: LinuxBridge, OVS and SDNOpenStack Korea Community
 

Similaire à Genode Compositions (20)

App container rkt
App container rktApp container rkt
App container rkt
 
Direct Code Execution - LinuxCon Japan 2014
Direct Code Execution - LinuxCon Japan 2014Direct Code Execution - LinuxCon Japan 2014
Direct Code Execution - LinuxCon Japan 2014
 
Intel DPDK Step by Step instructions
Intel DPDK Step by Step instructionsIntel DPDK Step by Step instructions
Intel DPDK Step by Step instructions
 
RunX ELCE 2020
RunX ELCE 2020RunX ELCE 2020
RunX ELCE 2020
 
LSA2 - 02 Namespaces
LSA2 - 02  NamespacesLSA2 - 02  Namespaces
LSA2 - 02 Namespaces
 
Running Applications on the NetBSD Rump Kernel by Justin Cormack
Running Applications on the NetBSD Rump Kernel by Justin Cormack Running Applications on the NetBSD Rump Kernel by Justin Cormack
Running Applications on the NetBSD Rump Kernel by Justin Cormack
 
Kernel Recipes 2015 - Kernel dump analysis
Kernel Recipes 2015 - Kernel dump analysisKernel Recipes 2015 - Kernel dump analysis
Kernel Recipes 2015 - Kernel dump analysis
 
Talk 160920 @ Cat System Workshop
Talk 160920 @ Cat System WorkshopTalk 160920 @ Cat System Workshop
Talk 160920 @ Cat System Workshop
 
Building
BuildingBuilding
Building
 
淺談探索 Linux 系統設計之道
淺談探索 Linux 系統設計之道 淺談探索 Linux 系統設計之道
淺談探索 Linux 系統設計之道
 
Cobbler, Func and Puppet: Tools for Large Scale Environments
Cobbler, Func and Puppet: Tools for Large Scale EnvironmentsCobbler, Func and Puppet: Tools for Large Scale Environments
Cobbler, Func and Puppet: Tools for Large Scale Environments
 
Cobbler, Func and Puppet: Tools for Large Scale Environments
Cobbler, Func and Puppet: Tools for Large Scale EnvironmentsCobbler, Func and Puppet: Tools for Large Scale Environments
Cobbler, Func and Puppet: Tools for Large Scale Environments
 
Fedora Virtualization Day: Linux Containers & CRIU
Fedora Virtualization Day: Linux Containers & CRIUFedora Virtualization Day: Linux Containers & CRIU
Fedora Virtualization Day: Linux Containers & CRIU
 
Android 4.2 Internals - Bluetooth and Network
Android 4.2 Internals - Bluetooth and NetworkAndroid 4.2 Internals - Bluetooth and Network
Android 4.2 Internals - Bluetooth and Network
 
Genode Programming
Genode ProgrammingGenode Programming
Genode Programming
 
syzkaller: the next gen kernel fuzzer
syzkaller: the next gen kernel fuzzersyzkaller: the next gen kernel fuzzer
syzkaller: the next gen kernel fuzzer
 
Rac on NFS
Rac on NFSRac on NFS
Rac on NFS
 
2. Vagin. Linux containers. June 01, 2013
2. Vagin. Linux containers. June 01, 20132. Vagin. Linux containers. June 01, 2013
2. Vagin. Linux containers. June 01, 2013
 
Network Stack in Userspace (NUSE)
Network Stack in Userspace (NUSE)Network Stack in Userspace (NUSE)
Network Stack in Userspace (NUSE)
 
[OpenStack 하반기 스터디] Interoperability with ML2: LinuxBridge, OVS and SDN
[OpenStack 하반기 스터디] Interoperability with ML2: LinuxBridge, OVS and SDN[OpenStack 하반기 스터디] Interoperability with ML2: LinuxBridge, OVS and SDN
[OpenStack 하반기 스터디] Interoperability with ML2: LinuxBridge, OVS and SDN
 

Plus de Vasily Sartakov

Мейнстрим технологии шифрованной памяти
Мейнстрим технологии шифрованной памятиМейнстрим технологии шифрованной памяти
Мейнстрим технологии шифрованной памятиVasily Sartakov
 
RnD Collaborations in Asia-Pacific Region
RnD Collaborations in Asia-Pacific RegionRnD Collaborations in Asia-Pacific Region
RnD Collaborations in Asia-Pacific RegionVasily Sartakov
 
Сетевая подсистема в L4Re и Genode
Сетевая подсистема в L4Re и GenodeСетевая подсистема в L4Re и Genode
Сетевая подсистема в L4Re и GenodeVasily Sartakov
 
Защита памяти при помощи NX-bit в среде L4Re
Защита памяти при помощи NX-bit в среде L4ReЗащита памяти при помощи NX-bit в среде L4Re
Защита памяти при помощи NX-bit в среде L4ReVasily Sartakov
 
Hardware Errors and the OS
Hardware Errors and the OSHardware Errors and the OS
Hardware Errors and the OSVasily Sartakov
 
Operating Systems Meet Fault Tolerance
Operating Systems Meet Fault ToleranceOperating Systems Meet Fault Tolerance
Operating Systems Meet Fault ToleranceVasily Sartakov
 
Operating Systems Hardening
Operating Systems HardeningOperating Systems Hardening
Operating Systems HardeningVasily Sartakov
 
Особенности Национального RnD
Особенности Национального RnDОсобенности Национального RnD
Особенности Национального RnDVasily Sartakov
 
Introduction to Microkernels
Introduction to MicrokernelsIntroduction to Microkernels
Introduction to MicrokernelsVasily Sartakov
 
Advanced Components on Top of L4Re
Advanced Components on Top of L4ReAdvanced Components on Top of L4Re
Advanced Components on Top of L4ReVasily Sartakov
 
Применение Fiasco.OC
Применение Fiasco.OCПрименение Fiasco.OC
Применение Fiasco.OCVasily Sartakov
 
Прикладная Информатика 6 (36) 2011
Прикладная Информатика 6 (36) 2011Прикладная Информатика 6 (36) 2011
Прикладная Информатика 6 (36) 2011Vasily Sartakov
 
Разработка встраиваемой операционной системы на базе микроядерной архитектуры...
Разработка встраиваемой операционной системы на базе микроядерной архитектуры...Разработка встраиваемой операционной системы на базе микроядерной архитектуры...
Разработка встраиваемой операционной системы на базе микроядерной архитектуры...Vasily Sartakov
 
Образование, наука, бизнес. Сегодня, завтра, послезавтра
Образование, наука, бизнес. Сегодня, завтра, послезавтраОбразование, наука, бизнес. Сегодня, завтра, послезавтра
Образование, наука, бизнес. Сегодня, завтра, послезавтраVasily Sartakov
 

Plus de Vasily Sartakov (20)

Мейнстрим технологии шифрованной памяти
Мейнстрим технологии шифрованной памятиМейнстрим технологии шифрованной памяти
Мейнстрим технологии шифрованной памяти
 
RnD Collaborations in Asia-Pacific Region
RnD Collaborations in Asia-Pacific RegionRnD Collaborations in Asia-Pacific Region
RnD Collaborations in Asia-Pacific Region
 
Сетевая подсистема в L4Re и Genode
Сетевая подсистема в L4Re и GenodeСетевая подсистема в L4Re и Genode
Сетевая подсистема в L4Re и Genode
 
Защита памяти при помощи NX-bit в среде L4Re
Защита памяти при помощи NX-bit в среде L4ReЗащита памяти при помощи NX-bit в среде L4Re
Защита памяти при помощи NX-bit в среде L4Re
 
Hardware Errors and the OS
Hardware Errors and the OSHardware Errors and the OS
Hardware Errors and the OS
 
Operating Systems Meet Fault Tolerance
Operating Systems Meet Fault ToleranceOperating Systems Meet Fault Tolerance
Operating Systems Meet Fault Tolerance
 
Intro
IntroIntro
Intro
 
Genode OS Framework
Genode OS FrameworkGenode OS Framework
Genode OS Framework
 
Operating Systems Hardening
Operating Systems HardeningOperating Systems Hardening
Operating Systems Hardening
 
Особенности Национального RnD
Особенности Национального RnDОсобенности Национального RnD
Особенности Национального RnD
 
Trusted Computing Base
Trusted Computing BaseTrusted Computing Base
Trusted Computing Base
 
System Integrity
System IntegritySystem Integrity
System Integrity
 
Intro
IntroIntro
Intro
 
Memory, IPC and L4Re
Memory, IPC and L4ReMemory, IPC and L4Re
Memory, IPC and L4Re
 
Introduction to Microkernels
Introduction to MicrokernelsIntroduction to Microkernels
Introduction to Microkernels
 
Advanced Components on Top of L4Re
Advanced Components on Top of L4ReAdvanced Components on Top of L4Re
Advanced Components on Top of L4Re
 
Применение Fiasco.OC
Применение Fiasco.OCПрименение Fiasco.OC
Применение Fiasco.OC
 
Прикладная Информатика 6 (36) 2011
Прикладная Информатика 6 (36) 2011Прикладная Информатика 6 (36) 2011
Прикладная Информатика 6 (36) 2011
 
Разработка встраиваемой операционной системы на базе микроядерной архитектуры...
Разработка встраиваемой операционной системы на базе микроядерной архитектуры...Разработка встраиваемой операционной системы на базе микроядерной архитектуры...
Разработка встраиваемой операционной системы на базе микроядерной архитектуры...
 
Образование, наука, бизнес. Сегодня, завтра, послезавтра
Образование, наука, бизнес. Сегодня, завтра, послезавтраОбразование, наука, бизнес. Сегодня, завтра, послезавтра
Образование, наука, бизнес. Сегодня, завтра, послезавтра
 

Dernier

Q-Factor General Quiz-7th April 2024, Quiz Club NITW
Q-Factor General Quiz-7th April 2024, Quiz Club NITWQ-Factor General Quiz-7th April 2024, Quiz Club NITW
Q-Factor General Quiz-7th April 2024, Quiz Club NITWQuiz Club NITW
 
Tree View Decoration Attribute in the Odoo 17
Tree View Decoration Attribute in the Odoo 17Tree View Decoration Attribute in the Odoo 17
Tree View Decoration Attribute in the Odoo 17Celine George
 
Q4-PPT-Music9_Lesson-1-Romantic-Opera.pptx
Q4-PPT-Music9_Lesson-1-Romantic-Opera.pptxQ4-PPT-Music9_Lesson-1-Romantic-Opera.pptx
Q4-PPT-Music9_Lesson-1-Romantic-Opera.pptxlancelewisportillo
 
Scientific Writing :Research Discourse
Scientific  Writing :Research  DiscourseScientific  Writing :Research  Discourse
Scientific Writing :Research DiscourseAnita GoswamiGiri
 
Team Lead Succeed – Helping you and your team achieve high-performance teamwo...
Team Lead Succeed – Helping you and your team achieve high-performance teamwo...Team Lead Succeed – Helping you and your team achieve high-performance teamwo...
Team Lead Succeed – Helping you and your team achieve high-performance teamwo...Association for Project Management
 
How to Make a Duplicate of Your Odoo 17 Database
How to Make a Duplicate of Your Odoo 17 DatabaseHow to Make a Duplicate of Your Odoo 17 Database
How to Make a Duplicate of Your Odoo 17 DatabaseCeline George
 
ICS2208 Lecture6 Notes for SL spaces.pdf
ICS2208 Lecture6 Notes for SL spaces.pdfICS2208 Lecture6 Notes for SL spaces.pdf
ICS2208 Lecture6 Notes for SL spaces.pdfVanessa Camilleri
 
Transaction Management in Database Management System
Transaction Management in Database Management SystemTransaction Management in Database Management System
Transaction Management in Database Management SystemChristalin Nelson
 
DIFFERENT BASKETRY IN THE PHILIPPINES PPT.pptx
DIFFERENT BASKETRY IN THE PHILIPPINES PPT.pptxDIFFERENT BASKETRY IN THE PHILIPPINES PPT.pptx
DIFFERENT BASKETRY IN THE PHILIPPINES PPT.pptxMichelleTuguinay1
 
CHEST Proprioceptive neuromuscular facilitation.pptx
CHEST Proprioceptive neuromuscular facilitation.pptxCHEST Proprioceptive neuromuscular facilitation.pptx
CHEST Proprioceptive neuromuscular facilitation.pptxAneriPatwari
 
Q-Factor HISPOL Quiz-6th April 2024, Quiz Club NITW
Q-Factor HISPOL Quiz-6th April 2024, Quiz Club NITWQ-Factor HISPOL Quiz-6th April 2024, Quiz Club NITW
Q-Factor HISPOL Quiz-6th April 2024, Quiz Club NITWQuiz Club NITW
 
Daily Lesson Plan in Mathematics Quarter 4
Daily Lesson Plan in Mathematics Quarter 4Daily Lesson Plan in Mathematics Quarter 4
Daily Lesson Plan in Mathematics Quarter 4JOYLYNSAMANIEGO
 
4.16.24 Poverty and Precarity--Desmond.pptx
4.16.24 Poverty and Precarity--Desmond.pptx4.16.24 Poverty and Precarity--Desmond.pptx
4.16.24 Poverty and Precarity--Desmond.pptxmary850239
 
ClimART Action | eTwinning Project
ClimART Action    |    eTwinning ProjectClimART Action    |    eTwinning Project
ClimART Action | eTwinning Projectjordimapav
 
Congestive Cardiac Failure..presentation
Congestive Cardiac Failure..presentationCongestive Cardiac Failure..presentation
Congestive Cardiac Failure..presentationdeepaannamalai16
 
Beauty Amidst the Bytes_ Unearthing Unexpected Advantages of the Digital Wast...
Beauty Amidst the Bytes_ Unearthing Unexpected Advantages of the Digital Wast...Beauty Amidst the Bytes_ Unearthing Unexpected Advantages of the Digital Wast...
Beauty Amidst the Bytes_ Unearthing Unexpected Advantages of the Digital Wast...DhatriParmar
 
How to Manage Buy 3 Get 1 Free in Odoo 17
How to Manage Buy 3 Get 1 Free in Odoo 17How to Manage Buy 3 Get 1 Free in Odoo 17
How to Manage Buy 3 Get 1 Free in Odoo 17Celine George
 
Narcotic and Non Narcotic Analgesic..pdf
Narcotic and Non Narcotic Analgesic..pdfNarcotic and Non Narcotic Analgesic..pdf
Narcotic and Non Narcotic Analgesic..pdfPrerana Jadhav
 
Decoding the Tweet _ Practical Criticism in the Age of Hashtag.pptx
Decoding the Tweet _ Practical Criticism in the Age of Hashtag.pptxDecoding the Tweet _ Practical Criticism in the Age of Hashtag.pptx
Decoding the Tweet _ Practical Criticism in the Age of Hashtag.pptxDhatriParmar
 
4.16.24 21st Century Movements for Black Lives.pptx
4.16.24 21st Century Movements for Black Lives.pptx4.16.24 21st Century Movements for Black Lives.pptx
4.16.24 21st Century Movements for Black Lives.pptxmary850239
 

Dernier (20)

Q-Factor General Quiz-7th April 2024, Quiz Club NITW
Q-Factor General Quiz-7th April 2024, Quiz Club NITWQ-Factor General Quiz-7th April 2024, Quiz Club NITW
Q-Factor General Quiz-7th April 2024, Quiz Club NITW
 
Tree View Decoration Attribute in the Odoo 17
Tree View Decoration Attribute in the Odoo 17Tree View Decoration Attribute in the Odoo 17
Tree View Decoration Attribute in the Odoo 17
 
Q4-PPT-Music9_Lesson-1-Romantic-Opera.pptx
Q4-PPT-Music9_Lesson-1-Romantic-Opera.pptxQ4-PPT-Music9_Lesson-1-Romantic-Opera.pptx
Q4-PPT-Music9_Lesson-1-Romantic-Opera.pptx
 
Scientific Writing :Research Discourse
Scientific  Writing :Research  DiscourseScientific  Writing :Research  Discourse
Scientific Writing :Research Discourse
 
Team Lead Succeed – Helping you and your team achieve high-performance teamwo...
Team Lead Succeed – Helping you and your team achieve high-performance teamwo...Team Lead Succeed – Helping you and your team achieve high-performance teamwo...
Team Lead Succeed – Helping you and your team achieve high-performance teamwo...
 
How to Make a Duplicate of Your Odoo 17 Database
How to Make a Duplicate of Your Odoo 17 DatabaseHow to Make a Duplicate of Your Odoo 17 Database
How to Make a Duplicate of Your Odoo 17 Database
 
ICS2208 Lecture6 Notes for SL spaces.pdf
ICS2208 Lecture6 Notes for SL spaces.pdfICS2208 Lecture6 Notes for SL spaces.pdf
ICS2208 Lecture6 Notes for SL spaces.pdf
 
Transaction Management in Database Management System
Transaction Management in Database Management SystemTransaction Management in Database Management System
Transaction Management in Database Management System
 
DIFFERENT BASKETRY IN THE PHILIPPINES PPT.pptx
DIFFERENT BASKETRY IN THE PHILIPPINES PPT.pptxDIFFERENT BASKETRY IN THE PHILIPPINES PPT.pptx
DIFFERENT BASKETRY IN THE PHILIPPINES PPT.pptx
 
CHEST Proprioceptive neuromuscular facilitation.pptx
CHEST Proprioceptive neuromuscular facilitation.pptxCHEST Proprioceptive neuromuscular facilitation.pptx
CHEST Proprioceptive neuromuscular facilitation.pptx
 
Q-Factor HISPOL Quiz-6th April 2024, Quiz Club NITW
Q-Factor HISPOL Quiz-6th April 2024, Quiz Club NITWQ-Factor HISPOL Quiz-6th April 2024, Quiz Club NITW
Q-Factor HISPOL Quiz-6th April 2024, Quiz Club NITW
 
Daily Lesson Plan in Mathematics Quarter 4
Daily Lesson Plan in Mathematics Quarter 4Daily Lesson Plan in Mathematics Quarter 4
Daily Lesson Plan in Mathematics Quarter 4
 
4.16.24 Poverty and Precarity--Desmond.pptx
4.16.24 Poverty and Precarity--Desmond.pptx4.16.24 Poverty and Precarity--Desmond.pptx
4.16.24 Poverty and Precarity--Desmond.pptx
 
ClimART Action | eTwinning Project
ClimART Action    |    eTwinning ProjectClimART Action    |    eTwinning Project
ClimART Action | eTwinning Project
 
Congestive Cardiac Failure..presentation
Congestive Cardiac Failure..presentationCongestive Cardiac Failure..presentation
Congestive Cardiac Failure..presentation
 
Beauty Amidst the Bytes_ Unearthing Unexpected Advantages of the Digital Wast...
Beauty Amidst the Bytes_ Unearthing Unexpected Advantages of the Digital Wast...Beauty Amidst the Bytes_ Unearthing Unexpected Advantages of the Digital Wast...
Beauty Amidst the Bytes_ Unearthing Unexpected Advantages of the Digital Wast...
 
How to Manage Buy 3 Get 1 Free in Odoo 17
How to Manage Buy 3 Get 1 Free in Odoo 17How to Manage Buy 3 Get 1 Free in Odoo 17
How to Manage Buy 3 Get 1 Free in Odoo 17
 
Narcotic and Non Narcotic Analgesic..pdf
Narcotic and Non Narcotic Analgesic..pdfNarcotic and Non Narcotic Analgesic..pdf
Narcotic and Non Narcotic Analgesic..pdf
 
Decoding the Tweet _ Practical Criticism in the Age of Hashtag.pptx
Decoding the Tweet _ Practical Criticism in the Age of Hashtag.pptxDecoding the Tweet _ Practical Criticism in the Age of Hashtag.pptx
Decoding the Tweet _ Practical Criticism in the Age of Hashtag.pptx
 
4.16.24 21st Century Movements for Black Lives.pptx
4.16.24 21st Century Movements for Black Lives.pptx4.16.24 21st Century Movements for Black Lives.pptx
4.16.24 21st Century Movements for Black Lives.pptx
 

Genode Compositions

  • 1. Genode OS Framework - Compositions Norman Feske <norman.feske@genode-labs.com>
  • 2. Outline 1. Virtualization techniques 2. Enslaving services 3. Dynamic workloads 4. Current ventures Genode OS Framework - Compositions 2
  • 3. Outline 1. Virtualization techniques 2. Enslaving services 3. Dynamic workloads 4. Current ventures Genode OS Framework - Compositions 3
  • 4. Virtualization techniques Flavors Faithful → virtual hardware platform Para → modified guest OS kernel OS-level → source-level user-land compatibility Process-level → tailored process environment C-runtime → tailored runtime within process Genode OS Framework - Compositions 4
  • 5. Faithful virtualization Requires CPU and kernel with virtualization support → Intel VT, AMD SVM, ARM Cortex-A15 → NOVA, Fiasco.OC (not supported yet) VMM emulates complete platform (CPU+memory+devices) No guest OS modifications required Genode OS Framework - Compositions 5
  • 6. Faithful virtualization (2) Genode OS Framework - Compositions 6
  • 7. Faithful virtualization (3) <config> <machine> <mem start="0x0" end="0xa0000"/> <mem start="0x100000" end="0x2000000"/> <nullio io_base="0x80" /> <pic io_base="0x20" elcr_base="0x4d0"/> <pic io_base="0xa0" irq="2" elcr_base="0x4d1"/> <pit io_base="0x40" irq="0"/> <scp io_port_a="0x92" io_port_b="0x61"/> <kbc io_base="0x60" irq_kbd="1" irq_aux="12"/> <keyb ps2_port="0" host_keyboard="0x10000"/> <mouse ps2_port="1" host_mouse="0x10001"/> <rtc io_base="0x70" irq="8"/> <serial io_base="0x3f8" irq="0x4" host_serial="0x4711"/> <hostsink host_dev="0x4712" buffer="80"/> <vga io_base="0x03c0"/> <vbios_disk/> <vbios_keyboard/> <vbios_mem/> <vbios_time/> <vbios_reset/> <vbios_multiboot/> <msi/> <ioapic/> <pcihostbridge bus_num="0" bus_count="0x10" io_base="0xcf8" mem_base="0xe0000000"/> <pmtimer io_port="0x8000"/> <vcpu/> <halifax/> <vbios/> <lapic/> </machine> <multiboot> <rom name="bootstrap"/> <rom name="fiasco"/> <rom name="sigma0.foc"/> <rom name="core.foc"/> </multiboot> </config> Genode OS Framework - Compositions 7
  • 8. Paravirtualization No virtualization support needed → Can be used on current ARM platforms Guest OS ported to virtual platform Binary compatible to guest OS userland Guest OS kernel must be modified → Solution inherently base-platform specific L4Linux for Fiasco.OC OKLinux for OKL4 → Ongoing maintenance work Genode OS Framework - Compositions 8
  • 9. Paravirtualization (2) Genode OS Framework - Compositions 9
  • 10. Paravirtualization (3) Stub drivers Terminal → character device Block → block device NIC → net device Framebuffer → /dev/fb* device Input → /dev/input/* device Nitpicker → ioctl extension to /dev/fb* (OKLinux only) Audio out → ALSA (OKLinux only) no direct hardware access Genode OS Framework - Compositions 10
  • 11. OS-level virtualization Idea: Provide Unix kernel interface as a service fundamentals networking write, read socket stat, lstat, fstat, fcntl getsockopt, setsockopt ioctl accept open, close, lseek bind dirent listen getcwd, fchdir send, sendto select recv, recvfrom execve, fork, wait4 getpeername getpid shutdown pipe connect dup2 getaddrinfo unlink, rename, mkdir In contrast, Linux has more than 300 syscalls Genode OS Framework - Compositions 11
  • 12. OS-level virtualization (2) Things we don’t need to consider Interaction with device drivers Unix initialization sequence Users, groups Instance never shared by multiple users The opposite: One user may run many instances Multi-threading Scalability of a single instance Each instance serves one specific (limited) purpose Run many instances in order to scale! Genode OS Framework - Compositions 12
  • 13. OS-level virtualization (3) Genode OS Framework - Compositions 13
  • 14. Noux: Running VIM noux config <config> <fstab> <tar name="vim.tar" /> </fstab> <start name="/bin/vim"> <env name="TERM" value="linux" /> <arg value="--noplugin" /> <arg value="-n" /> <!-- no swap file --> <arg value="-N" /> <!-- no-compatible mode --> </start> </config> Genode OS Framework - Compositions 14
  • 15. Noux: Bash + file system noux config <config> <fstab> <tar name="coreutils.tar" /> <tar name="vim.tar" /> <tar name="bash.tar" /> <dir name="home"> <fs label="home" /> </dir> <dir name="ram"> <fs label="root" /> </dir> <dir name="tmp"> <fs label="tmp" /> </dir> </fstab> <start name="/bin/bash"> <env name="TERM" value="linux" /> </start> </config> Genode OS Framework - Compositions 15
  • 16. Noux: Bash + file system (2) ram fs config <config> <content> <dir name="tmp"> <rom name="init" as="something" /> </dir> <dir name="home"> <dir name="user"> <rom name="timer" /> </dir> </dir> </content> <policy label="noux -> root" root="/" /> <policy label="noux -> home" root="/home/user" writeable="yes" /> <policy label="noux -> tmp" root="/tmp" writeable="yes" /> </config> Genode OS Framework - Compositions 16
  • 17. Noux features Executes unmodified GNU software Bash, VIM, GCC, Coreutils, Lynx, GDB... Supports stacked file systems Instance starts in fraction of a second Uses original GNU build system → Porting is easy Two versions noux/minimal noux/net (includes TCP/IP) less than 5,000 LOC Genode OS Framework - Compositions 17
  • 18. Process-level virtualization Opportunity: Virtualization of individual session interfaces Monitoring of session requests Customization of existing services → Reuse of existing components → Separation of policy and mechanisms Genode OS Framework - Compositions 18
  • 19. Process-level virtualization (2) Genode OS Framework - Compositions 19
  • 20. Process-level virtualization (3) Genode OS Framework - Compositions 20
  • 21. Process-level virtualization (4) Genode OS Framework - Compositions 21
  • 22. GDB monitor features Supported on Fiasco.OC and OKL4 Break-in by user or segfault Source-level debugging Backtraces Breakpoints Single-stepping Debugging of multi-threaded processes Debugging of dynamically linked binaries Genode OS Framework - Compositions 22
  • 23. C-runtime customization FreeBSD libc turned into modular C runtime libports/lib/mk/libc.mk libports/lib/mk/libc log.mk libports/lib/mk/libc fs.mk libports/lib/mk/libc rom.mk libports/lib/mk/libc lwip.mk libports/lib/mk/libc ffat.mk libports/lib/mk/libc lock pipe.mk → application-specific plugins Genode OS Framework - Compositions 23
  • 24. C-runtime customization example Genode OS Framework - Compositions 24
  • 25. C-runtime customization example (2) Genode OS Framework - Compositions 25
  • 26. C-runtime customization example (3) Genode OS Framework - Compositions 26
  • 27. Outline 1. Virtualization techniques 2. Enslaving services 3. Dynamic workloads 4. Current ventures Genode OS Framework - Compositions 27
  • 28. Enslaving services Idea: Run a service as a child Sandboxing Easy code reuse Plugin mechanism Genode OS Framework - Compositions 28
  • 29. Media player Genode OS Framework - Compositions 29
  • 30. Media player (2) Genode OS Framework - Compositions 30
  • 31. Slave API helper #include <os/slave.h> ... struct Policy : Slave_policy { char const **_permitted_services() const { static char const *permitted_services[] = { "CAP", "RM", "RAM", "LOG", 0 }; return permitted_services; }; Policy(Rpc_entrypoint &slave_ep) : Slave_policy("ram_fs", slave_ep) { } bool announce_service(const char *service_name, Root_capability root, Allocator *alloc, Server *server) { /* policy goes here */ ... } }; ... Rpc_entrypoint ep(&cap, STACK_SIZE, "slave_ep"); Policy policy(ep); Slave slave(ep, policy, RAM_QUOTA); Genode OS Framework - Compositions 31
  • 32. Outline 1. Virtualization techniques 2. Enslaving services 3. Dynamic workloads 4. Current ventures Genode OS Framework - Compositions 32
  • 33. Challenges of dynamic systems Typical problems of dynamic systems Clean revocation of resources Run-time discovery Dynamic policies Run-time adaptive components Genode OS Framework - Compositions 33
  • 34. Orderly destruction of subsystems Challenges Resource leaks Dangling references Locked resources Used servers need cleanup Genode comes with simple solution Parent closes all sessions in reverse order → Server side: looks like client closes session → Resource donations are reverted → Works for arbitrarily complex subsystems Genode OS Framework - Compositions 34
  • 35. Boot medium detection Genode OS Framework - Compositions 35
  • 36. Boot medium detection (2) Genode OS Framework - Compositions 36
  • 37. Boot medium detection (3) Genode OS Framework - Compositions 37
  • 38. Dynamic system configuration Problems Change screen resolution at runtime Audio-mixing parameters Touchscreen calibration Resizing terminal windows Policy for hot-plugged device resources Genode OS Framework - Compositions 38
  • 39. Dynamic system configuration (2) Straight-forward approach Introduce problem-specific RPC interfaces Disadvantages New RPC interfaces → added complexity Specific to the server implementation Redundancy to existing (static) configuration concept Genode OS Framework - Compositions 39
  • 40. Dynamic system configuration (3) Generalized solution Turn static config mechanism into dynamic mechanism How? Add single RPC function to ROM session interface: void sigh(Signal_context_capability sigh) Client responds to signal by re-acquiring session resources Genode OS Framework - Compositions 40
  • 41. Dynamic system configuration (4) Genode OS Framework - Compositions 41
  • 42. Adaptable session interfaces Pattern Install signal handler Respond to session-update signals Change mode of operation Transactional semantics → works for ROM, framebuffer, terminal Genode OS Framework - Compositions 42
  • 43. Loader service Challenges Start and stop subsystems at runtime Controlled by software Decouple started subsystem from controlling software Solution Trusted loader service Client pays Client configures subsystem Client cannot interfere during runtime Genode OS Framework - Compositions 43
  • 44. Loader service Genode OS Framework - Compositions 44
  • 45. Loader service (2) Genode OS Framework - Compositions 45
  • 46. Loader service (3) Genode OS Framework - Compositions 46
  • 47. Outline 1. Virtualization techniques 2. Enslaving services 3. Dynamic workloads 4. Current ventures Genode OS Framework - Compositions 47
  • 48. Big picture Eating our own dog food Using Genode as our primary OS by the end of 2012 Genode OS Framework - Compositions 48
  • 49. Big picture (2) Genode OS Framework - Compositions 49
  • 50. Big picture (3) Genode OS Framework - Compositions 50
  • 51. Live CD Present vision of Genode as general-purpose OS Scenarios: Webkit-based web browser Media replay (Para-)virtualized Linux Running the tool chain On-target debugging using GDB Genode OS Framework - Compositions 51
  • 52. Genode on raw hardware Typical base platform kernel (> 10,000 LOC) + core (10,000 LOC) → TCB > 20,000 LOC Idea: Merge kernel and core Reduce redundant data structures → No in-kernel mapping data base → No memory allocation in kernel Simplify interaction of kernel ↔ roottask Solve kernel resource management problem → Core on bare machine (ARMv7): 13,000 LOC Genode OS Framework - Compositions 52
  • 53. Self-hosting Goal: Compile Genode on Genode Approach Noux runtime Use unmodified build system What is working GNU GCC, binutils, bash, coreutils, make Current topics Corner cases of POSIX API Stability Performance Genode OS Framework - Compositions 53
  • 54. Noux: Unix networking tools Needed command-line tools netcat, wget, ... Lynx + SSL SSH Approach Integrate lwIP into Noux runtime → One TCP/IP stack per Noux instances Genode OS Framework - Compositions 54
  • 55. File systems Current implementations In-memory file system (ram fs) VFAT file system (ffat fs) Desired Transactional file system Advanced block allocation (avoiding fragmentation) Compatibility to Linux Genode OS Framework - Compositions 55
  • 56. Vancouver virtual machine monitor Faithful virtualization on NOVA Runs Linux as guest at near-native performance Current state on Genode Bootstaps Fiasco.OC and Pistachio kernels No interrupts Working topics Complement port with interrupts Booting Linux Integration with Genode session interfaces NIC, Block, Framebuffer, Input Genode OS Framework - Compositions 56
  • 57. Genode.org hosted on Genode Ingredients Static genode.org website lwIP NIC drivers Options Custom web server Web server ported via libc + libc lwip Web server running as Noux process Genode OS Framework - Compositions 57
  • 58. Linux - Capabilities via SCM rights Idea File descriptors are process-local names capability Unix domain sockets can carry file descriptors capability delegation Messages can be sent to file descriptors capability invocation Run sub system within chroot environment → Capability-based security on Linux Genode OS Framework - Compositions 58
  • 59. ARM platform support Current focus on OMAP4 (Pandaboard) HDMI USB HID Networking SD-card Genode OS Framework - Compositions 59
  • 60. Multi-processor support Kernels support SMP in different ways transparent Linux, Codezero explicit API L4ka::Pistachio, NOVA, Fiasco.OC Challenge: Platform-independent API → Similar problem to supporting real-time priorities Genode OS Framework - Compositions 60
  • 61. ARM TrustZone Promises solution for mobile security problems Two worlds: secure and non-secure world Run Genode in secure world Run Linux in non-secure world → Genode bootstraps and supervises non-secure world → Genode implements security functions → Using base-hw platform Genode OS Framework - Compositions 61
  • 62. A lot more... More light-weight device-driver environments IOMMU support on NOVA HelenOS Spartan kernel OSS Virtual NAT Genode on FGPA softcores Trusted computing Network of Genode systems New base platforms (Xen, Barrelfish, seL4) Language runtimes (D, Rust, Haskell, Go) Genode OS Framework - Compositions 62
  • 63. Thank you What we covered today What to do next... Compositions Get involved 1. Virtualization techniques Join the mailing list 2. Enslaving services Check out the issue tracker 3. Dynamic workloads Seek inspiration 4. Current ventures http://genode.org/about/challenges Discuss your ideas Start hacking! More information and resources: http://genode.org Genode OS Framework - Compositions 63