SlideShare ist ein Scribd-Unternehmen logo
1 von 55
Downloaden Sie, um offline zu lesen
Genode OS Framework - Components




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



1. Classification of components

2. Kernelization example

3. Unified configuration concept

4. Session routing

5. Components overview




                     Genode OS Framework - Components   2
Outline



1. Classification of components

2. Kernelization example

3. Unified configuration concept

4. Session routing

5. Components overview




                     Genode OS Framework - Components   3
Classification


Kernel enables base platform

Device driver translates device interface to API

Protocol stack translates API to API

Application is leaf node in process tree

Runtime environment has one or more children

Resource multiplexer has multiple clients

combinations are possible

                      Genode OS Framework - Components   4
Kernel




         Genode OS Framework - Components   5
Device driver


Translates device interface to session interface


    Uses core’s IO MEM, IO PORT, IRQ services


    Single client


    Contains no policy


    Enforces policy (device-access arbitration)


                      Genode OS Framework - Components   6
Device driver (2)



Critical because of DMA

    MMU protects physical memory from driver code
    Driver code accesses device via MMIO
    Device has access to whole physical memory (DMA)
→ Device driver can access whole physical memory


          IOMMUs can help ...but are no golden bullet




                     Genode OS Framework - Components   7
Device driver (3)




Even with no IOMMU, isolating drivers has benefits

    Taming classes of non-DMA-related bugs
         Memory leaks
         Synchronization problems, dead-locks
         Flawed driver logic, wrong state machines
         Device initialization

    Minimizing attack surface from the outside




                      Genode OS Framework - Components   8
Protocol stack


Translates API to another (or the same) API


    Does not enforce policy



    Single client



    May be co-located with device driver



                     Genode OS Framework - Components   9
Protocol stack (2)


Libraries

            Library   Translation
            Qt4       Qt4 API → various Genode sessions
            lwIP      socket API → NIC session

Components translating sessions

        Component        Translation
        TCP terminal     Terminal session → NIC session
        iso9660          ROM session → Block session
        ffat fs           File-system session → Block session

                        Genode OS Framework - Components       10
Protocol stack (3)


Components that filter sessions




                     Genode OS Framework - Components   11
Protocol stack (4)


Operate on session interfaces, not physical resources

→ May be instantiated any number of times

→ Critical for availablility

→ Not neccessarily critical for integrity and confidentiality

→ Information leakage constrained to used interfaces

complex code should go in here


                        Genode OS Framework - Components       12
Application


Leaf node in process tree


    Uses services



    Implements application logic



    Provides no service



                     Genode OS Framework - Components   13
Runtime environment


Hosts other processes as children


Defines and imposes policy!


  Examples
                 Init
                 Virtual machine monitor
                 Debugger
                 Python interpreter



                     Genode OS Framework - Components   14
Resource multiplexer


Multiplexes session interface

    Multiple clients → Potential multi-level component


    Free from policy


    Enforce policy dictated by parent


    Prone to cross-client information leakage


    Prone to resource-exhaustion-based DoS

                       Genode OS Framework - Components   15
Resource multiplexer (2)


→ Often as critical as the kernel


→ Must be as low complex as possible


→ Must work on client-provided resources


→ Must employ heap partitioning


only a few resource multiplexers needed



                      Genode OS Framework - Components   16
Outline



1. Classification of components

2. Kernelization example

3. Unified configuration concept

4. Session routing

5. Components overview




                     Genode OS Framework - Components   17
Kernelizing the GUI server



Persistent security problems of GUIs
    Impersonation
    (Trojan horses, phishing, man in the middle)
    Spyware
    (input loggers, arcane observers)
    Robustness/availability risks
    (resource-exhaustion-based denial of service
GUI belongs to TCB → low complexity is important!




                     Genode OS Framework - Components   18
Starting point: DOpE as secure GUI




           Genode OS Framework - Components   19
DOpE as secure GUI - Drawbacks




Prone to resource exhaustion by malicious clients
Provides custom look and feel*
    Stands in the way when using legacy software
    May be enhanced by theme support
Complexity of 12,000 LOC




                 Genode OS Framework - Components   20
Straight-forward attempt: Shrinking DOpE


Revisiting the implementation
    Keeping only essential functionality
    → 7,000 LOC


We loose:
    Majority of widgets (grid, scale, scrollbar, etc.)
    Flexible command interface
    Coolness, fancyness, convenience
    Real-time support
7,000 LOC are too much for such a crippled GUI!


                      Genode OS Framework - Components   21
Bottom-up approach



What do we really need in the GUI server?
    Widgets? → No
    Font support? → No
    Window decoration? → No
    Textual command interface? → No
    Look and feel, gradients, translucency? → No
    Hardware abstractions (e. g., color-space conversion)? → No
    Windows displaying pixel buffers? → YES
    Distribution of input events? → YES
    Secure labeling? → YES



                     Genode OS Framework - Components             22
Buffers and views




          Genode OS Framework - Components   23
User interaction




Input-event handling
    Only one receiver of each input event
    Focused view defines input routing
    Routing controlled by the user only




                    Genode OS Framework - Components   24
Client-side window handling




Report motion events to focused view while a button is pressed
→ Client-side window policies (move, resize, stacking)
→ Key for achieving low server-side complexity



Emergency break
→ Special key regains control over misbehaving applications




                      Genode OS Framework - Components           25
Trusted path



It is not sufficient to label windows!
    A Trojan Horse could present an image of a secure window
    Not the secure window must be marked, but all others!
Revoke some degree of freedom from the clients
    Dedicated screen area, reserved for the trusted GUI
    Revoking the ability to use the whole color space
→ X-Ray mode, activated by special key (x-ray key)




                      Genode OS Framework - Components         26
Trusted path (2)




           Genode OS Framework - Components   27
Nitpicker results


Source-code complexity

                   GUI server       Lines of code
                   X.org                > 80,000
                   Trusted X               30,000
                   DOpE                    12,000
                   EWS                      4,500
                   Nitpicker             < 2,000

    Low performance overhead, no additional copy
    Low-complexity clients are possible (Scout: 4,000 LOC)



                     Genode OS Framework - Components        28
Nitpicker results (2)




    Support for legacy software
    Protection against spyware
    Helps to uncover Trojan horses
    Low source-code complexity
→ Poster child of a resource multiplexer




                      Genode OS Framework - Components   29
Outline



1. Classification of components

2. Kernelization example

3. Unified configuration concept

4. Session routing

5. Components overview




                     Genode OS Framework - Components   30
Traditional approaches to system configuration


Boot-loader configuration
    vbeset command in GRUB menu.lst


Command line arguments specified to boot modules


Kernel command line


Custom configuration files
    Needs file providers, file name space
    Varying syntax → parsing problems


                 Genode OS Framework - Components   31
Unified configuration concept




          Genode OS Framework - Components   32
Unified configuration concept (II)




           Genode OS Framework - Components   33
Unified configuration concept (III)




→ Uniform syntax



→ Extensible through custom tags at each level



→ XML parser adds less than 300 LOC to TCB




                     Genode OS Framework - Components   34
Outline



1. Classification of components

2. Kernelization example

3. Unified configuration concept

4. Session routing

5. Components overview




                     Genode OS Framework - Components   35
Session routing example

<config>
  <parent-provides>
    <service name="CAP"/>
    <service name="LOG"/>
  </parent-provides>
  <start name="timer">
    <resource name="RAM" quantum="1M"/>
    <provides> <service name="Timer"/> </provides>
    <route>
      <service name="CAP"> <parent/> </service>
    </route>
  </start>
  <start name="test-timer">
    <resource name="RAM" quantum="1M"/>
    <route>
      <service name="Timer"> <child name="timer"/> </service>
      <service name="LOG">   <parent/>             </service>
    </route>
  </start>
</config>

                       Genode OS Framework - Components         36
Using wildcards


 <route>
   <service    name="ROM">   <parent/>    </service>
   <service    name="RAM">   <parent/>    </service>
   <service    name="RM">    <parent/>    </service>
   <service    name="PD">    <parent/>    </service>
   <service    name="CPU">   <parent/>    </service>
 </route>



generalized:
 <route>
   <any-service> <parent/> </any-service>
 </route>



                        Genode OS Framework - Components   37
Combining wildcards with explicit routes




<route>
  <service name="LOG"> <child name="nitlog"/> </service>
  <any-service>        <parent/>              </any-service>
</route>




                    Genode OS Framework - Components           38
Useful routing template



 <route>
   <any-service> <parent/>    </any-service>
   <any-service> <any-child/> </any-service>
 </route>




abbreviated:
 <route>
   <any-service> <parent/> <any-child/> </any-service>
 </route>




                     Genode OS Framework - Components    39
Poly-instantiating the same binary



 <start name="nit_fb">
   ...
 <start name="nit_fb">    <!-- XXX ambiguous name! -->
   ...

ambiguity resolved:
 <start name="nit_fb_1">
   <binary name="nit_fb"/>      <!-- binary name != process name -->
   ...
 <start name="nit_fb_2">        <!-- unique name -->
   <binary name="nit_fb"/>
   ...




                      Genode OS Framework - Components                 40
Routing through hierarchies




           Genode OS Framework - Components   41
Routing through hierarchies (2)

<config>
  <parent-provides> ... </parent-provides>
  <start name="timer"> <resource name="RAM" quantum="1M"/>
    <provides> <service name="Timer"/> </provides>
    <route> <service name="CAP"> <parent/> </service> </route>
  </start>
  <start name="init"> <resource name="RAM" quantum="1M"/>
    <config>
      <parent-provides>
        <service name="Timer"/> <service name="LOG"/>
      </parent-provides>
      <start name="test-timer"> <resource name="RAM" quantum="1M"/>
        <route> <service name="Timer"> <parent/> </service>
                <service name="LOG">   <parent/> </service> </route>
      </start>
    </config>
    <route> <service name="Timer"> <child name="timer"/> </service>
            <any-service> <parent/> </any-service> </route>
    </start>
</config>

                       Genode OS Framework - Components                42
Real-time priorities




Kernels provide static priorities

How to make the feature available?

Priorities have side effects on otherwise unrelated subsystems
Priority inversion
Priority inversion + time-slice donation = hard-to-find bug




                   Genode OS Framework - Components             43
Real-time priorities (2)




            Genode OS Framework - Components   44
Real-time priorities (3)

<config prio_levels="2">
  ...
  <start name="init.1" priority="0">
    ...
    <config prio_levels="4">
      ...
      <!-- priority -1 results in platform priority 112 -->
      <start name="init.11" priority="-1"> ... </start>

     <!-- priority -2 results in platform priority 96 -->
     <start name="init.12" priority="-2">
       <config>
         <start name="init.121"> ... </start>
       </config>
     </start>
   </config>
 </start>

  <!-- priority -1 results in platform priority 64 -->
  <start name="init.2" priority="-1"> ... </start>
</config>
                       Genode OS Framework - Components       45
Configuration concept in practice


Development
              Wildcards are handy
              Concise configurations, easy to maintain


Deployment
              Use explicit routes only
              → Default deny
              → Whitelist only permitted session types
              → Mandatory access control

              Absence of wildcards is easy to validate


                       Genode OS Framework - Components   46
Outline



1. Classification of components

2. Kernelization example

3. Unified configuration concept

4. Session routing

5. Components overview




                     Genode OS Framework - Components   47
Interfaces

      LOG Unidirectional debug output

   Terminal Bi-directional input and output
            synchronous bulk

     Timer Facility to block the client

      Input Obtain user input
            synchronous bulk

Framebuffer Display pixel buffer
           synchronous bulk

       PCI Represents PCI bus, find and obtain PCI devices
                     Genode OS Framework - Components       48
Interfaces (2)


     ROM Obtain read-only data modules
         shared memory

     Block Block-device access
           packet stream

File system File-system access
            packet stream

       NIC Bi-directional transfer of network packets
           2 x packet stream

 Audio out Audio output
           packet stream
                    Genode OS Framework - Components    49
Device drivers

 Session type   Location
       Timer    os/src/drivers/timer
        Block   os/src/drivers/atapi
                os/src/drivers/ahci
                os/src/drivers/sd card
                dde linux/src/drivers/usb drv
       Input    os/src/drivers/input/ps2
                dde linux/src/drivers/usb drv
 Framebuffer     os/src/drivers/framebuffer/vesa
                os/src/drivers/framebuffer/sdl
                os/src/drivers/framebuffer/pl11x
                os/src/drivers/framebuffer/omap4
   Audio out    linux drivers/src/drivers/audio out
    Terminal    os/src/drivers/uart
        NIC     dde ipxe/src/drivers/nic
                dde linux/src/drivers/usb drv
         PCI    os/src/drivers/pci

                Genode OS Framework - Components      50
Resource multiplexers and protocol stacks




 Session type   Location
        LOG     os/src/server/terminal log
                demo/src/server/nitlog
 Framebuffer,    demo/src/server/liquid framebuffer
       Input    os/src/server/nit fb
    Nitpicker   os/src/server/nitpicker
    Terminal    os/src/server/terminal crosslink
                gems/src/server/terminal
                gems/src/server/tcp terminal




                Genode OS Framework - Components     51
Resource multiplexers and protocol stacks (2)



    Session type   Location
      Audio out    os/src/server/mixer
            NIC    os/src/server/nic bridge
           ROM     os/src/server/rom prefetcher
                   os/src/server/tar rom
                   os/src/server/iso9660
          Block    os/src/server/rom loopdev
                   os/src/server/part blk
                   gems/src/server/http block
     File system   os/src/server/ram fs
                   libports/src/server/ffat fs




               Genode OS Framework - Components   52
Protocol-stack libraries



   API      Location
   POSIX    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
            libports/lib/mk/libc terminal.mk
   Qt4      qt4/lib/mk/qt *
   OpenGL   libports/lib/mk/gallium.mk




            Genode OS Framework - Components    53
Runtime environments



  Runtime         Location
  Init            os/src/init
  Loader          os/src/server/loader
  L4Linux         ports-foc/src/l4linux
  L4Android       ports-foc/src/l4android
  OKLinux         ports-okl4/src/oklinux
  Vancouver       ports/src/vancouver
  Noux            ports/src/noux
  GDB Monitor     ports/src/app/gdb monitor
  Python          libports/lib/mk/x86 32/python.mk
  Lua             libports/lib/mk/moon.mk




                Genode OS Framework - Components     54
Thank you



What we covered today                      Coming up next...
Components                                 Compositions
 1. Classification of components              1. Virtualization techniques
 2. Kernelization of the GUI                 2. Enslaving services
    server                                   3. Dynamic workloads
 3. Unified configuration
    concept
 4. Session routing
 5. Components overview

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

                        Genode OS Framework - Components                    55

Weitere ähnliche Inhalte

Was ist angesagt?

Smartcard vulnerabilities in modern banking malware
Smartcard vulnerabilities in modern banking malwareSmartcard vulnerabilities in modern banking malware
Smartcard vulnerabilities in modern banking malwareAlex Matrosov
 
Проведение криминалистической экспертизы и анализа руткит-программ на примере...
Проведение криминалистической экспертизы и анализа руткит-программ на примере...Проведение криминалистической экспертизы и анализа руткит-программ на примере...
Проведение криминалистической экспертизы и анализа руткит-программ на примере...Alex Matrosov
 
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
 
Linux Timer device driver
Linux Timer device driverLinux Timer device driver
Linux Timer device driver艾鍗科技
 
Kernel init
Kernel initKernel init
Kernel initgowell
 
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 SD/MMC device driver
Linux SD/MMC device driverLinux SD/MMC device driver
Linux SD/MMC device driver艾鍗科技
 
Linux Initialization Process (2)
Linux Initialization Process (2)Linux Initialization Process (2)
Linux Initialization Process (2)shimosawa
 
LCA13: Android Kernel Upstreaming: Overview & Status
LCA13: Android Kernel Upstreaming: Overview & StatusLCA13: Android Kernel Upstreaming: Overview & Status
LCA13: Android Kernel Upstreaming: Overview & StatusLinaro
 
Linux Porting
Linux PortingLinux Porting
Linux PortingChamp Yen
 
Linux Kernel Programming
Linux Kernel ProgrammingLinux Kernel Programming
Linux Kernel ProgrammingNalin Sharma
 
Lecture2 process structure and programming
Lecture2   process structure and programmingLecture2   process structure and programming
Lecture2 process structure and programmingMohammed 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
 
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
 
Lecture 6 Kernel Debugging + Ports Development
Lecture 6 Kernel Debugging + Ports DevelopmentLecture 6 Kernel Debugging + Ports Development
Lecture 6 Kernel Debugging + Ports DevelopmentMohammed Farrag
 
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
 

Was ist angesagt? (20)

Smartcard vulnerabilities in modern banking malware
Smartcard vulnerabilities in modern banking malwareSmartcard vulnerabilities in modern banking malware
Smartcard vulnerabilities in modern banking malware
 
[ArabBSD] Unix Basics
[ArabBSD] Unix Basics[ArabBSD] Unix Basics
[ArabBSD] Unix Basics
 
Проведение криминалистической экспертизы и анализа руткит-программ на примере...
Проведение криминалистической экспертизы и анализа руткит-программ на примере...Проведение криминалистической экспертизы и анализа руткит-программ на примере...
Проведение криминалистической экспертизы и анализа руткит-программ на примере...
 
VxWorks - Holistic Security (Art of Testing)
VxWorks - Holistic Security (Art of  Testing)VxWorks - Holistic Security (Art of  Testing)
VxWorks - Holistic Security (Art of Testing)
 
Linux Timer device driver
Linux Timer device driverLinux Timer device driver
Linux Timer device driver
 
Kernel init
Kernel initKernel init
Kernel init
 
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 SD/MMC device driver
Linux SD/MMC device driverLinux SD/MMC device driver
Linux SD/MMC device driver
 
Linux Initialization Process (2)
Linux Initialization Process (2)Linux Initialization Process (2)
Linux Initialization Process (2)
 
LCA13: Android Kernel Upstreaming: Overview & Status
LCA13: Android Kernel Upstreaming: Overview & StatusLCA13: Android Kernel Upstreaming: Overview & Status
LCA13: Android Kernel Upstreaming: Overview & Status
 
Embedded linux network device driver development
Embedded linux network device driver developmentEmbedded linux network device driver development
Embedded linux network device driver development
 
Linux Porting
Linux PortingLinux Porting
Linux Porting
 
Linux Kernel Programming
Linux Kernel ProgrammingLinux Kernel Programming
Linux Kernel Programming
 
Linux Internals Part - 3
Linux Internals Part - 3Linux Internals Part - 3
Linux Internals Part - 3
 
Lecture2 process structure and programming
Lecture2   process structure and programmingLecture2   process structure and programming
Lecture2 process structure and programming
 
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
 
VM Forking and Hypervisor-based fuzzing
VM Forking and Hypervisor-based fuzzingVM Forking and Hypervisor-based fuzzing
VM Forking and Hypervisor-based fuzzing
 
Lecture 6 Kernel Debugging + Ports Development
Lecture 6 Kernel Debugging + Ports DevelopmentLecture 6 Kernel Debugging + Ports Development
Lecture 6 Kernel Debugging + Ports Development
 
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
 
EFI Secure Key
EFI Secure KeyEFI Secure Key
EFI Secure Key
 

Ähnlich wie Genode Components

Hunting and Exploiting Bugs in Kernel Drivers - DefCamp 2012
Hunting and Exploiting Bugs in Kernel Drivers - DefCamp 2012Hunting and Exploiting Bugs in Kernel Drivers - DefCamp 2012
Hunting and Exploiting Bugs in Kernel Drivers - DefCamp 2012DefCamp
 
Using and Customizing the Android Framework / part 4 of Embedded Android Work...
Using and Customizing the Android Framework / part 4 of Embedded Android Work...Using and Customizing the Android Framework / part 4 of Embedded Android Work...
Using and Customizing the Android Framework / part 4 of Embedded Android Work...Opersys inc.
 
Making Networking Apps Scream on Windows with DPDK
Making Networking Apps Scream on Windows with DPDKMaking Networking Apps Scream on Windows with DPDK
Making Networking Apps Scream on Windows with DPDKMichelle Holley
 
CS 626 - March : Capsicum: Practical Capabilities for UNIX
CS 626 - March : Capsicum: Practical Capabilities for UNIXCS 626 - March : Capsicum: Practical Capabilities for UNIX
CS 626 - March : Capsicum: Practical Capabilities for UNIXruchith
 
Typhoon Managed Execution Toolkit
Typhoon Managed Execution ToolkitTyphoon Managed Execution Toolkit
Typhoon Managed Execution ToolkitDimitry Snezhkov
 
Eclipse Edje: A Java API for Microcontrollers
Eclipse Edje: A Java API for MicrocontrollersEclipse Edje: A Java API for Microcontrollers
Eclipse Edje: A Java API for MicrocontrollersMicroEJ
 
Readactor-Practical Code Randomization Resilient to Memory Disclosure
Readactor-Practical Code Randomization Resilient to Memory DisclosureReadactor-Practical Code Randomization Resilient to Memory Disclosure
Readactor-Practical Code Randomization Resilient to Memory Disclosurech0psticks
 
Android Internals at Linaro Connect Asia 2013
Android Internals at Linaro Connect Asia 2013Android Internals at Linaro Connect Asia 2013
Android Internals at Linaro Connect Asia 2013Opersys inc.
 
Clusters (Distributed computing)
Clusters (Distributed computing)Clusters (Distributed computing)
Clusters (Distributed computing)Sri Prasanna
 
OffensiveCon2022: Case Studies of Fuzzing with Xen
OffensiveCon2022: Case Studies of Fuzzing with XenOffensiveCon2022: Case Studies of Fuzzing with Xen
OffensiveCon2022: Case Studies of Fuzzing with XenTamas K Lengyel
 
.NET Debugging Tips and Techniques
.NET Debugging Tips and Techniques.NET Debugging Tips and Techniques
.NET Debugging Tips and TechniquesBala Subra
 

Ähnlich wie Genode Components (20)

Genode Architecture
Genode ArchitectureGenode Architecture
Genode Architecture
 
Towards Isolated Execution at the Machine Level
Towards Isolated Execution at the Machine LevelTowards Isolated Execution at the Machine Level
Towards Isolated Execution at the Machine Level
 
Genode Programming
Genode ProgrammingGenode Programming
Genode Programming
 
Hunting and Exploiting Bugs in Kernel Drivers - DefCamp 2012
Hunting and Exploiting Bugs in Kernel Drivers - DefCamp 2012Hunting and Exploiting Bugs in Kernel Drivers - DefCamp 2012
Hunting and Exploiting Bugs in Kernel Drivers - DefCamp 2012
 
Genode OS Framework
Genode OS FrameworkGenode OS Framework
Genode OS Framework
 
Android Internals
Android InternalsAndroid Internals
Android Internals
 
What's New in RHEL 6 for Linux on System z?
What's New in RHEL 6 for Linux on System z?What's New in RHEL 6 for Linux on System z?
What's New in RHEL 6 for Linux on System z?
 
Android Internals
Android InternalsAndroid Internals
Android Internals
 
Using and Customizing the Android Framework / part 4 of Embedded Android Work...
Using and Customizing the Android Framework / part 4 of Embedded Android Work...Using and Customizing the Android Framework / part 4 of Embedded Android Work...
Using and Customizing the Android Framework / part 4 of Embedded Android Work...
 
Agnostic Device Drivers
Agnostic Device DriversAgnostic Device Drivers
Agnostic Device Drivers
 
Making Networking Apps Scream on Windows with DPDK
Making Networking Apps Scream on Windows with DPDKMaking Networking Apps Scream on Windows with DPDK
Making Networking Apps Scream on Windows with DPDK
 
CS 626 - March : Capsicum: Practical Capabilities for UNIX
CS 626 - March : Capsicum: Practical Capabilities for UNIXCS 626 - March : Capsicum: Practical Capabilities for UNIX
CS 626 - March : Capsicum: Practical Capabilities for UNIX
 
Typhoon Managed Execution Toolkit
Typhoon Managed Execution ToolkitTyphoon Managed Execution Toolkit
Typhoon Managed Execution Toolkit
 
Eclipse Edje: A Java API for Microcontrollers
Eclipse Edje: A Java API for MicrocontrollersEclipse Edje: A Java API for Microcontrollers
Eclipse Edje: A Java API for Microcontrollers
 
Readactor-Practical Code Randomization Resilient to Memory Disclosure
Readactor-Practical Code Randomization Resilient to Memory DisclosureReadactor-Practical Code Randomization Resilient to Memory Disclosure
Readactor-Practical Code Randomization Resilient to Memory Disclosure
 
Fuzzing_with_Xen.pdf
Fuzzing_with_Xen.pdfFuzzing_with_Xen.pdf
Fuzzing_with_Xen.pdf
 
Android Internals at Linaro Connect Asia 2013
Android Internals at Linaro Connect Asia 2013Android Internals at Linaro Connect Asia 2013
Android Internals at Linaro Connect Asia 2013
 
Clusters (Distributed computing)
Clusters (Distributed computing)Clusters (Distributed computing)
Clusters (Distributed computing)
 
OffensiveCon2022: Case Studies of Fuzzing with Xen
OffensiveCon2022: Case Studies of Fuzzing with XenOffensiveCon2022: Case Studies of Fuzzing with Xen
OffensiveCon2022: Case Studies of Fuzzing with Xen
 
.NET Debugging Tips and Techniques
.NET Debugging Tips and Techniques.NET Debugging Tips and Techniques
.NET Debugging Tips and Techniques
 

Mehr von 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
 

Mehr von Vasily Sartakov (19)

Мейнстрим технологии шифрованной памяти
Мейнстрим технологии шифрованной памятиМейнстрим технологии шифрованной памяти
Мейнстрим технологии шифрованной памяти
 
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
 
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
 
Разработка встраиваемой операционной системы на базе микроядерной архитектуры...
Разработка встраиваемой операционной системы на базе микроядерной архитектуры...Разработка встраиваемой операционной системы на базе микроядерной архитектуры...
Разработка встраиваемой операционной системы на базе микроядерной архитектуры...
 
Образование, наука, бизнес. Сегодня, завтра, послезавтра
Образование, наука, бизнес. Сегодня, завтра, послезавтраОбразование, наука, бизнес. Сегодня, завтра, послезавтра
Образование, наука, бизнес. Сегодня, завтра, послезавтра
 

Kürzlich hochgeladen

Karra SKD Conference Presentation Revised.pptx
Karra SKD Conference Presentation Revised.pptxKarra SKD Conference Presentation Revised.pptx
Karra SKD Conference Presentation Revised.pptxAshokKarra1
 
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️9953056974 Low Rate Call Girls In Saket, Delhi NCR
 
Judging the Relevance and worth of ideas part 2.pptx
Judging the Relevance  and worth of ideas part 2.pptxJudging the Relevance  and worth of ideas part 2.pptx
Judging the Relevance and worth of ideas part 2.pptxSherlyMaeNeri
 
AUDIENCE THEORY -CULTIVATION THEORY - GERBNER.pptx
AUDIENCE THEORY -CULTIVATION THEORY -  GERBNER.pptxAUDIENCE THEORY -CULTIVATION THEORY -  GERBNER.pptx
AUDIENCE THEORY -CULTIVATION THEORY - GERBNER.pptxiammrhaywood
 
GRADE 4 - SUMMATIVE TEST QUARTER 4 ALL SUBJECTS
GRADE 4 - SUMMATIVE TEST QUARTER 4 ALL SUBJECTSGRADE 4 - SUMMATIVE TEST QUARTER 4 ALL SUBJECTS
GRADE 4 - SUMMATIVE TEST QUARTER 4 ALL SUBJECTSJoshuaGantuangco2
 
Choosing the Right CBSE School A Comprehensive Guide for Parents
Choosing the Right CBSE School A Comprehensive Guide for ParentsChoosing the Right CBSE School A Comprehensive Guide for Parents
Choosing the Right CBSE School A Comprehensive Guide for Parentsnavabharathschool99
 
What is Model Inheritance in Odoo 17 ERP
What is Model Inheritance in Odoo 17 ERPWhat is Model Inheritance in Odoo 17 ERP
What is Model Inheritance in Odoo 17 ERPCeline George
 
Influencing policy (training slides from Fast Track Impact)
Influencing policy (training slides from Fast Track Impact)Influencing policy (training slides from Fast Track Impact)
Influencing policy (training slides from Fast Track Impact)Mark Reed
 
Earth Day Presentation wow hello nice great
Earth Day Presentation wow hello nice greatEarth Day Presentation wow hello nice great
Earth Day Presentation wow hello nice greatYousafMalik24
 
Student Profile Sample - We help schools to connect the data they have, with ...
Student Profile Sample - We help schools to connect the data they have, with ...Student Profile Sample - We help schools to connect the data they have, with ...
Student Profile Sample - We help schools to connect the data they have, with ...Seán Kennedy
 
ANG SEKTOR NG agrikultura.pptx QUARTER 4
ANG SEKTOR NG agrikultura.pptx QUARTER 4ANG SEKTOR NG agrikultura.pptx QUARTER 4
ANG SEKTOR NG agrikultura.pptx QUARTER 4MiaBumagat1
 
ISYU TUNGKOL SA SEKSWLADIDA (ISSUE ABOUT SEXUALITY
ISYU TUNGKOL SA SEKSWLADIDA (ISSUE ABOUT SEXUALITYISYU TUNGKOL SA SEKSWLADIDA (ISSUE ABOUT SEXUALITY
ISYU TUNGKOL SA SEKSWLADIDA (ISSUE ABOUT SEXUALITYKayeClaireEstoconing
 
FILIPINO PSYCHology sikolohiyang pilipino
FILIPINO PSYCHology sikolohiyang pilipinoFILIPINO PSYCHology sikolohiyang pilipino
FILIPINO PSYCHology sikolohiyang pilipinojohnmickonozaleda
 
Transaction Management in Database Management System
Transaction Management in Database Management SystemTransaction Management in Database Management System
Transaction Management in Database Management SystemChristalin Nelson
 
How to do quick user assign in kanban in Odoo 17 ERP
How to do quick user assign in kanban in Odoo 17 ERPHow to do quick user assign in kanban in Odoo 17 ERP
How to do quick user assign in kanban in Odoo 17 ERPCeline George
 
Field Attribute Index Feature in Odoo 17
Field Attribute Index Feature in Odoo 17Field Attribute Index Feature in Odoo 17
Field Attribute Index Feature in Odoo 17Celine George
 
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptx
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptxECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptx
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptxiammrhaywood
 
Inclusivity Essentials_ Creating Accessible Websites for Nonprofits .pdf
Inclusivity Essentials_ Creating Accessible Websites for Nonprofits .pdfInclusivity Essentials_ Creating Accessible Websites for Nonprofits .pdf
Inclusivity Essentials_ Creating Accessible Websites for Nonprofits .pdfTechSoup
 
How to Add Barcode on PDF Report in Odoo 17
How to Add Barcode on PDF Report in Odoo 17How to Add Barcode on PDF Report in Odoo 17
How to Add Barcode on PDF Report in Odoo 17Celine George
 
Grade 9 Quarter 4 Dll Grade 9 Quarter 4 DLL.pdf
Grade 9 Quarter 4 Dll Grade 9 Quarter 4 DLL.pdfGrade 9 Quarter 4 Dll Grade 9 Quarter 4 DLL.pdf
Grade 9 Quarter 4 Dll Grade 9 Quarter 4 DLL.pdfJemuel Francisco
 

Kürzlich hochgeladen (20)

Karra SKD Conference Presentation Revised.pptx
Karra SKD Conference Presentation Revised.pptxKarra SKD Conference Presentation Revised.pptx
Karra SKD Conference Presentation Revised.pptx
 
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
 
Judging the Relevance and worth of ideas part 2.pptx
Judging the Relevance  and worth of ideas part 2.pptxJudging the Relevance  and worth of ideas part 2.pptx
Judging the Relevance and worth of ideas part 2.pptx
 
AUDIENCE THEORY -CULTIVATION THEORY - GERBNER.pptx
AUDIENCE THEORY -CULTIVATION THEORY -  GERBNER.pptxAUDIENCE THEORY -CULTIVATION THEORY -  GERBNER.pptx
AUDIENCE THEORY -CULTIVATION THEORY - GERBNER.pptx
 
GRADE 4 - SUMMATIVE TEST QUARTER 4 ALL SUBJECTS
GRADE 4 - SUMMATIVE TEST QUARTER 4 ALL SUBJECTSGRADE 4 - SUMMATIVE TEST QUARTER 4 ALL SUBJECTS
GRADE 4 - SUMMATIVE TEST QUARTER 4 ALL SUBJECTS
 
Choosing the Right CBSE School A Comprehensive Guide for Parents
Choosing the Right CBSE School A Comprehensive Guide for ParentsChoosing the Right CBSE School A Comprehensive Guide for Parents
Choosing the Right CBSE School A Comprehensive Guide for Parents
 
What is Model Inheritance in Odoo 17 ERP
What is Model Inheritance in Odoo 17 ERPWhat is Model Inheritance in Odoo 17 ERP
What is Model Inheritance in Odoo 17 ERP
 
Influencing policy (training slides from Fast Track Impact)
Influencing policy (training slides from Fast Track Impact)Influencing policy (training slides from Fast Track Impact)
Influencing policy (training slides from Fast Track Impact)
 
Earth Day Presentation wow hello nice great
Earth Day Presentation wow hello nice greatEarth Day Presentation wow hello nice great
Earth Day Presentation wow hello nice great
 
Student Profile Sample - We help schools to connect the data they have, with ...
Student Profile Sample - We help schools to connect the data they have, with ...Student Profile Sample - We help schools to connect the data they have, with ...
Student Profile Sample - We help schools to connect the data they have, with ...
 
ANG SEKTOR NG agrikultura.pptx QUARTER 4
ANG SEKTOR NG agrikultura.pptx QUARTER 4ANG SEKTOR NG agrikultura.pptx QUARTER 4
ANG SEKTOR NG agrikultura.pptx QUARTER 4
 
ISYU TUNGKOL SA SEKSWLADIDA (ISSUE ABOUT SEXUALITY
ISYU TUNGKOL SA SEKSWLADIDA (ISSUE ABOUT SEXUALITYISYU TUNGKOL SA SEKSWLADIDA (ISSUE ABOUT SEXUALITY
ISYU TUNGKOL SA SEKSWLADIDA (ISSUE ABOUT SEXUALITY
 
FILIPINO PSYCHology sikolohiyang pilipino
FILIPINO PSYCHology sikolohiyang pilipinoFILIPINO PSYCHology sikolohiyang pilipino
FILIPINO PSYCHology sikolohiyang pilipino
 
Transaction Management in Database Management System
Transaction Management in Database Management SystemTransaction Management in Database Management System
Transaction Management in Database Management System
 
How to do quick user assign in kanban in Odoo 17 ERP
How to do quick user assign in kanban in Odoo 17 ERPHow to do quick user assign in kanban in Odoo 17 ERP
How to do quick user assign in kanban in Odoo 17 ERP
 
Field Attribute Index Feature in Odoo 17
Field Attribute Index Feature in Odoo 17Field Attribute Index Feature in Odoo 17
Field Attribute Index Feature in Odoo 17
 
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptx
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptxECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptx
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptx
 
Inclusivity Essentials_ Creating Accessible Websites for Nonprofits .pdf
Inclusivity Essentials_ Creating Accessible Websites for Nonprofits .pdfInclusivity Essentials_ Creating Accessible Websites for Nonprofits .pdf
Inclusivity Essentials_ Creating Accessible Websites for Nonprofits .pdf
 
How to Add Barcode on PDF Report in Odoo 17
How to Add Barcode on PDF Report in Odoo 17How to Add Barcode on PDF Report in Odoo 17
How to Add Barcode on PDF Report in Odoo 17
 
Grade 9 Quarter 4 Dll Grade 9 Quarter 4 DLL.pdf
Grade 9 Quarter 4 Dll Grade 9 Quarter 4 DLL.pdfGrade 9 Quarter 4 Dll Grade 9 Quarter 4 DLL.pdf
Grade 9 Quarter 4 Dll Grade 9 Quarter 4 DLL.pdf
 

Genode Components

  • 1. Genode OS Framework - Components Norman Feske <norman.feske@genode-labs.com>
  • 2. Outline 1. Classification of components 2. Kernelization example 3. Unified configuration concept 4. Session routing 5. Components overview Genode OS Framework - Components 2
  • 3. Outline 1. Classification of components 2. Kernelization example 3. Unified configuration concept 4. Session routing 5. Components overview Genode OS Framework - Components 3
  • 4. Classification Kernel enables base platform Device driver translates device interface to API Protocol stack translates API to API Application is leaf node in process tree Runtime environment has one or more children Resource multiplexer has multiple clients combinations are possible Genode OS Framework - Components 4
  • 5. Kernel Genode OS Framework - Components 5
  • 6. Device driver Translates device interface to session interface Uses core’s IO MEM, IO PORT, IRQ services Single client Contains no policy Enforces policy (device-access arbitration) Genode OS Framework - Components 6
  • 7. Device driver (2) Critical because of DMA MMU protects physical memory from driver code Driver code accesses device via MMIO Device has access to whole physical memory (DMA) → Device driver can access whole physical memory IOMMUs can help ...but are no golden bullet Genode OS Framework - Components 7
  • 8. Device driver (3) Even with no IOMMU, isolating drivers has benefits Taming classes of non-DMA-related bugs Memory leaks Synchronization problems, dead-locks Flawed driver logic, wrong state machines Device initialization Minimizing attack surface from the outside Genode OS Framework - Components 8
  • 9. Protocol stack Translates API to another (or the same) API Does not enforce policy Single client May be co-located with device driver Genode OS Framework - Components 9
  • 10. Protocol stack (2) Libraries Library Translation Qt4 Qt4 API → various Genode sessions lwIP socket API → NIC session Components translating sessions Component Translation TCP terminal Terminal session → NIC session iso9660 ROM session → Block session ffat fs File-system session → Block session Genode OS Framework - Components 10
  • 11. Protocol stack (3) Components that filter sessions Genode OS Framework - Components 11
  • 12. Protocol stack (4) Operate on session interfaces, not physical resources → May be instantiated any number of times → Critical for availablility → Not neccessarily critical for integrity and confidentiality → Information leakage constrained to used interfaces complex code should go in here Genode OS Framework - Components 12
  • 13. Application Leaf node in process tree Uses services Implements application logic Provides no service Genode OS Framework - Components 13
  • 14. Runtime environment Hosts other processes as children Defines and imposes policy! Examples Init Virtual machine monitor Debugger Python interpreter Genode OS Framework - Components 14
  • 15. Resource multiplexer Multiplexes session interface Multiple clients → Potential multi-level component Free from policy Enforce policy dictated by parent Prone to cross-client information leakage Prone to resource-exhaustion-based DoS Genode OS Framework - Components 15
  • 16. Resource multiplexer (2) → Often as critical as the kernel → Must be as low complex as possible → Must work on client-provided resources → Must employ heap partitioning only a few resource multiplexers needed Genode OS Framework - Components 16
  • 17. Outline 1. Classification of components 2. Kernelization example 3. Unified configuration concept 4. Session routing 5. Components overview Genode OS Framework - Components 17
  • 18. Kernelizing the GUI server Persistent security problems of GUIs Impersonation (Trojan horses, phishing, man in the middle) Spyware (input loggers, arcane observers) Robustness/availability risks (resource-exhaustion-based denial of service GUI belongs to TCB → low complexity is important! Genode OS Framework - Components 18
  • 19. Starting point: DOpE as secure GUI Genode OS Framework - Components 19
  • 20. DOpE as secure GUI - Drawbacks Prone to resource exhaustion by malicious clients Provides custom look and feel* Stands in the way when using legacy software May be enhanced by theme support Complexity of 12,000 LOC Genode OS Framework - Components 20
  • 21. Straight-forward attempt: Shrinking DOpE Revisiting the implementation Keeping only essential functionality → 7,000 LOC We loose: Majority of widgets (grid, scale, scrollbar, etc.) Flexible command interface Coolness, fancyness, convenience Real-time support 7,000 LOC are too much for such a crippled GUI! Genode OS Framework - Components 21
  • 22. Bottom-up approach What do we really need in the GUI server? Widgets? → No Font support? → No Window decoration? → No Textual command interface? → No Look and feel, gradients, translucency? → No Hardware abstractions (e. g., color-space conversion)? → No Windows displaying pixel buffers? → YES Distribution of input events? → YES Secure labeling? → YES Genode OS Framework - Components 22
  • 23. Buffers and views Genode OS Framework - Components 23
  • 24. User interaction Input-event handling Only one receiver of each input event Focused view defines input routing Routing controlled by the user only Genode OS Framework - Components 24
  • 25. Client-side window handling Report motion events to focused view while a button is pressed → Client-side window policies (move, resize, stacking) → Key for achieving low server-side complexity Emergency break → Special key regains control over misbehaving applications Genode OS Framework - Components 25
  • 26. Trusted path It is not sufficient to label windows! A Trojan Horse could present an image of a secure window Not the secure window must be marked, but all others! Revoke some degree of freedom from the clients Dedicated screen area, reserved for the trusted GUI Revoking the ability to use the whole color space → X-Ray mode, activated by special key (x-ray key) Genode OS Framework - Components 26
  • 27. Trusted path (2) Genode OS Framework - Components 27
  • 28. Nitpicker results Source-code complexity GUI server Lines of code X.org > 80,000 Trusted X 30,000 DOpE 12,000 EWS 4,500 Nitpicker < 2,000 Low performance overhead, no additional copy Low-complexity clients are possible (Scout: 4,000 LOC) Genode OS Framework - Components 28
  • 29. Nitpicker results (2) Support for legacy software Protection against spyware Helps to uncover Trojan horses Low source-code complexity → Poster child of a resource multiplexer Genode OS Framework - Components 29
  • 30. Outline 1. Classification of components 2. Kernelization example 3. Unified configuration concept 4. Session routing 5. Components overview Genode OS Framework - Components 30
  • 31. Traditional approaches to system configuration Boot-loader configuration vbeset command in GRUB menu.lst Command line arguments specified to boot modules Kernel command line Custom configuration files Needs file providers, file name space Varying syntax → parsing problems Genode OS Framework - Components 31
  • 32. Unified configuration concept Genode OS Framework - Components 32
  • 33. Unified configuration concept (II) Genode OS Framework - Components 33
  • 34. Unified configuration concept (III) → Uniform syntax → Extensible through custom tags at each level → XML parser adds less than 300 LOC to TCB Genode OS Framework - Components 34
  • 35. Outline 1. Classification of components 2. Kernelization example 3. Unified configuration concept 4. Session routing 5. Components overview Genode OS Framework - Components 35
  • 36. Session routing example <config> <parent-provides> <service name="CAP"/> <service name="LOG"/> </parent-provides> <start name="timer"> <resource name="RAM" quantum="1M"/> <provides> <service name="Timer"/> </provides> <route> <service name="CAP"> <parent/> </service> </route> </start> <start name="test-timer"> <resource name="RAM" quantum="1M"/> <route> <service name="Timer"> <child name="timer"/> </service> <service name="LOG"> <parent/> </service> </route> </start> </config> Genode OS Framework - Components 36
  • 37. Using wildcards <route> <service name="ROM"> <parent/> </service> <service name="RAM"> <parent/> </service> <service name="RM"> <parent/> </service> <service name="PD"> <parent/> </service> <service name="CPU"> <parent/> </service> </route> generalized: <route> <any-service> <parent/> </any-service> </route> Genode OS Framework - Components 37
  • 38. Combining wildcards with explicit routes <route> <service name="LOG"> <child name="nitlog"/> </service> <any-service> <parent/> </any-service> </route> Genode OS Framework - Components 38
  • 39. Useful routing template <route> <any-service> <parent/> </any-service> <any-service> <any-child/> </any-service> </route> abbreviated: <route> <any-service> <parent/> <any-child/> </any-service> </route> Genode OS Framework - Components 39
  • 40. Poly-instantiating the same binary <start name="nit_fb"> ... <start name="nit_fb"> <!-- XXX ambiguous name! --> ... ambiguity resolved: <start name="nit_fb_1"> <binary name="nit_fb"/> <!-- binary name != process name --> ... <start name="nit_fb_2"> <!-- unique name --> <binary name="nit_fb"/> ... Genode OS Framework - Components 40
  • 41. Routing through hierarchies Genode OS Framework - Components 41
  • 42. Routing through hierarchies (2) <config> <parent-provides> ... </parent-provides> <start name="timer"> <resource name="RAM" quantum="1M"/> <provides> <service name="Timer"/> </provides> <route> <service name="CAP"> <parent/> </service> </route> </start> <start name="init"> <resource name="RAM" quantum="1M"/> <config> <parent-provides> <service name="Timer"/> <service name="LOG"/> </parent-provides> <start name="test-timer"> <resource name="RAM" quantum="1M"/> <route> <service name="Timer"> <parent/> </service> <service name="LOG"> <parent/> </service> </route> </start> </config> <route> <service name="Timer"> <child name="timer"/> </service> <any-service> <parent/> </any-service> </route> </start> </config> Genode OS Framework - Components 42
  • 43. Real-time priorities Kernels provide static priorities How to make the feature available? Priorities have side effects on otherwise unrelated subsystems Priority inversion Priority inversion + time-slice donation = hard-to-find bug Genode OS Framework - Components 43
  • 44. Real-time priorities (2) Genode OS Framework - Components 44
  • 45. Real-time priorities (3) <config prio_levels="2"> ... <start name="init.1" priority="0"> ... <config prio_levels="4"> ... <!-- priority -1 results in platform priority 112 --> <start name="init.11" priority="-1"> ... </start> <!-- priority -2 results in platform priority 96 --> <start name="init.12" priority="-2"> <config> <start name="init.121"> ... </start> </config> </start> </config> </start> <!-- priority -1 results in platform priority 64 --> <start name="init.2" priority="-1"> ... </start> </config> Genode OS Framework - Components 45
  • 46. Configuration concept in practice Development Wildcards are handy Concise configurations, easy to maintain Deployment Use explicit routes only → Default deny → Whitelist only permitted session types → Mandatory access control Absence of wildcards is easy to validate Genode OS Framework - Components 46
  • 47. Outline 1. Classification of components 2. Kernelization example 3. Unified configuration concept 4. Session routing 5. Components overview Genode OS Framework - Components 47
  • 48. Interfaces LOG Unidirectional debug output Terminal Bi-directional input and output synchronous bulk Timer Facility to block the client Input Obtain user input synchronous bulk Framebuffer Display pixel buffer synchronous bulk PCI Represents PCI bus, find and obtain PCI devices Genode OS Framework - Components 48
  • 49. Interfaces (2) ROM Obtain read-only data modules shared memory Block Block-device access packet stream File system File-system access packet stream NIC Bi-directional transfer of network packets 2 x packet stream Audio out Audio output packet stream Genode OS Framework - Components 49
  • 50. Device drivers Session type Location Timer os/src/drivers/timer Block os/src/drivers/atapi os/src/drivers/ahci os/src/drivers/sd card dde linux/src/drivers/usb drv Input os/src/drivers/input/ps2 dde linux/src/drivers/usb drv Framebuffer os/src/drivers/framebuffer/vesa os/src/drivers/framebuffer/sdl os/src/drivers/framebuffer/pl11x os/src/drivers/framebuffer/omap4 Audio out linux drivers/src/drivers/audio out Terminal os/src/drivers/uart NIC dde ipxe/src/drivers/nic dde linux/src/drivers/usb drv PCI os/src/drivers/pci Genode OS Framework - Components 50
  • 51. Resource multiplexers and protocol stacks Session type Location LOG os/src/server/terminal log demo/src/server/nitlog Framebuffer, demo/src/server/liquid framebuffer Input os/src/server/nit fb Nitpicker os/src/server/nitpicker Terminal os/src/server/terminal crosslink gems/src/server/terminal gems/src/server/tcp terminal Genode OS Framework - Components 51
  • 52. Resource multiplexers and protocol stacks (2) Session type Location Audio out os/src/server/mixer NIC os/src/server/nic bridge ROM os/src/server/rom prefetcher os/src/server/tar rom os/src/server/iso9660 Block os/src/server/rom loopdev os/src/server/part blk gems/src/server/http block File system os/src/server/ram fs libports/src/server/ffat fs Genode OS Framework - Components 52
  • 53. Protocol-stack libraries API Location POSIX 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 libports/lib/mk/libc terminal.mk Qt4 qt4/lib/mk/qt * OpenGL libports/lib/mk/gallium.mk Genode OS Framework - Components 53
  • 54. Runtime environments Runtime Location Init os/src/init Loader os/src/server/loader L4Linux ports-foc/src/l4linux L4Android ports-foc/src/l4android OKLinux ports-okl4/src/oklinux Vancouver ports/src/vancouver Noux ports/src/noux GDB Monitor ports/src/app/gdb monitor Python libports/lib/mk/x86 32/python.mk Lua libports/lib/mk/moon.mk Genode OS Framework - Components 54
  • 55. Thank you What we covered today Coming up next... Components Compositions 1. Classification of components 1. Virtualization techniques 2. Kernelization of the GUI 2. Enslaving services server 3. Dynamic workloads 3. Unified configuration concept 4. Session routing 5. Components overview More information and resources: http://genode.org Genode OS Framework - Components 55