Wedson Almeida Filho is a Microsoft engineer who has been prolific in his contributions to the Rust for the Linux kernel code over the past several years. Wedson has worked on many Rust Linux kernel features and even did a experimental EXT2 file-system driver port to Rust. But he’s had enough and is now stepping away from the Rust for Linux efforts.

From Wedon’s post on the kernel mailing list:

I am retiring from the project. After almost 4 years, I find myself lacking the energy and enthusiasm I once had to respond to some of the nontechnical nonsense, so it’s best to leave it up to those who still have it in them.

I truly believe the future of kernels is with memory-safe languages. I am no visionary but if Linux doesn’t internalize this, I’m afraid some other kernel will do to it what it did to Unix.

Lastly, I’ll leave a small, 3min 30s, sample for context here: https://youtu.be/WiPp9YEBV0Q?t=1529 – and to reiterate, no one is trying force anyone else to learn Rust nor prevent refactorings of C code."

You are viewing a single thread.
View all comments View context
-34 points

The cognitive load of writing safe C, and the volume of extra code it requires, is the problem of C.

Oh no, i’m having a meltdown with all the cognitive load…

Build all the fancy tools you want. At the end of the day if you put a monkey at the wheel of a Ferrari you’ll still have problems.

Nice that Rust is memory-safe, use it if you want, but why the insistence on selling Rust via C is crap? Doesn’t earn you any points.

How about rustaceans fork the kernel and once it’s fully Rust-only then try and get it to be used instead of the current one… win-win, eh?

permalink
report
parent
reply
19 points

Yes a monkey. All the vulnerabilities that have happened over the decades are just bad c programmers. So the question is are there any good c programmers?

permalink
report
parent
reply
0 points

It’s not just about bad/good C programmers. It’s also about how much of the context, the given C programmer has read to make sure they know enough of what they are doing.

No matter how good one is at Programming, they need to make sure to read and remember what is happening in relevant parts of code, while making their one off contribution.

That’s where the part of “leaving it to the computer” comes in. Hence, the usefulness of code checkers and even better if the compiler itself enforces the stuff. As long as the rules are good enough.

Let’s just hope we are not jumping to another language 20 years down the line.

Anti Commercial-AI license

permalink
report
parent
reply
35 points

I’m not insisting anything; stating C is not a memory-safe language isn’t a subjective opinion.

Note I’m not even a Rust fan; I still prefer C because it’s what I know. But the kernel isn’t written by a bunch of Lewis Hamiltons; so many patches are from one-time contributors and the kernel continues to get inundated with memory safety bugs that no amount of infrastructure, testing, code review, etc is catching. Linux is written by monkeys with a few Hamiltons doing their best to review everything before merging.

Linus has talked about this repeatedly over the past few years at numerous conferences and there’s a reason he’s integrating Rust drivers and subsystems (and not asking them to fork as you are suggesting) to stop the kernel stagnating and to begin to address the issues like one-off patches that aren’t maintained by their original author and to start squashing the volume of memory corruption bugs that are causing 2/3rds of the kernel’s vulnerabilities.

permalink
report
parent
reply
-21 points

the kernel continues to get inundated with memory safety bugs that no amount of infrastructure, testing, code review, etc is catching.

I’d say this is the issue to fix. It’s not easy but if anything curl has proven it can be done efficiently.

permalink
report
parent
reply
33 points

Yeah, let’s see what Bagder has to say about this:

C is unsafe and always will be

The C programming language is not memory-safe. Among the 150 reported curl CVEs, we have determined that 61 of them are “C mistakes”. Problems that most likely would not have happened had we used a memory-safe language. 40.6% of the vulnerabilities in curl reported so far could have been avoided by using another language.

Rust is virtually the only memory-safe language that is starting to become viable.

https://daniel.haxx.se/blog/2023/12/13/making-it-harder-to-do-wrong/

permalink
report
parent
reply
1 point

Someone stubbed a toe here.

permalink
report
parent
reply
4 points

At the end of the day if you put a monkey at the wheel of a Ferrari you’ll still have problems.

My eyes are rolling onto the floor and down the stairs.

permalink
report
parent
reply
2 points

I honestly like the cognitive load. Just not when I am at the workplace, having to deal with said load, with the office banter in the background and (not so) occasionally, being interrupted for other stuff.
And my cognitive load is not even about the memory allocations, most of the time.

Off topic:

I think, if one is seriously learning programming from a young age, it is better to start with C, make a project, big enough to feel the difficulty and understand what the cognitive load is all about and get used to it, hence increasing their mental capability. Then learn the memory safe language of their choice.
I never made a big enough project in C, but you can get to feel the load in C++ too.

permalink
report
parent
reply

Linux

!linux@lemmy.ml

Create post

From Wikipedia, the free encyclopedia

Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).

Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word “Linux” in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.

Rules

  • Posts must be relevant to operating systems running the Linux kernel. GNU/Linux or otherwise.
  • No misinformation
  • No NSFW content
  • No hate speech, bigotry, etc

Related Communities

Community icon by Alpár-Etele Méder, licensed under CC BY 3.0

Community stats

  • 8.1K

    Monthly active users

  • 3.7K

    Posts

  • 48K

    Comments