XPDDS19: Client Virtualization Toolstack in Go - Nick Rosbrook & Brendan Kerrigan, Assured Information Security, Inc.

The Linux Foundation
The Linux FoundationDirector, Open Source Solutions at Citrix
Client Virtualization Toolstack in Go
Nicholas Rosbrook, Software Engineer, Assured Information Security
Brendan Kerrigan, Principal Software Engineer, Assured Information Security
Overview
• Introduction
• Motivation
• Evaluation
• Redfield and redctl
• Libxl Go (Golang) bindings
• Questions
Introduction
• Brendan Kerrigan – Principal Engineer at Assured Information
Security, Inc.
• Hypervisors
• Graphics virtualization
• Embedded
• Nicholas Rosbrook – Software Engineer at Assured Information
Security, Inc.
• Cryptography
• VPNs and Networking
• Go expert
Motivation
• We do a lot of client virtualization work
• Utilizing hypervisors to do end point security
• Mostly OpenXT based products now
• OpenXT isn’t the easiest project to work on (10 years of development
means there are lots of components)
• Sometimes key high-security features can be a hindrance to some use
cases
• Client virtualization is pretty different than server virtualization
• Especially when it comes to toolstacks
Evaluation
• What’s out there we can leverage?
• XenMgr
• Libvirt (+ qubectl)
• What if we had a clean slate?
XenMgr
• XenMgr is high friction
• Haskell
• Esoteric
• Tough to find developers
• Lots of legacy interfaces that are unexercised and unaudited (audit in
progress)
• A lot of cryptic code that essentially reads a database and writes an xl
config and calls exec/fork
• Local and remote APIs are different 
• The command line tool is great
Libvirt
• One layer of abstraction too many
• XML domain configurations are too complex
• Designed to work with several virtualization technologies – KVM, Xen,
LXC, etc.
• We want to work with Xen and do it well
• Does a lot more than we need it to
• There is an existing Go package (developed by DigitalOcean)
redctl
• Introducing redctl, the client toolstack to our Xen
distribution, Redfield
• The good:
• A client toolstack where remote and local management
APIs are unified
• Utilize gRPC
• Don’t dictate transport (IPv4, IPv6, PV channels, Argo, vsock)
• Easy to understand and test language (Go)
• Make the command line tool awesome (like XenMgr’s)
• The bad:
• Still doing exec/fork a lot when dealing with libxl…
What is cgo?
• Cgo enables Go programs to call C code through a pseudo-
package, “C”
• Allows access of C types, variables, and functions
• E.g. C.size_t, C.stdout, C.printf
• The “preamble”
• A block comment used to include headers, set CFLAGS, LDFLAGS, etc.
• Immediately precedes the import “C” statement
What is cgo?
What is cgo?
• C fields that cannot be expressed in Go are omitted
• The C type void* is represented by Go’s unsafe.Pointer
• Cannot call C function pointers from Go
• There are some restrictions on passing pointers between C and Go
Writing a Go Package for libxl
• Writing the cgo code by hand is tedious
• Cgo is simple enough to make code generation easy
• We use c-for-go: https://github.com/xlab/c-for-go
• Define translation and generation rules with a YAML configuration file
• Accept or ignore symbols, rename variables, apply rules to a given scope,
and more
Writing a Go Package for libxl
Writing a Go Package for libxl
• Finally, we need some wrappers…
Writing a Go Package for libxl
• Instead of:
Writing a Go Package for libxl
• We want:
Future Work
• Continue writing wrappers
• Trim the size of the package
• Integrate into redctl
• Upstream
• Current fork: https://github.com/enr0n/xen/tree/libxl-go
Questions?
• https://ainfosec.com
• https://gitlab.com/redfield
XPDDS19: Client Virtualization Toolstack in Go - Nick Rosbrook & Brendan Kerrigan, Assured Information Security, Inc.
1 of 19

Recommended

Platform Security Summit 18: Xen Security Weather Report 2018 by
Platform Security Summit 18: Xen Security Weather Report 2018Platform Security Summit 18: Xen Security Weather Report 2018
Platform Security Summit 18: Xen Security Weather Report 2018The Linux Foundation
413 views29 slides
XPDDS19 Keynote: Xen in Automotive - Artem Mygaiev, Director, Technology Solu... by
XPDDS19 Keynote: Xen in Automotive - Artem Mygaiev, Director, Technology Solu...XPDDS19 Keynote: Xen in Automotive - Artem Mygaiev, Director, Technology Solu...
XPDDS19 Keynote: Xen in Automotive - Artem Mygaiev, Director, Technology Solu...The Linux Foundation
1K views19 slides
OSSJP/ALS19: The Road to Safety Certification: How the Xen Project is Making... by
 OSSJP/ALS19: The Road to Safety Certification: How the Xen Project is Making... OSSJP/ALS19: The Road to Safety Certification: How the Xen Project is Making...
OSSJP/ALS19: The Road to Safety Certification: How the Xen Project is Making...The Linux Foundation
5.2K views38 slides
XPDDS19 Keynote: Xen Project Weather Report 2019 - Lars Kurth, Director of Op... by
XPDDS19 Keynote: Xen Project Weather Report 2019 - Lars Kurth, Director of Op...XPDDS19 Keynote: Xen Project Weather Report 2019 - Lars Kurth, Director of Op...
XPDDS19 Keynote: Xen Project Weather Report 2019 - Lars Kurth, Director of Op...The Linux Foundation
819 views24 slides
XPDDS18: Xen Project Weather Report 2018 by
XPDDS18: Xen Project Weather Report 2018XPDDS18: Xen Project Weather Report 2018
XPDDS18: Xen Project Weather Report 2018The Linux Foundation
477 views25 slides
XDF18: Heterogeneous Real-Time SoC Software Architecture - Stefano Stabellini... by
XDF18: Heterogeneous Real-Time SoC Software Architecture - Stefano Stabellini...XDF18: Heterogeneous Real-Time SoC Software Architecture - Stefano Stabellini...
XDF18: Heterogeneous Real-Time SoC Software Architecture - Stefano Stabellini...The Linux Foundation
1.7K views32 slides

More Related Content

What's hot

Fosdem 18: Securing embedded Systems using Virtualization by
Fosdem 18: Securing embedded Systems using VirtualizationFosdem 18: Securing embedded Systems using Virtualization
Fosdem 18: Securing embedded Systems using VirtualizationThe Linux Foundation
6.6K views41 slides
XPDDS19: How TrenchBoot is Enabling Measured Launch for Open-Source Platform ... by
XPDDS19: How TrenchBoot is Enabling Measured Launch for Open-Source Platform ...XPDDS19: How TrenchBoot is Enabling Measured Launch for Open-Source Platform ...
XPDDS19: How TrenchBoot is Enabling Measured Launch for Open-Source Platform ...The Linux Foundation
1K views17 slides
OSSA17 - Live patch, VMI, Security Mgmt (50 mins, no embedded demos) by
OSSA17 - Live patch, VMI, Security Mgmt (50 mins, no embedded demos)OSSA17 - Live patch, VMI, Security Mgmt (50 mins, no embedded demos)
OSSA17 - Live patch, VMI, Security Mgmt (50 mins, no embedded demos)The Linux Foundation
21K views43 slides
Scale17x: Thinking outside of the conceived tech comfort zone by
Scale17x: Thinking outside of the conceived tech comfort zoneScale17x: Thinking outside of the conceived tech comfort zone
Scale17x: Thinking outside of the conceived tech comfort zoneThe Linux Foundation
1.2K views50 slides
Xen Project 15 Years down the Line by
Xen Project 15 Years down the LineXen Project 15 Years down the Line
Xen Project 15 Years down the LineThe Linux Foundation
95.3K views47 slides
OSSEU17: How Open Source Project Xen Puts Security Software Vendors Ahead of ... by
OSSEU17: How Open Source Project Xen Puts Security Software Vendors Ahead of ...OSSEU17: How Open Source Project Xen Puts Security Software Vendors Ahead of ...
OSSEU17: How Open Source Project Xen Puts Security Software Vendors Ahead of ...The Linux Foundation
558 views32 slides

What's hot(20)

Fosdem 18: Securing embedded Systems using Virtualization by The Linux Foundation
Fosdem 18: Securing embedded Systems using VirtualizationFosdem 18: Securing embedded Systems using Virtualization
Fosdem 18: Securing embedded Systems using Virtualization
XPDDS19: How TrenchBoot is Enabling Measured Launch for Open-Source Platform ... by The Linux Foundation
XPDDS19: How TrenchBoot is Enabling Measured Launch for Open-Source Platform ...XPDDS19: How TrenchBoot is Enabling Measured Launch for Open-Source Platform ...
XPDDS19: How TrenchBoot is Enabling Measured Launch for Open-Source Platform ...
OSSA17 - Live patch, VMI, Security Mgmt (50 mins, no embedded demos) by The Linux Foundation
OSSA17 - Live patch, VMI, Security Mgmt (50 mins, no embedded demos)OSSA17 - Live patch, VMI, Security Mgmt (50 mins, no embedded demos)
OSSA17 - Live patch, VMI, Security Mgmt (50 mins, no embedded demos)
Scale17x: Thinking outside of the conceived tech comfort zone by The Linux Foundation
Scale17x: Thinking outside of the conceived tech comfort zoneScale17x: Thinking outside of the conceived tech comfort zone
Scale17x: Thinking outside of the conceived tech comfort zone
OSSEU17: How Open Source Project Xen Puts Security Software Vendors Ahead of ... by The Linux Foundation
OSSEU17: How Open Source Project Xen Puts Security Software Vendors Ahead of ...OSSEU17: How Open Source Project Xen Puts Security Software Vendors Ahead of ...
OSSEU17: How Open Source Project Xen Puts Security Software Vendors Ahead of ...
OSSEU18: NVDIMM and Virtualization - George Dunlap, Citrix by The Linux Foundation
OSSEU18: NVDIMM and Virtualization  - George Dunlap, CitrixOSSEU18: NVDIMM and Virtualization  - George Dunlap, Citrix
OSSEU18: NVDIMM and Virtualization - George Dunlap, Citrix
XPDDS19: Xen API Archaeology: Creating a Full-Featured VMI Debugger for the... by The Linux Foundation
XPDDS19:   Xen API Archaeology: Creating a Full-Featured VMI Debugger for the...XPDDS19:   Xen API Archaeology: Creating a Full-Featured VMI Debugger for the...
XPDDS19: Xen API Archaeology: Creating a Full-Featured VMI Debugger for the...
XPDDS17: Hypervisor-Based Security: Bringing Virtualized Exceptions Into the ... by The Linux Foundation
XPDDS17: Hypervisor-Based Security: Bringing Virtualized Exceptions Into the ...XPDDS17: Hypervisor-Based Security: Bringing Virtualized Exceptions Into the ...
XPDDS17: Hypervisor-Based Security: Bringing Virtualized Exceptions Into the ...
XPDS16: A Paravirtualized Interface for Socket Syscalls - Dimitri Stiliadis, ... by The Linux Foundation
XPDS16: A Paravirtualized Interface for Socket Syscalls - Dimitri Stiliadis, ...XPDS16: A Paravirtualized Interface for Socket Syscalls - Dimitri Stiliadis, ...
XPDS16: A Paravirtualized Interface for Socket Syscalls - Dimitri Stiliadis, ...
XPDDS19: Speculative Sidechannels and Mitigations - Andrew Cooper, Citrix by The Linux Foundation
XPDDS19: Speculative Sidechannels and Mitigations - Andrew Cooper, CitrixXPDDS19: Speculative Sidechannels and Mitigations - Andrew Cooper, Citrix
XPDDS19: Speculative Sidechannels and Mitigations - Andrew Cooper, Citrix
OSSJP/ALS19: The Road to Safety Certification: Overcoming Community Challeng... by The Linux Foundation
OSSJP/ALS19:  The Road to Safety Certification: Overcoming Community Challeng...OSSJP/ALS19:  The Road to Safety Certification: Overcoming Community Challeng...
OSSJP/ALS19: The Road to Safety Certification: Overcoming Community Challeng...
XPDDS19: Using Xen to Enable an Open Source Safety Certifiable Automotive Gra... by The Linux Foundation
XPDDS19: Using Xen to Enable an Open Source Safety Certifiable Automotive Gra...XPDDS19: Using Xen to Enable an Open Source Safety Certifiable Automotive Gra...
XPDDS19: Using Xen to Enable an Open Source Safety Certifiable Automotive Gra...
XPDDS18: Design Session - SGX deep dive and SGX Virtualization Discussion, Ka... by The Linux Foundation
XPDDS18: Design Session - SGX deep dive and SGX Virtualization Discussion, Ka...XPDDS18: Design Session - SGX deep dive and SGX Virtualization Discussion, Ka...
XPDDS18: Design Session - SGX deep dive and SGX Virtualization Discussion, Ka...
OSSEU18: From Handcraft to Unikraft: Simpler Unikernelization of Your Applica... by The Linux Foundation
OSSEU18: From Handcraft to Unikraft: Simpler Unikernelization of Your Applica...OSSEU18: From Handcraft to Unikraft: Simpler Unikernelization of Your Applica...
OSSEU18: From Handcraft to Unikraft: Simpler Unikernelization of Your Applica...
Scale 12x Securing Your Cloud with The Xen Hypervisor by The Linux Foundation
Scale 12x Securing Your Cloud with The Xen HypervisorScale 12x Securing Your Cloud with The Xen Hypervisor
Scale 12x Securing Your Cloud with The Xen Hypervisor
XPDDS18: Unikraft: An easy way of crafting Unikernels on Arm - Kaly Xin, ARM by The Linux Foundation
XPDDS18: Unikraft: An easy way of crafting Unikernels on Arm - Kaly Xin, ARMXPDDS18: Unikraft: An easy way of crafting Unikernels on Arm - Kaly Xin, ARM
XPDDS18: Unikraft: An easy way of crafting Unikernels on Arm - Kaly Xin, ARM

Similar to XPDDS19: Client Virtualization Toolstack in Go - Nick Rosbrook & Brendan Kerrigan, Assured Information Security, Inc.

DevOpsCon 2015 - DevOps in Mobile Games by
DevOpsCon 2015 - DevOps in Mobile GamesDevOpsCon 2015 - DevOps in Mobile Games
DevOpsCon 2015 - DevOps in Mobile GamesAndreas Katzig
190 views37 slides
CrikeyCon 2015 - iOS Runtime Hacking Crash Course by
CrikeyCon 2015 - iOS Runtime Hacking Crash CourseCrikeyCon 2015 - iOS Runtime Hacking Crash Course
CrikeyCon 2015 - iOS Runtime Hacking Crash Courseeightbit
1.4K views44 slides
Security research over Windows #defcon china by
Security research over Windows #defcon chinaSecurity research over Windows #defcon china
Security research over Windows #defcon chinaPeter Hlavaty
375 views33 slides
Wahckon[2] - iOS Runtime Hacking Crash Course by
Wahckon[2] - iOS Runtime Hacking Crash CourseWahckon[2] - iOS Runtime Hacking Crash Course
Wahckon[2] - iOS Runtime Hacking Crash Courseeightbit
274 views45 slides
cadec-2017-golang by
cadec-2017-golangcadec-2017-golang
cadec-2017-golangTiNguyn863920
7 views72 slides
Forge - DevCon 2016: Implementing Rich Applications in the Browser by
Forge - DevCon 2016: Implementing Rich Applications in the BrowserForge - DevCon 2016: Implementing Rich Applications in the Browser
Forge - DevCon 2016: Implementing Rich Applications in the BrowserAutodesk
577 views51 slides

Similar to XPDDS19: Client Virtualization Toolstack in Go - Nick Rosbrook & Brendan Kerrigan, Assured Information Security, Inc.(20)

DevOpsCon 2015 - DevOps in Mobile Games by Andreas Katzig
DevOpsCon 2015 - DevOps in Mobile GamesDevOpsCon 2015 - DevOps in Mobile Games
DevOpsCon 2015 - DevOps in Mobile Games
Andreas Katzig190 views
CrikeyCon 2015 - iOS Runtime Hacking Crash Course by eightbit
CrikeyCon 2015 - iOS Runtime Hacking Crash CourseCrikeyCon 2015 - iOS Runtime Hacking Crash Course
CrikeyCon 2015 - iOS Runtime Hacking Crash Course
eightbit1.4K views
Security research over Windows #defcon china by Peter Hlavaty
Security research over Windows #defcon chinaSecurity research over Windows #defcon china
Security research over Windows #defcon china
Peter Hlavaty375 views
Wahckon[2] - iOS Runtime Hacking Crash Course by eightbit
Wahckon[2] - iOS Runtime Hacking Crash CourseWahckon[2] - iOS Runtime Hacking Crash Course
Wahckon[2] - iOS Runtime Hacking Crash Course
eightbit274 views
Forge - DevCon 2016: Implementing Rich Applications in the Browser by Autodesk
Forge - DevCon 2016: Implementing Rich Applications in the BrowserForge - DevCon 2016: Implementing Rich Applications in the Browser
Forge - DevCon 2016: Implementing Rich Applications in the Browser
Autodesk 577 views
13 practical tips for writing secure golang applications by Karthik Gaekwad
13 practical tips for writing secure golang applications13 practical tips for writing secure golang applications
13 practical tips for writing secure golang applications
Karthik Gaekwad9.5K views
JavaZone 2017 - Microservices in action at the Dutch National Police by Bert Jan Schrijver
JavaZone 2017 - Microservices in action at the Dutch National PoliceJavaZone 2017 - Microservices in action at the Dutch National Police
JavaZone 2017 - Microservices in action at the Dutch National Police
Bert Jan Schrijver241 views
OpenValue meetup October 2017 - Microservices in action at the Dutch National... by Bert Jan Schrijver
OpenValue meetup October 2017 - Microservices in action at the Dutch National...OpenValue meetup October 2017 - Microservices in action at the Dutch National...
OpenValue meetup October 2017 - Microservices in action at the Dutch National...
Bert Jan Schrijver306 views
Microservices in action at the Dutch National Police by Bert Jan Schrijver
Microservices in action at the Dutch National PoliceMicroservices in action at the Dutch National Police
Microservices in action at the Dutch National Police
Bert Jan Schrijver203 views
Developing a mobile cross-platform library by Kostis Dadamis
Developing a mobile cross-platform libraryDeveloping a mobile cross-platform library
Developing a mobile cross-platform library
Kostis Dadamis969 views
A Tail of Two Containers: How docker made ci great again by Kyle Rames
A Tail of Two Containers: How docker made ci great againA Tail of Two Containers: How docker made ci great again
A Tail of Two Containers: How docker made ci great again
Kyle Rames400 views
Microservices in action at the Dutch National Police - Bert Jan Schrijver - C... by Codemotion
Microservices in action at the Dutch National Police - Bert Jan Schrijver - C...Microservices in action at the Dutch National Police - Bert Jan Schrijver - C...
Microservices in action at the Dutch National Police - Bert Jan Schrijver - C...
Codemotion468 views
CodeMotion Amsterdam 2018 - Microservices in action at the Dutch National Police by Bert Jan Schrijver
CodeMotion Amsterdam 2018 - Microservices in action at the Dutch National PoliceCodeMotion Amsterdam 2018 - Microservices in action at the Dutch National Police
CodeMotion Amsterdam 2018 - Microservices in action at the Dutch National Police
Bert Jan Schrijver202 views
Continuos Integration and Delivery: from Zero to Hero with TeamCity, Docker a... by Lean IT Consulting
Continuos Integration and Delivery: from Zero to Hero with TeamCity, Docker a...Continuos Integration and Delivery: from Zero to Hero with TeamCity, Docker a...
Continuos Integration and Delivery: from Zero to Hero with TeamCity, Docker a...
Everything-as-code - A polyglot adventure by QAware GmbH
Everything-as-code - A polyglot adventureEverything-as-code - A polyglot adventure
Everything-as-code - A polyglot adventure
QAware GmbH922 views
ApacheCon Core: Service Discovery in OSGi: Beyond the JVM using Docker and Co... by Frank Lyaruu
ApacheCon Core: Service Discovery in OSGi: Beyond the JVM using Docker and Co...ApacheCon Core: Service Discovery in OSGi: Beyond the JVM using Docker and Co...
ApacheCon Core: Service Discovery in OSGi: Beyond the JVM using Docker and Co...
Frank Lyaruu724 views

More from The Linux Foundation

ELC2019: Static Partitioning Made Simple by
ELC2019: Static Partitioning Made SimpleELC2019: Static Partitioning Made Simple
ELC2019: Static Partitioning Made SimpleThe Linux Foundation
4.1K views33 slides
XPDDS19 Keynote: Secret-free Hypervisor: Now and Future - Wei Liu, Software E... by
XPDDS19 Keynote: Secret-free Hypervisor: Now and Future - Wei Liu, Software E...XPDDS19 Keynote: Secret-free Hypervisor: Now and Future - Wei Liu, Software E...
XPDDS19 Keynote: Secret-free Hypervisor: Now and Future - Wei Liu, Software E...The Linux Foundation
941 views17 slides
XPDDS19 Keynote: Xen Dom0-less - Stefano Stabellini, Principal Engineer, Xilinx by
XPDDS19 Keynote: Xen Dom0-less - Stefano Stabellini, Principal Engineer, XilinxXPDDS19 Keynote: Xen Dom0-less - Stefano Stabellini, Principal Engineer, Xilinx
XPDDS19 Keynote: Xen Dom0-less - Stefano Stabellini, Principal Engineer, XilinxThe Linux Foundation
5.7K views23 slides
XPDDS19 Keynote: Patch Review for Non-maintainers - George Dunlap, Citrix Sys... by
XPDDS19 Keynote: Patch Review for Non-maintainers - George Dunlap, Citrix Sys...XPDDS19 Keynote: Patch Review for Non-maintainers - George Dunlap, Citrix Sys...
XPDDS19 Keynote: Patch Review for Non-maintainers - George Dunlap, Citrix Sys...The Linux Foundation
635 views36 slides
XPDDS19: Memories of a VM Funk - Mihai Donțu, Bitdefender by
XPDDS19: Memories of a VM Funk - Mihai Donțu, BitdefenderXPDDS19: Memories of a VM Funk - Mihai Donțu, Bitdefender
XPDDS19: Memories of a VM Funk - Mihai Donțu, BitdefenderThe Linux Foundation
521 views11 slides
XPDDS19: Keeping Coherency on Arm: Reborn - Julien Grall, Arm ltd by
XPDDS19: Keeping Coherency on Arm: Reborn - Julien Grall, Arm ltdXPDDS19: Keeping Coherency on Arm: Reborn - Julien Grall, Arm ltd
XPDDS19: Keeping Coherency on Arm: Reborn - Julien Grall, Arm ltdThe Linux Foundation
500 views37 slides

More from The Linux Foundation(20)

XPDDS19 Keynote: Secret-free Hypervisor: Now and Future - Wei Liu, Software E... by The Linux Foundation
XPDDS19 Keynote: Secret-free Hypervisor: Now and Future - Wei Liu, Software E...XPDDS19 Keynote: Secret-free Hypervisor: Now and Future - Wei Liu, Software E...
XPDDS19 Keynote: Secret-free Hypervisor: Now and Future - Wei Liu, Software E...
XPDDS19 Keynote: Xen Dom0-less - Stefano Stabellini, Principal Engineer, Xilinx by The Linux Foundation
XPDDS19 Keynote: Xen Dom0-less - Stefano Stabellini, Principal Engineer, XilinxXPDDS19 Keynote: Xen Dom0-less - Stefano Stabellini, Principal Engineer, Xilinx
XPDDS19 Keynote: Xen Dom0-less - Stefano Stabellini, Principal Engineer, Xilinx
XPDDS19 Keynote: Patch Review for Non-maintainers - George Dunlap, Citrix Sys... by The Linux Foundation
XPDDS19 Keynote: Patch Review for Non-maintainers - George Dunlap, Citrix Sys...XPDDS19 Keynote: Patch Review for Non-maintainers - George Dunlap, Citrix Sys...
XPDDS19 Keynote: Patch Review for Non-maintainers - George Dunlap, Citrix Sys...
XPDDS19: Memories of a VM Funk - Mihai Donțu, Bitdefender by The Linux Foundation
XPDDS19: Memories of a VM Funk - Mihai Donțu, BitdefenderXPDDS19: Memories of a VM Funk - Mihai Donțu, Bitdefender
XPDDS19: Memories of a VM Funk - Mihai Donțu, Bitdefender
XPDDS19: Keeping Coherency on Arm: Reborn - Julien Grall, Arm ltd by The Linux Foundation
XPDDS19: Keeping Coherency on Arm: Reborn - Julien Grall, Arm ltdXPDDS19: Keeping Coherency on Arm: Reborn - Julien Grall, Arm ltd
XPDDS19: Keeping Coherency on Arm: Reborn - Julien Grall, Arm ltd
XPDDS19: QEMU PV Backend 'qdevification'... What Does it Mean? - Paul Durrant... by The Linux Foundation
XPDDS19: QEMU PV Backend 'qdevification'... What Does it Mean? - Paul Durrant...XPDDS19: QEMU PV Backend 'qdevification'... What Does it Mean? - Paul Durrant...
XPDDS19: QEMU PV Backend 'qdevification'... What Does it Mean? - Paul Durrant...
XPDDS19: Status of PCI Emulation in Xen - Roger Pau Monné, Citrix Systems R&D by The Linux Foundation
XPDDS19: Status of PCI Emulation in Xen - Roger Pau Monné, Citrix Systems R&DXPDDS19: Status of PCI Emulation in Xen - Roger Pau Monné, Citrix Systems R&D
XPDDS19: Status of PCI Emulation in Xen - Roger Pau Monné, Citrix Systems R&D
XPDDS19: [ARM] OP-TEE Mediator in Xen - Volodymyr Babchuk, EPAM Systems by The Linux Foundation
XPDDS19: [ARM] OP-TEE Mediator in Xen - Volodymyr Babchuk, EPAM SystemsXPDDS19: [ARM] OP-TEE Mediator in Xen - Volodymyr Babchuk, EPAM Systems
XPDDS19: [ARM] OP-TEE Mediator in Xen - Volodymyr Babchuk, EPAM Systems
XPDDS19: Bringing Xen to the Masses: The Story of Building a Community-driven... by The Linux Foundation
XPDDS19: Bringing Xen to the Masses: The Story of Building a Community-driven...XPDDS19: Bringing Xen to the Masses: The Story of Building a Community-driven...
XPDDS19: Bringing Xen to the Masses: The Story of Building a Community-driven...
XPDDS19: Will Robots Automate Your Job Away? Streamlining Xen Project Contrib... by The Linux Foundation
XPDDS19: Will Robots Automate Your Job Away? Streamlining Xen Project Contrib...XPDDS19: Will Robots Automate Your Job Away? Streamlining Xen Project Contrib...
XPDDS19: Will Robots Automate Your Job Away? Streamlining Xen Project Contrib...
XPDDS19: Core Scheduling in Xen - Jürgen Groß, SUSE by The Linux Foundation
XPDDS19: Core Scheduling in Xen - Jürgen Groß, SUSEXPDDS19: Core Scheduling in Xen - Jürgen Groß, SUSE
XPDDS19: Core Scheduling in Xen - Jürgen Groß, SUSE
XPDDS19: Implementing AMD MxGPU - Jonathan Farrell, Assured Information Security by The Linux Foundation
XPDDS19: Implementing AMD MxGPU - Jonathan Farrell, Assured Information SecurityXPDDS19: Implementing AMD MxGPU - Jonathan Farrell, Assured Information Security
XPDDS19: Implementing AMD MxGPU - Jonathan Farrell, Assured Information Security
XPDDS19: Support of PV Devices in Nested Xen - Jürgen Groß, SUSE by The Linux Foundation
XPDDS19: Support of PV Devices in Nested Xen - Jürgen Groß, SUSEXPDDS19: Support of PV Devices in Nested Xen - Jürgen Groß, SUSE
XPDDS19: Support of PV Devices in Nested Xen - Jürgen Groß, SUSE
XPDDS19: Application Agnostic High Availability Solution On Hypervisor Level ... by The Linux Foundation
XPDDS19: Application Agnostic High Availability Solution On Hypervisor Level ...XPDDS19: Application Agnostic High Availability Solution On Hypervisor Level ...
XPDDS19: Application Agnostic High Availability Solution On Hypervisor Level ...
XPDSS19: Live-Updating Xen - Amit Shah & David Woodhouse, Amazon by The Linux Foundation
XPDSS19: Live-Updating Xen - Amit Shah & David Woodhouse, AmazonXPDSS19: Live-Updating Xen - Amit Shah & David Woodhouse, Amazon
XPDSS19: Live-Updating Xen - Amit Shah & David Woodhouse, Amazon
XPDDS19: Secure Unikraft Applications with Solo5 - Haibo Xu, ARM by The Linux Foundation
XPDDS19: Secure Unikraft Applications with Solo5 - Haibo Xu, ARMXPDDS19: Secure Unikraft Applications with Solo5 - Haibo Xu, ARM
XPDDS19: Secure Unikraft Applications with Solo5 - Haibo Xu, ARM
XPDDS19: The Xen-Blanket for 2019 - Christopher Clark and Kelli Little, Star ... by The Linux Foundation
XPDDS19: The Xen-Blanket for 2019 - Christopher Clark and Kelli Little, Star ...XPDDS19: The Xen-Blanket for 2019 - Christopher Clark and Kelli Little, Star ...
XPDDS19: The Xen-Blanket for 2019 - Christopher Clark and Kelli Little, Star ...
XPDSS19: Improve the Reliability and Efficiency of Late Microcode Update - Ch... by The Linux Foundation
XPDSS19: Improve the Reliability and Efficiency of Late Microcode Update - Ch...XPDSS19: Improve the Reliability and Efficiency of Late Microcode Update - Ch...
XPDSS19: Improve the Reliability and Efficiency of Late Microcode Update - Ch...

Recently uploaded

Page Object Model by
Page Object ModelPage Object Model
Page Object Modelartembondar5
7 views5 slides
Flask-Python by
Flask-PythonFlask-Python
Flask-PythonTriloki Gupta
10 views12 slides
The Path to DevOps by
The Path to DevOpsThe Path to DevOps
The Path to DevOpsJohn Valentino
6 views6 slides
.NET Deserialization Attacks by
.NET Deserialization Attacks.NET Deserialization Attacks
.NET Deserialization AttacksDharmalingam Ganesan
7 views50 slides
Ports-and-Adapters Architecture for Embedded HMI by
Ports-and-Adapters Architecture for Embedded HMIPorts-and-Adapters Architecture for Embedded HMI
Ports-and-Adapters Architecture for Embedded HMIBurkhard Stubert
35 views19 slides
Automated Testing of Microsoft Power BI Reports by
Automated Testing of Microsoft Power BI ReportsAutomated Testing of Microsoft Power BI Reports
Automated Testing of Microsoft Power BI ReportsRTTS
11 views20 slides

Recently uploaded(20)

Ports-and-Adapters Architecture for Embedded HMI by Burkhard Stubert
Ports-and-Adapters Architecture for Embedded HMIPorts-and-Adapters Architecture for Embedded HMI
Ports-and-Adapters Architecture for Embedded HMI
Burkhard Stubert35 views
Automated Testing of Microsoft Power BI Reports by RTTS
Automated Testing of Microsoft Power BI ReportsAutomated Testing of Microsoft Power BI Reports
Automated Testing of Microsoft Power BI Reports
RTTS11 views
Electronic AWB - Electronic Air Waybill by Freightoscope
Electronic AWB - Electronic Air Waybill Electronic AWB - Electronic Air Waybill
Electronic AWB - Electronic Air Waybill
Freightoscope 6 views
How to build dyanmic dashboards and ensure they always work by Wiiisdom
How to build dyanmic dashboards and ensure they always workHow to build dyanmic dashboards and ensure they always work
How to build dyanmic dashboards and ensure they always work
Wiiisdom16 views
Top-5-production-devconMunich-2023.pptx by Tier1 app
Top-5-production-devconMunich-2023.pptxTop-5-production-devconMunich-2023.pptx
Top-5-production-devconMunich-2023.pptx
Tier1 app10 views
JioEngage_Presentation.pptx by admin125455
JioEngage_Presentation.pptxJioEngage_Presentation.pptx
JioEngage_Presentation.pptx
admin1254559 views
Bootstrapping vs Venture Capital.pptx by Zeljko Svedic
Bootstrapping vs Venture Capital.pptxBootstrapping vs Venture Capital.pptx
Bootstrapping vs Venture Capital.pptx
Zeljko Svedic16 views
aATP - New Correlation Confirmation Feature.pptx by EsatEsenek1
aATP - New Correlation Confirmation Feature.pptxaATP - New Correlation Confirmation Feature.pptx
aATP - New Correlation Confirmation Feature.pptx
EsatEsenek1222 views
Advanced API Mocking Techniques Using Wiremock by Dimpy Adhikary
Advanced API Mocking Techniques Using WiremockAdvanced API Mocking Techniques Using Wiremock
Advanced API Mocking Techniques Using Wiremock
Dimpy Adhikary5 views
How To Make Your Plans Suck Less — Maarten Dalmijn at the 57th Hands-on Agile... by Stefan Wolpers
How To Make Your Plans Suck Less — Maarten Dalmijn at the 57th Hands-on Agile...How To Make Your Plans Suck Less — Maarten Dalmijn at the 57th Hands-on Agile...
How To Make Your Plans Suck Less — Maarten Dalmijn at the 57th Hands-on Agile...
Stefan Wolpers44 views
Transport Management System - Shipment & Container Tracking by Freightoscope
Transport Management System - Shipment & Container TrackingTransport Management System - Shipment & Container Tracking
Transport Management System - Shipment & Container Tracking
Freightoscope 6 views

XPDDS19: Client Virtualization Toolstack in Go - Nick Rosbrook & Brendan Kerrigan, Assured Information Security, Inc.

  • 1. Client Virtualization Toolstack in Go Nicholas Rosbrook, Software Engineer, Assured Information Security Brendan Kerrigan, Principal Software Engineer, Assured Information Security
  • 2. Overview • Introduction • Motivation • Evaluation • Redfield and redctl • Libxl Go (Golang) bindings • Questions
  • 3. Introduction • Brendan Kerrigan – Principal Engineer at Assured Information Security, Inc. • Hypervisors • Graphics virtualization • Embedded • Nicholas Rosbrook – Software Engineer at Assured Information Security, Inc. • Cryptography • VPNs and Networking • Go expert
  • 4. Motivation • We do a lot of client virtualization work • Utilizing hypervisors to do end point security • Mostly OpenXT based products now • OpenXT isn’t the easiest project to work on (10 years of development means there are lots of components) • Sometimes key high-security features can be a hindrance to some use cases • Client virtualization is pretty different than server virtualization • Especially when it comes to toolstacks
  • 5. Evaluation • What’s out there we can leverage? • XenMgr • Libvirt (+ qubectl) • What if we had a clean slate?
  • 6. XenMgr • XenMgr is high friction • Haskell • Esoteric • Tough to find developers • Lots of legacy interfaces that are unexercised and unaudited (audit in progress) • A lot of cryptic code that essentially reads a database and writes an xl config and calls exec/fork • Local and remote APIs are different  • The command line tool is great
  • 7. Libvirt • One layer of abstraction too many • XML domain configurations are too complex • Designed to work with several virtualization technologies – KVM, Xen, LXC, etc. • We want to work with Xen and do it well • Does a lot more than we need it to • There is an existing Go package (developed by DigitalOcean)
  • 8. redctl • Introducing redctl, the client toolstack to our Xen distribution, Redfield • The good: • A client toolstack where remote and local management APIs are unified • Utilize gRPC • Don’t dictate transport (IPv4, IPv6, PV channels, Argo, vsock) • Easy to understand and test language (Go) • Make the command line tool awesome (like XenMgr’s) • The bad: • Still doing exec/fork a lot when dealing with libxl…
  • 9. What is cgo? • Cgo enables Go programs to call C code through a pseudo- package, “C” • Allows access of C types, variables, and functions • E.g. C.size_t, C.stdout, C.printf • The “preamble” • A block comment used to include headers, set CFLAGS, LDFLAGS, etc. • Immediately precedes the import “C” statement
  • 11. What is cgo? • C fields that cannot be expressed in Go are omitted • The C type void* is represented by Go’s unsafe.Pointer • Cannot call C function pointers from Go • There are some restrictions on passing pointers between C and Go
  • 12. Writing a Go Package for libxl • Writing the cgo code by hand is tedious • Cgo is simple enough to make code generation easy • We use c-for-go: https://github.com/xlab/c-for-go • Define translation and generation rules with a YAML configuration file • Accept or ignore symbols, rename variables, apply rules to a given scope, and more
  • 13. Writing a Go Package for libxl
  • 14. Writing a Go Package for libxl • Finally, we need some wrappers…
  • 15. Writing a Go Package for libxl • Instead of:
  • 16. Writing a Go Package for libxl • We want:
  • 17. Future Work • Continue writing wrappers • Trim the size of the package • Integrate into redctl • Upstream • Current fork: https://github.com/enr0n/xen/tree/libxl-go