Linux Format

HITTING THE M1

- Jon Masters has been involved with Linux for more than 22 years.

There was recently the first (but likely far from the last) Rust for Linux conference, known as “Kangrejos”. The purpose of the conference was to further work toward supporting Rust inside the kernel, specifical­ly in driver code. Much interest in Rust exists within various communitie­s because it simultaneo­usly targets system programmer­s, but also aims to eliminate various memory safety issues inherent to C code. These issues arise from “UB” or Undefined Behaviour, and there’s a lot of it in the C programmin­g language.

Rust aims to be both fast (and thus suitable for low-level programmin­g) but also safe, since it provides careful tracking of the ownership of memory (pointer safety). For example allowing only one owner of an object, along with a mechanism (known as borrowing) for temporaril­y passing references between code functions. All of this is well and good, but I must confess that my first reaction to seeing talk of Rust inside the kernel was more along the lines of “here we go again”.

This is, however, what happens when you get set in your ways, and it can be a dangerous thing. I’ve been using Linux since the mid-90s, and as I enter my 40s soon, I seek to remind myself that I don’t want to be “that guy” in the rocking chair yelling at the kids to get off my lawn. It’s time to play with Rust and see what the fuss is about. I’ll write up my adventures with Rust in a future issue. In the interim, readers may enjoy Paul McKenney’s new blog series on the topic (paulmck. livejourna­l.com), beginning with adventures in the memory model.

 ?? ??

Newspapers in English

Newspapers from Australia