Kangrejos 2021

The Rust for Linux Workshop

September 13-14-15

15:00 - 18:30 UTC

September 13 (Monday)

Kickstart talk: Rust for Linux

~60 mins

— Miguel Ojeda

Discussion

~30 mins

Break

~30 mins

Invited talk: High Velocity Kernel Modules in Rust with Bento

~45 mins

— Samantha Miller

High development velocity is critical for modern systems. Linux is facing increased development pressure from new hardware and new demands on the operating system, particularly from cloud providers. However, high velocity Linux kernel development is challenging due to the ease of introducing bugs, the difficulty of testing and debugging, and the lack of support for redeployment without service disruption. Existing approaches to high-velocity development of large Linux modules have major downsides, such as the high performance penalty for FUSE file systems.

In this talk, I’ll discuss our work on Bento, a framework for faster development in the Linux kernel. Bento kernel modules are written in safe Rust, reducing the potential for bugs, and can be upgraded without interruption. We have implemented the Bento framework for file system modules and used it to implement a file system with performance similar to ext4 that can be upgraded without unmounting and with only 15ms of downtime. We’re currently working on expanding Bento to support custom TCP/IP stacks.

Invited talk: How can we formally verify Rust for Linux?

~30 mins

— Alastair Reid

Using Rust in Linux aims to create more solid, secure code: avoiding memory safety issues and concurrency issues by taking advantage of Rust's language features and by designing a safe API for drivers to use. This talk examines how / whether we can go further using automatic formal verification tools.

  • Can we go beyond the checks that Rust provides?
  • What additional checks would we want to perform?
  • What can be done using the tools that exist today?
  • What needs to be done to make this useful to developers? (Spoiler: we are not there yet)

September 14 (Tuesday)

Kickstart talk: Rust key concepts for the Linux kernel (I)

~60 mins

— Miguel Ojeda

Discussion

~30 mins

Break

~30 mins

Invited talk: The Thread wrapper for Rust in Linux kernel

~45 mins

— Boqun Feng

A kernel thread is one of the most important components in the kernel, and it's also a necessary piece to implement other core subsystems in the kernel. This topic will share a learning process on how to implement the wrapper for Rust std-like Thread in Linux kernel, the current status and the future work.

September 15 (Wednesday)

Kickstart talk: Rust key concepts for the Linux kernel (II)

~60 mins

— Wedson Almeida Filho

Discussion

~30 mins

Break

~30 mins

Invited talk: Writing an embedded SPI-based Linux driver in Rust

~60 mins

— Arthur Cohen, Esteban Blanc, Martin Schmidt

While Linux is not primarily an embedded-focused operating system, it is still used on platforms such as the Raspberry Pi. In the case of these platforms, kernel modules provide a helpful way to interact with various devices at a kernel level, which often communicate using low-level protocols, such as SPI or I2C.

Using Rust for that kind of workloads provides numerous advantages, and while the kernel API for these protocols has been tried and tested for a very long time, there are currently no Rust abstractions available.

In this presentation, we will talk about our ongoing effort to bring an abstraction over the SPI protocol in safe Rust, for Linux, on the ARM64 platform, and how we used it to implement a simple device driver. The talk will draw comparisons against the original implementation in C, which provides the same amount of features. Finally, we will dive into the techniques used and our experience working with Rust-for-Linux.

Invited talk: Implementing the Iterator trait for seq_file

~30 mins

— Adam Bratschi-Kaye

The seq_file interface in the kernel allows easy creation of virtual files by implementing an interface that iterates over values which can be printed. It seemed like this should directly translate into the Rust trait of an Iterator where Item implements Display, but of course the devil is in the details. I'll show what I did to provide an interface to seq_file for Rust code.