Rust in the Linux Kernel

Its getting the push it needs. Opinions. How do we all feel about it?

Personally I think the push for rust is a good thing… Mainly because while I love C the language opens the developer up to memory leaks and buffer overflows and a slew of other poor memory management bugs. When you’re done with a variable you’ve created, you should explicitly destroy it however most people arent always taught this in Computer Science school or throughout their certifications. when you dont do so the old orphaned variables accumulate until the system crashes. You can also overflow from pushing to much into a smaller piece of memory. You can see these happen sometimes when a developer isnt memory conscious so I think a memory managing language is a good model for the way forward. Might help seal up security holes. In other ways it might not. You still have to be careful with rust.

I do see some limitations. LLVM does not have the widest architectural support yet.

https://www.phoronix.com/scan.php?page=news_item&px=Linux-2020-Highlights

https://www.phoronix.com/scan.php?page=news_item&px=Rust-For-Linux-April-2021-RFC

https://www.phoronix.com/scan.php?page=news_item&px=Google-More-Linux-Security

2 Likes

I’m by no means a programmer. However, despite how people may feel about it syntactically, Rust is comparable to C speed wise and memory-safety is beneficial especially at lower levels. LLVM does have its downsides, but their is a project to get Rust running on GCC.

Ok.

Who cares and why?

its a good bit faster than C. But yeah. I wouldnt want to use GCC though I mean then the process is Rust > C > assembly if I understand right…

overall I think LLVM is Rust > Assembly > Machine code?

I think the articles answer a lot of your question. Reading them would be a good start

The issue right now particularly with new developers is that they didnt learn good memory management. You could be just as safe with C and have no issue. So its a big selling point to instead of teach them have the language do it for them.

In any case another big selling point of rust is parallelization

1 Like

if you don’t you could just walk away

3 Likes

That’ll be the main selling point. Potential future of kernel and os structure running parallel mode as the system gets bigger and number of cores is whatever?

its pretty equal but memory safety is the most important and most major