The Case for Writing Network Drivers in High-Level Programming Languages

09/13/2019
by   Paul Emmerich, et al.
0

Drivers are written in C or restricted subsets of C++ on all production-grade server, desktop, and mobile operating systems. They account for 66 in Linux, but 39 out of 40 security bugs related to memory safety found in Linux in 2017 are located in drivers. These bugs could have been prevented by using high-level languages for drivers. We present user space drivers for the Intel ixgbe 10 Gbit/s network cards implemented in Rust, Go, C#, Java, OCaml, Haskell, Swift, JavaScript, and Python written from scratch in idiomatic style for the respective languages. We quantify costs and benefits of using these languages: High-level languages are safer (fewer bugs, more safety checks), but run-time safety checks reduce throughput and garbage collection leads to latency spikes. Out-of-order CPUs mitigate the cost of safety checks: Our Rust driver executes 63 reference C implementation. Go's garbage collector keeps latencies below 100 μs even under heavy load. Other languages fare worse, but their unique properties make for an interesting case study. All implementations are available as free and open source at https://github.com/ixy-languages/ixy-languages.

READ FULL TEXT

page 1

page 2

page 3

page 4

research
07/27/2021

Development of a NIC driver in C#

Drivers have a special status among the developer community that sees th...
research
03/17/2016

An Implementation and Analysis of a Kernel Network Stack in Go with the CSP Style

Modern operating system kernels are written in lower-level languages suc...
research
01/30/2019

Writing User Space Network Drivers

The rise of user space packet processing frameworks like DPDK and netmap...
research
01/30/2019

User Space Network Drivers

The rise of user space packet processing frameworks like DPDK and netmap...
research
03/01/2021

IntelliGen: Automatic Driver Synthesis for FuzzTesting

Fuzzing is a technique widely used in vulnerability detection. The proce...
research
02/18/2022

Debootstrapping without Archeology: Stacked Implementations in Camlboot

Context: It is common for programming languages that their reference imp...
research
12/31/2012

The Geant4 Visualisation System - a multi-driver graphics system

From the beginning the Geant4 Visualisation System was designed to suppo...

Please sign up or login with your details

Forgot password? Click here to reset