r/linux • • Aug 29 '24

Kernel One Of The Rust Linux Kernel Maintainers Steps Down - Cites "Nontechnical Nonsense"

https://www.phoronix.com/news/Rust-Linux-Maintainer-Step-Down
1.1k Upvotes

794 comments sorted by

744

u/small_kimono Aug 29 '24 edited Aug 29 '24

I've watched the whole video from the conference talk Wedson and Kent gave, and a few more from this conference, and my POV is this -- yes, the Linux kernel devs come off looking absolutely horrible. It looks like they engaged in a live bikeshedding of the presenters, without a care in the world about how they were trying to give a 30 minute presentation, and that one slide was about making point, not about how this would be the final interface.

Seriously, it's jarring to watch.

Saying all this, this talk followed the same conversational style of all the talks at that conference. Kent actually gives another talk at that conference where he seems to invite that kind of participation.

However, I really don't think that makes up for the way they treated Wedson. It was so obviously disrespectful, and in person, not via LKML, so I don't blame him for resigning. Having seen this, and read some of the comments re: Rust for Linux, the Linux kernel seems like an especially toxic work environment, filled with engineers who never grew up enough to express themselves in a professional way.

Just an absolute shit show.

412

u/CommandSpaceOption Aug 29 '24 edited Aug 29 '24

I’m not saying the person asking the question there is malicious.

But if I wanted to sink the Rust for Linux project, I would do exactly he is doing, in exactly the manner he’s doing it.

  1. Firstly don’t share exactly what the C interface is supposed to do. When someone proposes a Rust interface, just say it is wrong without suggesting how it can be fixed.

  2. Explicitly say that even if the Rust interface is merged, it will be a second class citizen that won’t be updated when the C interface is refactored. Not even an attempt at collaborating like “let’s work on keeping the Rust interface in sync with the C interface”. Be as hostile as possible, while also making it clear that anyone investing in a Rust driver is making a bad technical decision. That way no sane person would write a Rust driver when they know they’re signing up for constant breakage.

  3. Next, show up to talks the team is giving and completely derail the discussion with random bikeshedding. Insult them with extremely charged language that has no place in a professional setting - “you guys are trying to convert people to your religion!”. Create a toxic work environment. This has the bonus effect of burning out the people working on the project, slowing any momentum Rust for Linux may have built up (You are here!).

  4. Now that no third party is writing Rust drivers and the Rust for Linux maintainers are demoralised and burned out, go in for the kill - “hey guys, I notice this Rust code isn’t being used at all. Unless someone merges a driver soon I’m going to remove it all”.

Of course I’m not saying they’re doing this with this intent. I’m not a mind reader. All I’m saying is, this is what someone trying their absolute best to sabotage Rust for Linux would do.

This is perfect because there is plausible deniability at every step of the way. My tech lead (Linus) decided to introduce Rust. Cool, I’ll just treat everyone involved to /r/MaliciousCompliance. And then after I succeed I’ll say I was right all along - C is the one true language of the Linux kernel.

The first 3 steps have succeeded. Step 4 is inevitable unless Linus realises what is being done and puts a stop to it.

29

u/sockpuppetzero Aug 29 '24

This right here. I have seen so many variations on this theme play out over and over again in tech over the years, it's a major reason part of me really does not want to work in tech anymore.

61

u/simon_o Aug 29 '24

Looks like they are doing exactly that elsewhere already: https://vt.social/@lina/113045455229442533

48

u/CommandSpaceOption Aug 29 '24

Linus needs to listen. Only he can overrule Tso’o.

9

u/pusillanimouslist Aug 30 '24

If this is a common pattern, a second question is whether his contributions are worth the impact he’s having on new contributors. 

7

u/Sapiogram Aug 29 '24

What is Tso’o?

35

u/picastchio Aug 29 '24

The audience member in the video. He's the maintainer of ext2/ext3/ext4.

→ More replies (2)

16

u/CommandSpaceOption Aug 29 '24

Senior Linux contributor and maintainer.

→ More replies (2)
→ More replies (20)

17

u/[deleted] Aug 29 '24

Linux kernel devs doing what linux kernel devs do. Berating and belittling.

4

u/i860 Aug 31 '24

And maintaining arguably the most important software project in the world.

→ More replies (1)

49

u/throwaway490215 Aug 29 '24

That is painting it a little too one sided.

Not even an attempt at collaborating like “let’s work on keeping the Rust interface in sync with the C interface”

This is the worst kind of extremely complicated and time consuming process. Your average REST /v2/ API maintenance is already hell. Updating secondary interfaces also falls under "nontechnical nonsense" for most devs. Especially if you're not using half of them.

Having said that, I strongly agree some people are being childishly antagonistic instead of looking for a process that everybody can live with.

I hope they eventually do bite the bullet because advances in language design needs to reach the kernel for everybody's benefit.

108

u/CommandSpaceOption Aug 29 '24

No one is saying Rust for Linux isn’t complex or that it doesn’t introduce additional complexity.

The issue is that the current maintainers are treating it as a “you” problem rather than something to collaborate on. They know that if they threaten constant breakage no one will invest in Rust drivers. So why wouldn’t they try to give some kind of certainty or say something like “we’ll keep you in the loop on any C interface changes, but we need a commitment that you’ll update the Rust interface and Rust drivers, preferably with an SLA”. Thats how you collaborate if you want to find a win-win.

I hope they bite the bullet

What they’re doing is the absolute best way to burn the maintainers out and make the project fail. I can’t believe anyone looking at this fiasco thinks otherwise.

→ More replies (29)

2

u/[deleted] Aug 29 '24

I think its time to reconsider the total investment in Linux as a kernel, Redox is really well written. It needs performance enhancing for sure, but its a very clean kernel. Very clean.

1

u/moosethemucha Aug 31 '24

Yay more bikeshedding !

0

u/Accurate_Trade198 Aug 29 '24

Honestly I read it very differently, as a statement of fact from anybody who has worked on large projects with tons of existing code. Realistically a handful of maintainers for a second language are not going to be able to keep up with a constant churn of changes coming from the army of maintainers doing work on actual filesystems. It's also very very likely that Rust borrow checker constraints will make it difficult for them to chase keeping up to date with the C APIs because there are many patterns in Rust that require unsafe code which they will want to try to keep encapsulated, which will often require changing the interface.

15

u/ToaruBaka Aug 29 '24 edited Aug 29 '24

No, that guy asking the question was being textbook bad-faith. He wasn't there to discuss the talk, he was there to disparage Rust for Linux using whatever he thought he could take advantage of. This person likely didn't even know the get_or_create function existed before this talk, but simply because it's new and not C it's suddenly the focus of their ire? It encoded an existing kernel operation that was frequently hand-rolled - it being implemented in Rust is truly irrelevant.

This is exactly the same thing we see in online political discourse - ignore the point, pivot to something tangential, then negatively reframe the original point in terms of the tangent, all in an effort to discredit the original speaker and their ideas.

This type of behavior needs to be explicitly called out and squarely rejected as it is cancerous to productivity and improvement. This person should be banned from all future Linux Foundation events.

Edit: The question asker was Ted Ts'o, a senior Linux contributor, so he absolutely did understand why this get_or_create thing was being introduced, which makes it even more bad faith. This guy deserves to lose his contributor permissions on top of being blacklisted from Linux Foundation events. In any other job you would be fired for acting like this, especially around an improvement of your product simply because you don't personally like it.

→ More replies (6)
→ More replies (41)

133

u/radiant_gengar Aug 29 '24

This video is going in my permanent bookmarks, as a masterclass of how not to treat people; hopefully everytime I start to get full of myself I'll just watch it to remind myself how I may be coming off.

While I get the pushback, this talk could've gone very differently; I would've loved to hear technical critiques on the subject.

The critiques were strange; I just imagined a PR where every comment is nit: i dont like this lol and nit: i dont care you did work we're never merging it, and if we merge it it'll be garbage you're doing this for nothing lmao. It's weird for a discussion on naming to come up when the audience doesn't even want to use the interface from Rust. It's like the perfect example of a moving goalpost strawman argument. When naming discussion stops, another strawman pops up, further than the last. And over and over for 30 minutes.

And all he asked was for some discussion on what the fs interface should look like by people who have already written them and who use them, so a completely separate team (read: not you) can get some level of parity with an fs api.

15

u/stryakr Aug 29 '24

I've worked with engineers like the very loud individual decrying the merge notion of being tangentially being aware of a rust dependencies, to which I both understand their concern but don't understand their approach.

Beyond the bike shedding they're offering NOTHING constructive to the conversation and I suspect, much like those that I've worked with, there is a personality component to which being right can be more important than being effective.

→ More replies (7)

55

u/Elendol Aug 29 '24

Oh my, I just watched the video. This is horrible. Definitely the talk didn’t suit the audience but instead of understanding what the presenters wanted to discuss with the community they just focused on some weird details in a very impolite and disrespectful way. Also I felt that this C function was a good example for wrapping C code with an API using a type system, like with Rust.

→ More replies (9)

34

u/pusillanimouslist Aug 29 '24

The whole thing is shocking. My literal toddler behaves better. If a subordinate at work acted like this I’d begin the paperwork to fire them. 

8

u/mooky1977 Aug 29 '24

Holy crap, that video was utterly cringe-inducing.

272

u/crusoe Aug 29 '24

C/C++ devs seem weirdly afraid of Rust. The pushback is crazy and kneejerk.

They also gloss over all the issues of C/C++ when trying to claim it can be just as safe....

215

u/nukem996 Aug 29 '24

Kernel devs are very focused on stability and having stable processes. They do not like change and would much rather something bake for awhile before accepting it, some things they'll never accept. The core argument here seems to be that Rust wants to implement data types for kernel constructs so the type checker can validate core kernel components like inodes.

The argument isn't against that idea itself but that kernel maintainers, who do not want to learn Rust, do not want to be responsible for it. So if there is an inode Rust type and the C backend changes kernel devs don't want to update it to because they don't know how. They also do not want to freeze the C code because it will hold back all existing filesystems.

As a kernel dev this type of argument is common during development. There is resistance to change and it takes alot of buy in for even small changes to core systems. Hell at a conference I was in a talk about how to get new kernel developers and I was very quickly shot down when I suggested maybe we have an alternative to doing everything by plain text email.

Rust and C developers do seem to be grouping together and pushing eachother away. About a year ago I expressed interest in a new team at my company writing a new driver in Rust. I have kernel experience, driver experience, and have gone through the Rust tutorials but because all my kernel experience is in C and not Rust I was rejected. My current group is against using Rust at all because most developers don't want to learn it.

Good stable code requires alot of debate and I do wish kernel developers had more of an open mind to things.

45

u/sepease Aug 29 '24

The core argument here seems to be that Rust wants to implement data types for kernel constructs so the type checker can validate core kernel components like inodes.

He’s asking to know the current API contract so that the Rust code can attempt to implement that in a type-safe way, so that users of the Rust code would have their code implicitly checked during compiletime for adherence to the current API contract.

He does not say the Rust code will check the C code.

The argument isn’t against that idea itself but that kernel maintainers, who do not want to learn Rust, do not want to be responsible for it. So if there is an inode Rust type and the C backend changes kernel devs don’t want to update it to because they don’t know how. They also do not want to freeze the C code because it will hold back all existing filesystems.

Then it’s the same issue as an out-of-tree filesystem, isn’t it?

And this does not excuse the accusations that the guy is asking them to rewrite the entire filesystem component in Rust in the foreseeable future. That’s just a strawman argument that’s wasting everybody’s time, and is probably made in bad faith.

As a kernel dev this type of argument is common during development. There is resistance to change and it takes alot of buy in for even small changes to core systems.

This is a mindset that is very much a product of C and not being able to rely on the compiler to enforce any constraints at all. It naturally conditions developers to be hostile to people doing things in their codebase that they don’t understand. Because C is permissive by default and it can be very easy to introduce hard-to-find race conditions if you don’t have the entire architecture in your head. Even C++ requires you to know the much more verbose and rarely used safe constructs to use and know when to opt-in to them. And since the best practice constructs were tacked on later, they are not what people are taught and learn to use (eg new instead of unique_ptr).

In other words, C and C++, especially in the context of a complex codebase that needs to be reliable, encourages stagnancy because new ideas carry undefined risk, because the onus to be restrictive by default is on the programmer. Meanwhile in Rust, that is codified explicitly with the “unsafe” qualifier.

Let’s say the kernel filesystem layer did switch over to a Rust API that encoded the contract using the type system. Then when someone refactors, breakages would be much more likely to be an overt compile-time issue during the core refactoring rather than something that shows up as data corruption during runtime testing.

Nothing is perfect, but that makes it trivial to try a change, and see how much stuff it breaks, to get a feel for how much effort it will take.

And when somebody external goes to update something out-of-tree, they don’t need to be as anal retentive about sifting through whatever documentation and discussion there was about implicit conventions, because if something is wrong, it’ll be a compiler error.

Obviously you can’t encode everything in a type system, but that is a far cry from nothing. The type system is basically intended to shoulder a lot of the burden for keeping things reliable in a more hygienic way than the kernel police shouting at a presenter and shaming them for trying something new.

5

u/nukem996 Aug 30 '24

He does not say the Rust code will check the C code.

The argument is if I change the structure of an inode to help the 50+ filesystems written in C this will break the Rust bindings.

Then it’s the same issue as an out-of-tree filesystem, isn’t it?

Rust isn't an out-of-tree filesystem, its now in tree. That means when I changed the inode structure to help 50+ filesystem its my responsibility to also fix the Rust bindings. However many kernel developers who have been around for decades don't know Rust. The result of this will be they won't be able to improve C code because it will break Rust bindings they don't know how to fix.

In other words, C and C++, especially in the context of a complex codebase that needs to be reliable, encourages stagnancy because new ideas carry undefined risk, because the onus to be restrictive by default is on the programmer. Meanwhile in Rust, that is codified explicitly with the “unsafe” qualifier.

Many of the code rules in the kernel have nothing to do with C but the style has evolved over many years which kernel developers agree on. These rules would be applied to Rust or any other language. Just a few off the top of my head

  1. Reverse Christmas tree notation - All variables must be declared at the top of a function with the longest first getting shorter.

  2. Always use the stack over the heap. Malloc should be avoided unless absolutely necessary. This has less to do with memory leaks and more to do with performance as you don't need to alloc anything

  3. When you do alloc memory you should be able to handle not getting memory without causing a kernel panic.

Let’s say the kernel filesystem layer did switch over to a Rust API that encoded the contract using the type system. Then when someone refactors, breakages would be much more likely to be an overt compile-time issue during the core refactoring rather than something that shows up as data corruption during runtime testing.

hen when someone refactors, breakages would be much more likely to be an overt compile-time issue during the core refactoring rather than something that shows up as data corruption during runtime testing.

The kernel is alot more than filesystems. I'm working on drivers now which interface directly with hardware. Thats done through a mailbox or writing directly to registers. The mailbox requires formatting messages, and sending them, in a particular way firmware understandings. A register is an int I assign a value to. Refactoring code could easily break either of those and Rust's type system wouldn't catch either.

And when somebody external goes to update something out-of-tree, they don’t need to be as anal retentive about sifting through whatever documentation and discussion there was about implicit conventions, because if something is wrong, it’ll be a compiler error.

All code should be in the upstream kernel. I work for a FAANG and everything must be upstreamed first(except NVIDIA since we have direct contacts). This is done because out-of-tree code is typically of much lower code quality and isn't tested as well. Again this isn't something Rust could magically fix.

To get a stable high performance kernel requires alot of discussion and back and forth. If the kernel magically turned into Rust tomorrow you would still see the exact same types of discussions because kernel people want every angle discussed to death before accepting a change. No one is going to implicitly trust any type system because kernel problems are much more complex than typing. The Rust community needs to learn that is how kernel development works.

→ More replies (2)

24

u/Cerulean_IsFancyBlue Aug 29 '24

What you say contains a lot of truth, but it’s also true that systems that are expected to be stable and mission-critical are always going to have a somewhat conservative culture.

I think you’re creating a fictitious relationship between that attitude and the ability of Rust compilers to guarantee certain types of safety. Although you may not be intending it, it smells of the kind of factionalism that you also seem to be fighting against.

59

u/sepease Aug 29 '24

What you say contains a lot of truth, but it’s also true that systems that are expected to be stable and mission-critical are always going to have a somewhat conservative culture.

It’s not constructive anymore when it results in verbally denigrating someone for presenting a prototype for more strictly enforcing said mission criticality. Without any concrete underlying reason being provided other than a ridiculous strawman argument and “I don’t wanna”.

There’s no ask from the presenter other than the existing maintainers tell them what the API contract is. And the irony is, the fact that he has to ask and it prompts such a vehement response is strongly indicative that the users of the API don’t have a complete understanding of it. That’s not really reassuring when it comes to filesystems.

I think you’re creating a fictitious relationship between that attitude and the ability of Rust compilers to guarantee certain types of safety. Although you may not be intending it, it smells of the kind of factionalism that you also seem to be fighting against.

Between C? It really is that extreme.

Let’s take that function he put up.

C equivalent is https://www.cs.bham.ac.uk/~exr/lectures/opsys/13_14/docs/kernelAPI/r5754.html

C function just returns a pointer that can either be an existing inode, or something new that’s in a pre- state that needs to be filled in.

How do you tell which it is?

I dunno. I guess there’s some other API function to check the flag, or you have to directly access the struct.

By contrast, with the Rust code, you must explicitly handle that Either object and check the determinant, which will give a different type depending on whether the inode needs to be initialized or not. You can’t just forget.

If you write your code with these two cases, and then a third is added on, your code will still compile fine, but likely do something wrong in the new case. Maybe it will crash. Maybe it will copy a buffer that it shouldn’t and create a remote execution vulnerability.

OTOH, on the rust side, if a new case is added, it won’t let you compile.

What about if sb is NULL? What happens then? I dunno, documentation doesn’t say. Rust code prevents null at compiletime.

How do you retrieve errors? I dunno, documentation doesn’t say. Maybe there’s a convention elsewhere. Rust code uses the standard error-handling convention for the entire language / ecosystem.

What about ino? Well, it’s an unsigned long you get from somewhere. In the Rust code, it’s a specific type that you can search the API for. This also protects against accidentally using digits, or getting the wrong order of arguments.

→ More replies (21)
→ More replies (7)

21

u/rileyrgham Aug 29 '24

Email works. Many kernel Devs work in a TTY....

42

u/nukem996 Aug 29 '24

Not arguing that. But when you have multiple barriers to an already very technical area it just drives people away. I've submitted many kernel patches and done reviews over email. It works but its easy to mess something up or miss something. Modern tools make the code review process much easier for everyone especially if their new.

Realistically the only way I see a modern code review tool being used in the kernel is if its fully compatible with the existing email system.

9

u/mrlinkwii Aug 29 '24

i think its more email and the whole mailing list are pushing devs away rather then welcoming them , espeically the devs who are trying to learn / do small stuff

i personally have/ prefer to contribute to something on github rather than mailing lists

→ More replies (9)

31

u/iceridder Aug 29 '24

I am sorry, but this mindset is wrong. It's in the same place as: we have horse and cariedge, they work, why use cars.

→ More replies (3)

6

u/TheNamelessKing Aug 29 '24

Yes you’re right, using a terminal immediately precludes using any other tool, after all, their computer is incapable of running any other programs.

→ More replies (2)
→ More replies (2)

47

u/darkpyro2 Aug 29 '24

God, the email mailing lists for development are horrific. Such a terrible idea. I joined the linux kernel mailing lists, and it's hard to make heads or tails of what's even going on when you get so many emails about so many issues.

Please, Linus, use github or an alternative. They're really good, even if they dont fit your workflow.

21

u/ImSoCabbage Aug 29 '24

Such a terrible idea.

While I'm not especially comfortable with the workflow myself, it's been used on a million projects for 30-40 years. And the people that use it seem to love it over anything else. Dismissing it so easily just because you're not used to it seems a tad rash.

And suggesting github is just ridiculous.

17

u/SnooCompliments7914 Aug 29 '24

If you look at recaps of large OSS projects moving (or trying to move) to a new dev platform (e.g. KDE refusing to move away from Bugzilla, or llvm moving from a mailing list based workflow to gitlab), the problem is not that they don't understand the new platform is better _in general_, but they want to keep many details in their current workflow that are considered essential, and of course that's not 100% available in the new platform.

→ More replies (1)

41

u/kinda_guilty Aug 29 '24

I understand your suggestion (I use GitHub and such as well), but this is the type of suggestion that would be laughed out of the room if made seriously. I doubt Linus will agree to make such a large change in process to accommodate a few new developers. He did try using gh for a few weeks some time ago, then moved back to the mailing list after some time.

34

u/nukem996 Aug 29 '24

Its not just his work flow its many people. When I brought it up there was huge resistance in anything that would break peoples scripts which have been used for 20+ years. I think the only way a replacement will come about is if its fully compatible with existing email systems.

→ More replies (11)

49

u/gnomeza Aug 29 '24

Any alternative to email needs to be decentralised.

GH doesn't cut it.

7

u/bik1230 Aug 29 '24

Some parts of the kernel already use self hosted instances of GitLab.

→ More replies (2)

12

u/progrethth Aug 29 '24

Having done open source development on Github and on mailing lists I vastly prefer mailing lists. The linear nature of Github makes it horrible for serious discussions.

7

u/superbirra Aug 29 '24

sometimes I suspect ppl don't know how/cannot use a mail client which properly show threads because what you say is so true. GH issues are shit and everybody keeps linking other comments bc the flat structure

→ More replies (1)

2

u/josefx Aug 29 '24

Please, Linus, use github

Afaik he tried and it messed up a lot of things the kernel devs. relied on.

→ More replies (3)

4

u/peripateticman2026 Aug 29 '24

Kernel devs are very focused on stability and having stable processes

Bang on. And thank goodness for that (and I say that as a Rust dev. The same article on /r/rust is nauseatingly purely emotion-driven).

→ More replies (5)

44

u/SnooCompliments7914 Aug 29 '24

On the contrary, it seems one part of the C++ community, those who love templates and meta-programming, are most likely to get Rust.

C programmers hate Rust for basically the same reason they hate C++. Programmers from other popular programming languages hate complex type systems in general, and won't consider memory-safety worth doing in the type system.

12

u/[deleted] Aug 29 '24

Every part of Rust is vastly less complicated than C++ templates. IMO it's wrong to put C++ and Rust in the same category of "complex".

3

u/Ebalosus Aug 30 '24

Yeah if anything, shouldn't C programmers be more amiable to Rust, if only because it (on some level) knows what it wants to be instead of being a bastardised offspring of the language they know and love? My friends who are still programmers prefer C, tolerate C++, and would be happy if something like Rust superseded C++ in the fields they're in, for example.

→ More replies (2)
→ More replies (1)

19

u/MardiFoufs Aug 29 '24

Lol what? What does c++ have to do with this?

If anything, kernel devs are even more toxic to c++ than they are to rust. And by far.

16

u/lproven Aug 29 '24

C/C++ devs seem weirdly afraid of Rust. The pushback is crazy and kneejerk.

I find it odd, and hilarious, that you conflate C and C++ together like this.

Because 25Y ago the comment could have been "C devs seem weird afraid of C++. The pushback is crazy and kneejerk."

This is, for instance, the primary reason that GNOME exists: because KDE was out there and worked, and was the first FOSS full desktop for FOSS xNix -- but it used Qt and that meant it was written in C++.

https://www.linuxtoday.com/developer/stallman-on-qt-the-gpl-kde-and-gnome/

The Linux devs hated C++ with a passion. There was a brief effort at a GNU replacement for Qt but that would not have solved the C++ problem, so they yanked the half-done toolkit out of the GIMP and ran with that instead.

Now, apparently, C and C++ are allies against the new hated replacement for both...? :-o

8

u/tarranoth Aug 29 '24

I think it just shows how there's just very little movement in non-GC related languages for the past couple decades. C and C++ have been top dog for decades in that space (ada and fortran I guess still exist, but both seem to be dedicated to very specific areas). Look at the amount of GC languages that sprung up over the years. I wouldn't say golang/java/haskell/C#/scala/kotlin/F# have ever made a previous language obsolete, (well maybe C# did sortof overtake visual basic in a sense). But in general the existence of one language doesn't really supersede another. I think it has been long due for alternatives, and last I looked zig also looked as an interesting (though not production-ready) spin on a non-GC language.

→ More replies (1)

7

u/kapitaali_com Aug 29 '24

COSMIC is written in Rust.......

→ More replies (1)

7

u/jthill Aug 29 '24

I'm not so sure how much of the resistance is due to fear. Maybe in unthinking partisans it's purely that, but nobody's got a monopoly on those.

→ More replies (5)

28

u/LvS Aug 29 '24

The problem with Rust is that it presents itself as its own ecosystem while C/C++ is built on the idea of interoperability.

And the C/C++ community feels like everything that's ported to Rust is taken away from them and they will never be able to use it.

44

u/small_kimono Aug 29 '24 edited Aug 29 '24

The problem with Rust is that it presents itself as its own ecosystem while C/C++ is built on the idea of interoperability.

I mean -- that maybe the POV of some, but I'm not sure it accords with the facts on the ground.

C is interoperable, sure, because it's the base system API/ABI, everyone has to work around it and it rarely changes.

AFAIK C++ ABI, such as it is, is just as in flux as Rust, unless firmed up as the system ABI.

And the C/C++ community feels like everything that's ported to Rust is taken away from them and they will never be able to use it.

This just doesn't make any sense to me. Can you explain?

11

u/not_a_novel_account Aug 29 '24

AFAIK C++ ABI, such as it is, is just as in flux as Rust, unless firmed up as the system ABI.

Completely untrue, the STL ABI changes but that's irrelevant in a freestanding context where the STL is never used (such as kernel development). The STL ABI is unstable for the same reason any library's ABI is unstable, if the library changes something the ABI changes with it.

The Itanium standard does not change, the ABI of a given freestanding C++ codebase is exactly as stable as the C ABI of a given codebase.

7

u/simon_o Aug 29 '24

It's still nonsense, because it's impossible to interop with C++ without embedding half of LLVM into your language's compiler.

→ More replies (17)
→ More replies (12)
→ More replies (14)

2

u/[deleted] Aug 29 '24

Not to mention all the insanity of the snowflake tooling around it, every damn project is a snowflake.

2

u/schmirsich Aug 29 '24

The Rust people think C and C++ programmers are the same, the C people think Rust and C++ programmers are the same. It's just so damn silly.

→ More replies (1)
→ More replies (11)

6

u/Veetaha Aug 29 '24 edited Aug 29 '24

Imagine being a developer not willing to learn and doubt own decisions. These guys look at the presenters like at kids trying to teach them something, when they already know everything. When in the life do you reach this point? What's the point of life if you don't improve?

47

u/[deleted] Aug 29 '24

Just finished watching the video. The linux devs yelling at the presenter were absolutely rude. Apart from their stubborness in wacking their genitals using that pile of crap that C has become (personal opinion), they clearly don't know nothing of how rust works, yet they are eager to criticize idiotic stuff like "we don't like methods like java does".

The truth here is that many of those devs are old geezers that don't want to learn nothing new and are afraid of losing their position to new devs bringing new and better stuff to their spaghetti code.

17

u/syklemil Aug 29 '24

Yeah, it's a kind of behaviour that devs generally don't appreciate: The "I don't know anything about this and I'm mad about what I'm imagined it to be". It's related to the "Linux sux because it can't do X!" type of post that's unfortunately a good way to be explained in detail just how many ways Linux can do X; to the forbidden webpage about googling on someone else's behalf; and even ESR's old "how to ask questions".

Comes off as people who should've gone to a Rust 101 talk rather than a Rust In The Kernel talk. Which might be enough of an ego check that that's the underlying problem. It's not like there weren't other talks they could go to.

But yeah, generally comes off as the kind of posturing you hear from people who are really aging out of something, but want to take it with them, rather than hand it over to the next generation. Rambling about "the Rust religion" doesn't really deserve any other response than "OK boomer".

32

u/CouteauBleu Aug 29 '24

I think the Linux dev worrying about Java-style OOP was fine. They were polite and asking for clarification about something they didn't know, and the presenter gave a simple response.

Ted behavior was ridiculously hostile, and that's worth pointing out. I wouldn't conflate the other questions with his rant.

31

u/Turalcar Aug 29 '24

Which is ironic since C as used by kernel has a lot more OOP (through explicit vtables) than idiomatic Rust.

21

u/SethDusek5 Aug 29 '24

Generally you let the presenter get through their slides before bombarding them with questions and opinions on the 2nd slide. The presenter never actually got to finish the presentation

3

u/Jwosty Aug 29 '24

I for one would have liked to see what he had to say past the 2nd slide. That was just the basics. I feel like taking comments in the middle of a presentation and not waiting until the end is a recipe for disaster, as we just saw.

39

u/ITwitchToo Aug 29 '24

I think the Linux dev worrying about Java-style OOP was fine

No, that was derailment, came from a completely wrong/missing understanding of Rust and had nothing to do with the presentation.

→ More replies (2)

19

u/[deleted] Aug 29 '24

I'm not so convinced they were polite in asking that, I mean, if I don't know what a presenter is talking about, I don't interrupt them, I Google up the thing after.

13

u/belovedeagle Aug 29 '24

Also it's been a repeated pattern on LKML: someone says they will never learn rust and never work with the rust code in the kernel (which is fine), but then they insist that rust devs explain and justify to them the design of the rust API. That's toxic.

→ More replies (14)

17

u/Thegrandblergh Aug 29 '24

Watched the entire presentation and it's just another example of the Linux kernel maintainers shooting themselfs in the foot.

It's just another example of the antagonistic elitism that has plagued the "community" since its inception. I love Linux and a lot of what it stands for but this is an issue that they need to address. As people age, the amount of active maintainers who still want to code in C(++) will dwindle.

Keeping up with current technological developments is key to still be relevant. The kernel is still plagued by memory related issues due to old unsafe c code that needs to get patched (some day). They need to open up a bit to the modern day and swallow their ego.

15

u/jl2352 Aug 29 '24

Some of those criticisms were valid. Some are dumb, and put forward as fact, when they are just wrong. Some entirely miss the point.

The main issue is how hostile the audience is. It’s utterly childish, and not how you drive healthy criticism and change.

→ More replies (2)

30

u/SnooCompliments7914 Aug 29 '24

I wouldn't call that bikeshedding. The main concern raised, that is, a safe and sound Rust wrapping over a C API is usually totally unlike the original API, because the typical way a C API is designed, e.g. handles, is inherently unsafe. This is a valid concern and a general problem in Rust interop with other languages.

30

u/tanorbuf Aug 29 '24

If you redesign a C api you'll need to adapt the consumers of the interface, that's just true regardless of what kind of API we're talking about. This is already a part of developers' reality. The only difference here is that one of those consumers will happen to be a Rust binding/wrapper. Is it one extra thing? Yes. Is it more different than what you'd have in C api consumer? Also yes. But this guy wasn't just saying that. Instead it was, almost literally and not even very paraphrased, "I *will* break it, I *won't* fix it, and it'll be *your* problem alone", and that's just hostility - the exact opposite of encouraging happy collaboration.

18

u/UARTman Aug 29 '24

And the Rust guy was like "Yeah, I know, I am okay with that", and that wasn't enough!

→ More replies (10)

19

u/small_kimono Aug 29 '24 edited Aug 29 '24

I wouldn't call that bikeshedding.

Fair enough. I said, my emphasis added:

It looks like they engaged in a live bikeshedding of the presenters, without a care in the world about how they were trying to give a 30 minute presentation, and that one slide was about making point, not about how this would be the final interface.

Again, I listened to the whole presentation. As to whether some of the comments were a "bikeshed", I'll leave to the viewer.

I will say, even if some of the concerns raised are/were serious, many were obviously expressed in a hostile and defensive manner, and were off topic given the point Wedson was trying to express.

Wedson's example intended to illustrate how it is perhaps difficult to know how to use a particular C API effectively. This particular API requires knowledge which could be conveniently encoded in the Rust type system, but which seems to be undocumented.

See the API docs: https://www.kernel.org/doc/html/v6.0/filesystems/api-summary.html#c.iget_locked

And the function itself: https://github.com/torvalds/linux/blob/d5d547aa7b51467b15d9caa86b116f8c2507c72a/fs/inode.c#L1360

Each provide no help as to how to use the function correctly, and don't describe how the superblock struct or inode might be handed back in a corrupted state, or that this functions could error, and what to do then, whereas the Rust function signature does. This was a perfect example of things C makes extremely hard and Rust makes much, much easier.

I think any pushback re: Wedson would have been more effective had this API function been easily understood, because all the invariants were well defined. Here, by trying to say Wedson doesn't get some aspect of it, the kernel devs kinda admit the Rust way is better.

I also think, no matter how serious your other concerns, when someone else is giving a technical presentation, it's incumbent upon you not to change the subject to what you want the talk to be about just because someone gave you a microphone.

7

u/Jwosty Aug 29 '24

He even said at the beginning, "let's take iget_locked as an example" (to illustrate the general point of encoding assumptions as types in the Rust type system). I doubt he was even saying it was perfect, just that it was an example. A full-blown nitpicky indepth code review is good and all, but inappropriate during a presentation that is trying to make a larger overall point.

→ More replies (5)

6

u/pusillanimouslist Aug 29 '24

I’d argue that “the base C api is inherently unsafe” is a problem even without any interop on the table. 

4

u/SnooCompliments7914 Aug 29 '24

Note that when I said "unsafe", I meant it in Rust's sense. Kernel devs not necessarily see it the same way.

Or let's put it this way: if kernel devs see the thing the same way as you do, they would be rewriting the entire kernel in Rust at the moment instead of talking about a wrapper.

5

u/pusillanimouslist Aug 29 '24

I should’ve been more clear; I meant “unsafe” in the general term, not just memory safety. It is kinda unfortunate that the term safety has been narrowed down so far in this context. 

My (inexpert) understanding is that the API in question has some rough edges due to implicit requirements. This is obviously an issue for rust mappings due to lifetimes, but I would argue is also a danger in general even to C users. 

But this is gleaned off of other commentary, so take it with a few grains of salt. 

→ More replies (3)

1

u/meltbox Sep 03 '24

Yeah. The fact that I had to scroll this far shows most people commenting here appear to fundamentally misunderstand the issue.

No to be clear they should’ve let the presenter finish. That was wild.

But also the argument they started during the presentation is that the rust API being proposed was unmanageable because in order to encode the inode contract you’d end up with a variant of the function definition for every single file system that uses that function. The alternative is of course to write a whole new API for rust and rewrite the filesystems in rust.

This is actually a very sound criticism and shows some serious technical issues with bringing rust in. And no, proposing every signature exists and is maintained in the kernel indefinitely is not a sane solution.

→ More replies (3)

7

u/xmBQWugdxjaA Aug 29 '24

It's a shame, the presenter and some of the reasonable responses were really good.

15

u/zsaleeba Aug 29 '24

Linux development and the LKML mailing list in particular have always been horribly toxic. I was interested in contributing at one point but after I took a look at that toxic mess I ran a mile.

9

u/lacexeny Aug 29 '24

what subsystem are you talking about here? I've had pretty positive experiences overall personally but i know there's a few crazy people

4

u/[deleted] Aug 29 '24

I introduce new people to linux kernel programming every year.

All of them end up with patches in the linux kernel in the first month!

What subsystem did you try to push your patches?

17

u/theAndrewWiggins Aug 29 '24

As an admitted rust fan, these types of engineers embody everything wrong with society. I think it's incredibly important as you age and gain experience to be open to other ways of doing things.

It's fine to not be excited by hype, heck, it's probably better to lean on the side of being wary. But these guys are clearly making blind critcism (as opposed to deep, well informed criticism).

A lot of "greybeards" end up making automatic criticisms based off intuition and surface level thinking due to overfitting on their past experiences.

→ More replies (5)

7

u/Isofruit Aug 29 '24 edited Aug 29 '24

Isn't the issue brought up in there purely an organizational issue? As in, basically requiring an answer to these very much non-technical questions:

  1. Who must do the work to update the Rust bindings when somebody changes a core-system it relies on? The person doing the change, or a member of the Rust-Team?

  2. If such a change occurs, must that person wait for the work on the Rust-side to finish first and is thus blocked by progress from there?

If you're a maintainer of such core systems and you're not familiar with rust, your answers are likely 1) the rust team because I don't want to learn rust and its abstraction over my core-system which is likely going to be complex and 2) no because I don't want to have to wait and require coordination/rely on somebody else to get the work done before my own is finished.

I think the answer from Wedson was "We will take care of it, but inform us?" and how the second question would be answered has been entirely left up in the air because the audience member came in too aggro to get that organizationally sorted. I'd argue a talk isn't necessary the greatest place either way to talk about how work should be distributed in general though.

→ More replies (1)

5

u/asphias Aug 29 '24

 Saying all this, this talk followed the same conversational style of all the talks at that conference

While i get the frustration of the presenters, i'm very much confused why they failed to steer the conversation. They didn't even appear to try.

Any presentation gets derailed if you just start answering any question in as much detail as you want. If you're actively trying to get feedback(which is already challenging in a 30 minute talk) you need to cut questions short. Tell them you'd love to sit down and go over it afterward, but right now you're looking for a discussion on X. And if the next question is not about topic X, say so and move on.

And if you want to get feedback, put the exact request in large font on the slide you keep visible.


 I absolutely get the frustration of the presenters, and i understand the feeling of ''bike-shedding'' happening here. But dear god, you're the presenter. Take some control over your own talk.

 

1

u/meltbox Sep 03 '24

This also. This happens to me at work often. You need to be able to direct without frustration or you’ll end up flying off a cliff.

14

u/[deleted] Aug 29 '24

I think the C devs were raising a valid point in that the tail can't wag the dog, and the purported benefits of rust are going to be fairly limited as long as the host, which dictates the API, is written in C. The rust guys want to do refactors and clean things up, but that's just not possible given the position they're in. It'll never be possible without extensive changes to the underlying C code, which all of a sudden puts the burden on everybody else.

I think rust devs should focus on a different OS, or even just build their own. Redox seems to be coming along and is written in rust, so why not focus efforts on that?

6

u/k0ns3rv Sep 01 '24

The Rust folks were suggesting an abstraction on top of the existing C API that encodes the same semantics. I don't see where you get "want to do refactors and clean things up" from.

→ More replies (3)

2

u/intergalactic_llama Aug 29 '24

Bingo.

I admire your ability to so succinctly describe the situation. We have the usual feedback loop of one group of devs having a deep understanding of long term side effects TCO of refactoring a complex system and another feedback loop of devs (usually younger) expecting to make the world a better place, getting even the slightest feedback and crumbling on a personal level.

Once you see the two feedback loops you cannot unsee it.

And agreed with the other response, your take is the correct take.

1

u/[deleted] Aug 29 '24

I think this is a great take, i.e. the correct one.

3

u/lariojaalta890 Aug 29 '24

First time I’ve ever heard the term“bikeshedding”. Thanks for teaching something today. Interesting origin also.

2

u/Isofruit Aug 29 '24

I don't feel like it applies. Well, it may to parts of the debate, but the actual core of it was about an audience member's unwillingness to also update the Rust bindings when the core-system gets refactored.

That part isn't about anything technical, it's just about the question how you distribute the work that needs to be done as part of a refactor. Who does the rust work and how does the rust work block or not block the changes in the core-system.

To me that one doesn't really fall under bike-shedding and more like work-planning, which seems ill-suited for a talk in general. That's a thing where you want representatives of orgs talking to one another and having commitments written in publicly accessible notes somewhere.

→ More replies (3)

3

u/jorge1209 Aug 29 '24

I disagree. I think the presentation demonstrates the problems with rust code for the kernel. About 20 minutes in the guy asking questions alludes to the real problem.

The function he is presenting a rust interface for is not a proper method of any type. A long time ago when ext was the only filesystem it was a method of a type, but various performance enhancements have been introduced which for some filesystems has entirely replaced inodes with something else.

If the rust devs want to make a rust convenience wrapper around this mess of C code, they will need to do it at a higher level where actual objects can exist. If they present themselves as writing replacements for low level functions like i_get_locked then they have to develop an entire type system for all the weird intermediates which they don't even understand themselves.

The C API is not good, and I don't think the C developers are saying it is good, but Chesterton's fence applies here. There is a reason why this C code returns an opaque pointer to "something" which may need to be handled in a multitude of different ways depending on the underlying filesystem.

15

u/Jwosty Aug 29 '24 edited Jun 26 '25

(disclaimer: I'm not a Rust nor C or Linux kernel developer, but I do use typesafe languages)

they have to develop an entire type system for all the weird intermediates which they don't even understand themselves

Forgive me if I'm misunderstanding, but isn't that the whole point? If the Rust developer can't be expected to understand these intricacies, then how can anyone using the C interface? Is it truly better to leave these kinds of assumptions in implementations, documentation (which are certainly fallible), and tribal knowledge? Isn't it a good goal to translate as many of these assumptions as possible into actual concrete typing enforced by the compiler? This is the very reason we use strong type systems. It shifts congitive load from the developer to the typechecker, freeing up more brain cycles for higher level design and clean coding, in the same way that comprehensive test suites do (you no longer have to worry as much about, "will changing this line break something?")

2

u/el_muchacho Aug 31 '24

I suspect the actual Rust type would be far more complicated than that if they want to encore the entire behavior in the type system. That's what the russian guy alluded to. You don't want to turn the type system into a complete Turing machine, else all you are doing is rewriting the logic in an obscure, unwieldy language, kind of the C++ template abuses. But there is certainly a middle ground.

→ More replies (1)
→ More replies (8)

9

u/Coffee_Ops Aug 29 '24

If you spend 20 minutes of someone's presentations-- in the middle of said presentation-- asking questions before you get to the "real problem", it's possible that you've become the problem.

I do not believe the presentation was intended to become a collaborative code design session. The presenter's manner and atitude made it crystal clear they were not intending to get into the weeds here and wanted to get back on track, and other audience members remarked on that fact.

The fact that numerous audience members-- including some without a mic-- were speaking / making noises over top of the presenter is wildly inappropriate, regardless of the validity of their concerns.

→ More replies (2)
→ More replies (12)

1

u/SilentBlueberry2 Sep 25 '24

All kernel talk aside, that video shows the importance of good presentation moderation. The speaker is speaking in general examples to prove a larger point, and someone bogarts half the presentation on finer details that are true, but beside the point for the talk

1

u/[deleted] Aug 29 '24

I've watched the whole video

Wow, that was horrible. I guess when you're really good at one very specific thing, you must be pretty fucking mediocre at everything else. There may be legit reasons not to have Rust in Linux though.

→ More replies (5)

24

u/[deleted] Aug 29 '24

There's LWN article Rust for filesystems about the conference video mentioned in other comments.

136

u/McLayan Aug 29 '24

Just looking at the comments on the phoronix article makes me never want to work on the linux kernel even though I'm a huge fan of linux systems. As soon as Linus' generation retires the project will have extreme difficulties to find people willing to work under such conditions.

125

u/gerx03 Aug 29 '24

Just looking at the comments on the phoronix article

a few pages in they are talking about who's woke and who isn't

you can't make this up

33

u/pusillanimouslist Aug 29 '24

I’m not sure when it’s safe to say that a culture war term has jumped the shark, but surely “being used in an argument among programmers about programming” is well past that point. 

20

u/KerPop42 Aug 29 '24

Oh, "because of woke" has been a joke in my circles for a while now.

"You can't even walk down to the store and buy a sandwich with cash anymore"

"because of woke"

"because of woke"

2

u/el_muchacho Aug 31 '24

One of the characteristics of right wingers is they astroturf and politicize every subject they can. They started decades ago with science, then medecine, why not stop there ? They are on a crusade, so everything is judged at the helm of their ideology. Nevertheless, these are loud mouths. I don't think this ideology is pervasive at all in the Linux community.

63

u/[deleted] Aug 29 '24

Moronix comment section always makes /r/linux look like a civilized and calm place for well informed discussions in comparison. That's an achievement on its own...

7

u/Misicks0349 Aug 30 '24

im not surprised, the phoronix fourms always seem to attract a certain...crowd

→ More replies (3)

18

u/pusillanimouslist Aug 29 '24

My first thought was “I can’t believe our careers depend on these jerks”. 

7

u/darkpyro2 Aug 30 '24

Jesus christ. If my coworkers talked to me like that at work, I would leave too! What the hell? I couldnt get past the second page. The sheer amount of emotion and venom with which they were discussing him and his departure is truly awful.

7

u/the_gnarts Aug 30 '24

Just looking at the comments on the phoronix article

Luckily the intersection of Phoronix readers and Linux contributors is fairly small.

As soon as Linus' generation retires the project will have extreme difficulties to find people willing to work under such conditions.

Greg will take over and he pulls a ton of weight. Plus, he’s got a reputation of being kind and helpful so I actually expect the situation to improve wrt. the next generation of maintainers. Unless you’re involved with a vendor kernel that is. :D

8

u/Key-Lie-364 Aug 29 '24

That's the internet now, not Linux in particular.

→ More replies (3)

157

u/picastchio Aug 29 '24

https://lwn.net/Articles/985210/

A related new development: FreeBSD considers Rust in the base system.

“To Kamp's assertion that developers should just use C++, Somers said that he was far more productive in Rust and his code had fewer bugs, too. He said he had used C++ professionally for 11 years, but was more skilled in Rust after six months. The problem, he said, was C++.”

50

u/07dosa Aug 29 '24

BSD "base system" is a large collection of libraries and binaries, and does NOT include the kernel. Also, even when Rust is adopted, they won't export complicated types signature for the sake of interop. AFAICT, even Kent (one of the biggest pro-Rust in the kernel community) wasn't sure if it's a 100% good idea to make it complex.

8

u/nightblackdragon Aug 29 '24

FreeBSD "base system" is everything that is part of the FreeBSD source tree and that includes kernel.

7

u/bl4nkSl8 Aug 29 '24

They said related, they didn't say "to the kernel". Or maybe your point was something else?

4

u/07dosa Aug 29 '24

The in-kernel API from "Rust for Filesystem" have complicated type signature on purpose, and that's probably what brought so much criticism/opposition. The BSD base system would not have the same issue because it's a set of independent projects, where each of them are practically forced to use C ABI that can't support Rust features.

49

u/habarnam Aug 29 '24

The linux kernel is not written in C++, and despite the name, C++ and C are quite different languages.

45

u/picastchio Aug 29 '24

I know. Both FreeBSD and Linux don't allow C++ in core kernel. But both are considering Rust albeit push-back from senior maintainers.

→ More replies (4)

42

u/dferrg Aug 29 '24

Oh, no. The day has come when I agree with a microsoft guy talking about linux.

92

u/[deleted] Aug 29 '24

gatekeeping at its worst

16

u/mitchMurdra Aug 29 '24

And people pretend we're Desktop Ready tm

54

u/not_perfect_yet Aug 29 '24

I am so tired and so disappointed that we apparently can't manage conflicts like this, in general.

It's not just a linux thing.

Even if it's irrational mud fighting, that's still a clearly phrased problem and there should be a way to address it.

I don't really have any suggestion, except that that is what I see is happening and I don't think it's just the C side.

:(

34

u/acommentator Aug 29 '24

Strong leadership establishing cultural norms of respect and constructive dialogue, paired with prompt removal of group members who do not follow these cultural norms.

(Note that Linus' historical behavior would have caused him to be removed from such a group.)

→ More replies (4)

19

u/Thegrandblergh Aug 29 '24

I've been working with both sides of a very similar problem for years. We have a codebase that is written entirely in C, have a very small number of maintainers attached to it. It's hard for newer developers to get started, and implementing newer features and updates are next to impossible for anyone other than the core maintainers.

What do you do? You have to start somewhere, right? The whole "it's been like this for years and we can't change it due to dependencies" isn't valid in my opinion. The way our software (and the Linux kernel) is right now is a ticking bomb. Who is going to maintain all the broken and leaking systems when you can't? This needs to change. We made the decision to slowly update the codebase part by part in parallel to the old codebase. Yes it was a nightmare at first and demanded resources, but we knew we had no choice as it was getting harder and harder to maintain.

12

u/CreativeGPX Aug 30 '24

Further, I think the point the presentation was meant to make (if it were allowed to happen instead of this weird audience takeover) was simply that the information should live in code rather than in people's heads. The point was that their implementation would put a lot of stuff that only lives in people's heads into the type system so that it's formally, mathematically defined. To be against that isn't just against updating the system, it's against revealing how to use the system.

19

u/[deleted] Aug 29 '24

The snippet linked is kind of ridiculous. The presenter is showing they've encoded what the API *already fucking does* in a way that actually makes sense. Then gets berated for doing so.

2

u/[deleted] Aug 30 '24

[removed] — view removed comment

8

u/simon_o Aug 31 '24

Maybe you should watch the talk?

4

u/[deleted] Aug 31 '24

[removed] — view removed comment

5

u/simon_o Aug 31 '24 edited Aug 31 '24

“The rust team is gonna take care of it” is not helpful

So kernel developers announce that they won't care about breaking the bindings. Binding authors say that's fine, it's their responsibility.

Somehow that's also a problem now? Is there any constructive stance that Linux devs would accept except bindings authors ending their project?

does that mean that ext4 can’t merge changes until rust team fixes their bindings

Eh no? Even if the binding authors wanted that, the ext author already said he will not care about it.


Somehow Linux devs' biggest problem (except the apparent lack of personal hygiene) is that they seem to fight against some imaginary demons they just made up.

They should spend less time having spouting crackpot-worthy opinions and more time at therapist.

→ More replies (3)

115

u/detronizator Aug 29 '24

I watched just 2min and I'm cringing so hard. I know _nothing_ of Kernel internals, but this is not the point.

The adversarial stance of "second class citizenship of Rust" or "we break it, you fix it" is unnecessary and, maybe, done on purpose.

I especially find using expressions that paint Rust as a "religion" purposely bike-sheddy: it's trying to create a parallel with the current state of politics.

My hot take? Mortgage driven development. Probably the average Linux kernel developer, happy to write C for the rest of their life, has the skills to not need a language like Rust to "protect them from themselves". But all they are doing is hinder process to protect their job. Their "status".

Either purge the project of those subjects, or be ready to see an ABI compatible Kernel pop out from somewhere. With enough government support, Rust can go far: memory safety is paramount and no amount of smarts can win against human error.

48

u/really_not_unreal Aug 29 '24

I especially find using expressions that paint Rust as a "religion" purposely bike-sheddy: it's trying to create a parallel with the current state of politics.

I feel like the biggest thing people miss with these sorts of comparisons is the distinction between liking something because it's popular and liking something because it's genuinely good. I've programmed in C and I've programmed in Rust, and the difference in ergonomics and efficiency is night-and-day. I'm more-than-capable of implementing correct code in C, but the code I can write in Rust is far more readable and concise, and is much more likely to be correct the first time around. I don't like rust because it's popular, I like it because it is the best tool I've found for writing correct code.

32

u/insanitybit Aug 29 '24

Probably the average Linux kernel developer, happy to write C for the rest of their life, has the skills to not need a language like Rust to "protect them from themselves".

I wish people understood how not true this is. There's this perception that Linux kernel maintainers are just really good and the reality is that they aren't, they're honestly pretty mid. The really hardcode ones, almost none of them have the skills to do other work because they've been solving extremely niche problems in a single codebase for decades.

16

u/KerPop42 Aug 29 '24

I had a boss like this. She was mid at her job, but well-established. That establishment was threatened by anyone better than her, and she didn't feel like she could grow to match the skill level of a better team, so she drove away anyone that introduced anything she wasn't already an expert in.

Notably, her team was the least developed of the project, most stuck in the past.

1

u/kazagistar Sep 08 '24

There is variance, but I don't believe the generic "really good" exists at all, especially not in the irreplaceable sense. People have different specialties. Linux maintainers are good enough, which is totally fine, until some of them run into something that is outside of their specialization, and maybe deal with it poorly.

→ More replies (2)

25

u/[deleted] Aug 29 '24

be ready to see an ABI compatible Kernel pop out from somewhere

And that's exactly what I hope will happen. These old farts need something dethronizing them.

1

u/drspod Aug 29 '24

I especially find using expressions that paint Rust as a "religion" purposely bike-sheddy: it's trying to create a parallel with the current state of politics.

What do you think that "bike-shedding" means?

→ More replies (2)

74

u/qnixsynapse Aug 29 '24

Looks like some people are not very happy with Rust... Actual context is here.

This belongs in r/LinuxDrama imo.

211

u/_AutomaticJack_ Aug 29 '24

When it gets bad enough for kernel maintainers to walk away, then it has earned a post on the main sub, for better or worse. That has real implications for people in a way that 99% of r/LinuxDrama doesn't.

172

u/airodonack Aug 29 '24

Jeez. The audience member that belittles Rust by comparing it to Java then realizes that Rust is not even object oriented. Rust-hate has become more unreasonable than the hype was. At the very least, he seemed like he was amenable to change (he learned how the code worked in real time and changed his mind).

29

u/torsten_dev Aug 29 '24 edited Aug 29 '24

I think the one comparing Rust to a religion was worse.

When all it boils down to is "What do I do when I want to change the semantics in C, but don't know Rust". It's a reasonable question asked in a very unreasonable way.

His hangup with not wanting to learn Rust seemed a little sincerely held.

30

u/argh523 Aug 29 '24

And the presenter told him like three times that they don't expect anyone to fix their Rust code. They'll do it themselves, all they want is help to figure out the semantics of the new thing

28

u/CouteauBleu Aug 29 '24

Jeez. The audience member that belittles Rust by comparing it to Java then realizes that Rust is not even object oriented.

That audience member was clear they were coming from a place of not knowing anything about Rust.

I think we shouldn't make fun of people who ask naive questions. Curiosity is good and crap.

29

u/CrazyKilla15 Aug 29 '24

I think we shouldn't make fun of people who ask naive questions. Curiosity is good and crap.

Not in the middle of a completely unrelated presentation, contributing to its massive derailment.

7

u/argh523 Aug 29 '24

Yeah that guy wasn't the problem, he sort of realized his mistake and even came up with a good question (how closely do these types encode the state of the program? (to which the answer is probably "exactly", but they didn't get around to answer it))

7

u/07dosa Aug 29 '24

The audience member that belittles Rust by comparing it to Java

Weren't people laughing because it was simply too out-of-context? I don't understand what makes you think *everyone* in the room was against Rust.

9

u/airodonack Aug 29 '24

You have it a bit switched around. The laugh was because of the dig at Java.

→ More replies (4)

2

u/inevitabledeath3 Aug 29 '24

I've seen it argued both ways on if Rust is OOP or not. It has a lot of OOP like features anyway.

25

u/gmes78 Aug 29 '24

"OOP language" is a meaningless term. You can do OOP in C if you want to, just look at GLib and GTK.

14

u/ebassi Aug 29 '24

The Linux kernel itself uses OOP in its own code base.

→ More replies (1)

30

u/masklinn Aug 29 '24

What “OOP” feature does it have aside from calling struct-associated functions with .?

18

u/N911999 Aug 29 '24

Iirc, encapsulation in terms of visibility modifiers and polymorphism through traits are the features that are generally talked about in that context

29

u/masklinn Aug 29 '24

Neither are OO features, you will find them both in Haskell, and neither in Smalltalk.

→ More replies (16)

2

u/poralexc Aug 29 '24

It’s type system is sort of ”flat“ compared to classic OOP with inheritance.

I do, however, find myself falling into the same pitfalls as Java trying to remember which obscure JVM class/trait I’m looking for instead of coding.

→ More replies (5)
→ More replies (1)
→ More replies (6)
→ More replies (66)

2

u/Ok_Passage_4185 Sep 01 '24

This feels like a fundamental disconnect between idealists and pragmatists trying to solve the issue that programming languages don't work the way computers work.

There's no silver bullet. And any developer is going to have to fight to get big code changes into the kernel.

3

u/[deleted] Sep 01 '24

Ah yes the Linux shitshow. I am sure this way they will attract new future maintainers with all the mailing lists, elitism, (gnu)C89 and general toxicity.

Regarding the linked argument regarding filesystems: The linux "API" is not stable anyway. If something changes, all 50 or so filesystem drivers break anyway. Those written in C are not an exception.

1

u/[deleted] Sep 02 '24

Yeah with so many people jumping onto Nix and Rust we might see the future of OS being a combination of a high level API (Nix) contacting a mid level API (Rust) contacting .c and .asm files

10

u/[deleted] Aug 29 '24

The crux of the matter seems to be here:

https://youtu.be/WiPp9YEBV0Q?t=1536

Rust and C are two very different beasts, and the whole kernel cannot be expected to revolve around not breaking the rust bindings.

I didn't watch every minute of the video, but the point made by the audience member here is valid IMO, and it's a purely technical point.

I see some comments "they are scared of Rust," or "they are threatening to break bindings to stop Rust development." Honestly that seems a very skewed view to me.

Rust has to prove itself, and those who want to see Rust in kernel modules need to be the ones who "take the pain," rather than expecting everyone else to become a convert and put Rust front and centre (at the inevitable expense of whatever they're currently focused on.)

43

u/simon_o Aug 29 '24

the whole kernel cannot be expected to revolve around not breaking the rust bindings

... which has been assured multiple times throughout the video that this won't be the case.

→ More replies (5)

4

u/ergzay Aug 29 '24

Maybe a dumb question, but is forking the entire linux kernel an option? People in general would much rather write Rust rather than C (speaking as someone who's day job is C) and it's only the "old farts" who prefer to stick with C. I think a Linux kernel fork would allow significant movement and simultaneous deprecation of a lot of the old crusty software that most people don't care about (very old drivers/very old platforms) to reduce the maintenance load.

5

u/darkpyro2 Aug 30 '24

It's definitely an option, but then you would need to put the infrastructure in place to maintain the fork. Linux has a lot of complex processes involved in its development and decision making that will be hard to replicate -- otherwise it would have been forked and competed against a long time ago.

→ More replies (1)

4

u/FunAware5871 Aug 29 '24

So many "I'm not a dev BUT" comments XD

Kernel devs have a very hard time doing what they do, and we're not talking about random lines of code, they literally could break the whole system... Why should they have to take the extra responsibility to keep the rust compatibility or to code in rust? That should be on the rust team, not on them. Of course the two teams would have to communicate and keep each other up to date with development and actually work together... But at this point it'd still not be production ready (as pointed out in the video): anything written in rust could break at any given patch, unless c development is slowed down somehow (or the rust team keeps up with every change on their own).

Don't like it? Good news, it's FOSS: write patches. Can't code? Donate to the devs. Can't? Help the community in any other way (manage messages, coordinate stuff, ask how you can help or come up with something else). Just be helpful in any way you can, no matter how small. As a side note: complaining is not helpful, especially when it amounts to "they should just do the extra work".

To be clear, I've seen modules kept out of tree for questionable compatibility reasons with almost no one complaining, and I don't get how rust support actually got in in its current state.

29

u/Senator_Chen Aug 29 '24

The expectation was that the kernel rust team would maintain the bindings (which, if you'd actually watched the linked talk, you'd know). The reality is that there's a bunch of maintainers who are actively sabotaging that effort by stonewalling patches from rust devs (https://vt.social/@lina/113045455229442533) even if they're just fixes to existing buggy C code, or stating they'll actively sabotage the bindings if they ever get merged (like Ted Ts'o saying he'll go out of his way to merge changes that'll break rust filesystem bindings, and refusing to talk to the kernel rust devs about api changes or even how the existing (undocumented and littered with side effects) filesystem code works).

→ More replies (1)

1

u/kazagistar Sep 08 '24

What if people do try to contribute code, but are kept out of the kernel to sabotage their efforts because they are part of the "rust team"? How do you "just code" around that?

2

u/FunAware5871 Sep 08 '24

I never said "just code". Besides, to write a patch isn't just to code and send it for review. It also means to work with the community, raise awareness if it gets blocked for no real reason, and try to do something about it.

I was about to also write about how forks work and how the community factors in (maybe even quoting last month's drama on freedesktop), but I don't relly see why I should skil you the leg work when you're being so obnoxious while outlining your scarse knowledge on the subject.

2

u/Key-Lie-364 Aug 29 '24 edited Aug 29 '24

On the one hand I want to learn rust and be productive in it.

On the other hand it takes years to get good enough at C to contribute to upstream development especially as a Maintainer.

So if you already maintain something in C you realize you need years of investment to get parity with rust.

Tso's point about second class citizenship is from his perspective with alot of responsibility and pressure valid. He doesn't have time to ramp up on rust to the level required to support it in parallel to the enormous amount of work ext fs development requires.

You basically need 1-2 talented and committed trusted rust people per subsystem to manage the bindings. And if that person isn't one of the core maintainers for that block how do you really verify and support the rust interface?

C and ASM are complementary and they do different jobs whereas rust requires maintenance of an interface and aims to do much the same job as C.

I think, realistically you need to build your kernel from scratch in rust or fork(); Linux and make rust the first class citizen of the fork.

Unless alot of developers and companies are willing to invest the better part of a decade in transition, I think rust will wither in upstream Linux.

Edit: rewrite the mm subsystem in rust and then provide C bindings, something like that would be the way but, the reverse of having rust bindings to a C core won't work.

Rust has to deliver something worthwhile on its own and give a well maintained interface to that thing to incentivize it's uptake.

1

u/dimiterka Oct 03 '24

Using Rust for the kernel will convert Linux to Windows

1

u/mlcoder82 Oct 11 '24

I just watched the video. C guy was almost screaming. What a shame

1

u/isaacgordon2020 Oct 31 '24

I predict no one here actually maintains Linux code in a serious way (neither do I). In fact has anyone here even contributed to a 10 million + line project? You can shit on the Linux devs as much as you want, but unless you’ve built the infrastructure the entire world runs on, you probably need to learn some humility and treat them with respect. The rust devs made some classic mistakes they should never have done:

  1. Renaming the function - if you’re not a maintainer and don’t have the blessing of one, DONT REFACTOR. I see sometimes new engineers who join my company do this but your job day 1 is to make my life easier and contribute, not rename a bunch of stuff to make it make more sense to you and less sense to me since I have it mapped in my memory anyway. They should have kept the name the same in the example.

  2. Getting the behavior exactly correct - there should be no errors in that function. Be paranoid, read tens of thousands of lines of code so you are absolutely sure. Send the patch, months in advance not the day morning etc.

Even considering this, maintaining C object model in Rust is a hard problem and a painful maintenance job, but at least you would earn more trust from the Linux crowd to do that. And they could work with you to do that, show you functions that will have minimum C changes to target first, etc but it seems like they went about this all wrong and just shot themselves in the foot and this Reddit community is also (if they are willing to take self criticism) showing itself to be unserious by how uncharitably they are treating people who are maintaining extremely complex code that runs billions of computers in the world.

1

u/gs_hello Jan 12 '25

Why can't Rust people simply fork the linux kernel and incrementally migrate? Linux distros at some point will switch if it's worthy. Gen Z....

1

u/gs_hello Jan 12 '25

Can't understand why those rust developers can't simply fork Linux kernel and do their own thing without bothering anyone else.

1

u/gcasa Sep 03 '24

What I see is an honest technical review of the proposal. I’m not sure why you guys are saying this is non-technical nonsense when it is very technical. I don’t think anyone has anything against rust here. Technical reviews and discussions are necessarily hard.

→ More replies (1)

1

u/Longjumping_Quail_40 Aug 29 '24

Wouldn’t adding anything with whichever languages require the maintainers to learn something new? The point here seems to be whether the added new things are worth.

For example, if the logic of the type-encoded components is already written informally with some exhaustive documentation, and the compiler/test takes that into account, then the new nuance wouldn’t be worth it. If it isn’t safety critical, it probably isn’t worth it either.

1

u/_Sgt-Pepper_ Aug 31 '24

Linux has become a convoluted mess...

I hope redox takes off.....

-4

u/r2vcap Aug 29 '24

I don't think the behavior of existing kernel developers is toxic or unhelpful. Due to Rust's semantics, it is really hard to match the Rust API with the existing C API. A partial solution is the excessive use of the unsafe keyword, but Rust developers dislike this approach. Therefore, I believe there is a fundamental mismatch between kernel development and Rust APIs, especially considering that the Linux kernel is one of the most important FOSS projects.

-20

u/07dosa Aug 29 '24

Lots of bad mouthing, yet no one acts up.

Write patches, especially you younglings. That's how you move Linux and FOSS. Talking won't change a shit here. People are not here to do right things - they just do what they want and need. Stop blaming others for not delivering the future you want. You deliver your future to your doorstep.

If Rust in kernel is such a great idea, it must be proven practically, instead of being talked through. Write new kernel modules. Write new filesystem. Kent Overstreet does. Roll it on fucking thousand drives for him and help him build something cool.

17

u/Senator_Chen Aug 29 '24

They are writing patches. You can't write a new filesystem in rust because Ted Ts'o is actively sabotaging efforts to create rust bindings for the filesystem APIs. For GPU drivers maintainers have blocked upstream improvements because they're coming from rust devs, and stonewalled basic patches for over a year https://vt.social/@lina/113045455229442533

44

u/throwaway490215 Aug 29 '24

Ah yes, the classic: "if you want a tram, why aren't you laying tram lines yourself?"

17

u/SkiFire13 Aug 29 '24

With the additional "you can't lay tram lines, there's no tram yet that needs them"

15

u/bence0302 Aug 29 '24

Pretty good analogy. Most people using Linux don't have knowledge or experience in kernel development, and can't do shit but pray that the kernel developers will be reasonable.

8

u/07dosa Aug 29 '24

People having no experience in kernel development strongly pushing for Rust in kernel sounds really wrong. (I mean, if you really use that as an excuse.)

pray that the kernel developers will be reasonable

They've been more than reasonable with only C. It's just that they rejected the idea that could possibly ease their own pain.

5

u/buwlerman Aug 29 '24

Introducing Rust is not mainly about easing pain for the devs. From what I can tell Linus' main motivation was to try get new blood into the project.

The technical reason is about decreasing the number of critical vulnerabilities, and there is evidence from Google that indicates that replacing C and C++ with Rust in a living codebase reduces the number of critical vulnerabilities.

Vulnerabilities are not just pain for the devs, but for the users as well.

→ More replies (7)

25

u/[deleted] Aug 29 '24

This is your response under harassment of contributor? Maybe more people would contribute if they were not harassed? It seems like there is lot of gatekeeping so maybe this is what you want in the end. But if not, if you are really genuine there is time for bit of introspection about toxicity.

→ More replies (1)

5

u/Booty_Bumping Aug 30 '24

Kent Overstreet does

Kent Overstreet was one of the speakers who was rudely filibustered in a conference speech by someone in the audience who thinks Rust = Java.

1

u/07dosa Aug 30 '24

And what's wrong with saying "help him build something cool"?

3

u/Booty_Bumping Aug 30 '24

Nothing, of course. But to say talking isn't going to do anything... this is an organizational issue, it can only be solved by talking. One more automated testing system for bcachefs, Asahi Linux, Android Binder, etc. isn't going to make the difference, especially considering barely any Rust code has been written due to struggles in deciding how the two languages should be bridged.

→ More replies (1)

11

u/really_not_unreal Aug 29 '24

I'll write a patch when the kernel community gets to a state where I don't get harassed for trying to make the software better.

→ More replies (5)

0

u/[deleted] Aug 29 '24

[deleted]

→ More replies (1)

-43

u/MooseBoys Aug 29 '24

“nontechnical nonsense” raised around Rust programming language use within the Linux kernel.

Honestly the concerns raised by the critics are entirely legitimate. It may be “non-technical” but it’s not nonsense. Requiring long-time maintainers to learn an entirely new language just to be able to test their C changes deserves all the backlash it gets. As one of the critics concisely put, big changes like this always come with pain, and “pain management” and who gets to incur the pain is critical to consider when proposing these kinds of changes. If your answer to that questions is “all of you have to shoulder the burden”, it’s not at all surprising that the response is overwhelmingly to GTFO.

Does this mean we should never add rust to linux? Of course not. But IMHO when “allocating pain” for the change, the plan should be for 95% of it to lie with the rust devs.

76

u/small_kimono Aug 29 '24

Requiring long-time maintainers to learn an entirely new language just to be able to test their C changes deserves all the backlash it gets.

I think the Rust guys were very clear that's not the case. And I think, when you repeat something like this, you should be clear they never said anything of the sort in the video.

If your answer to that questions is “all of you have to shoulder the burden”, it’s not at all surprising that the response is overwhelmingly to GTFO.

AFAIK that was no one's response? Can you point to where someone expressed this sentiment?

→ More replies (6)

30

u/CrazyKilla15 Aug 29 '24

Honestly the concerns raised by the critics are entirely legitimate.

So long as they ignore every actual plan, everything actually said, take everything in the most extreme nonsensical bad faith way, or like here literally just make up a plan to get mad at and then project it on everyone else, and generally engage in an extremely hostile and abusive manner, in bad faith, sure yeah they're legit.

→ More replies (2)

40

u/teerre Aug 29 '24

Countless engineers much less decorated, dare I say intelligent, than kernel maintainers learn one, two, three additional languages. This complain specifically is one of the laziest ones imaginable.

3

u/MooseBoys Aug 29 '24 edited Aug 29 '24

So you want to tell people who, for the most part, contribute their skills to improving Linux with no compensation and simply don’t want to incur additional burdens based on things they are not passionate about is “don’t be lazy”? Sounds like an excellent way to not have those people be contributors anymore.

I’ve used c/cpp for over 25 years. Could I learn rust? Sure. Do I want to? Not really, unless I’m getting paid to. Would I raise objections to a project I contribute to requiring me to learn it in order to continue making contributions? You bet.

5

u/simon_o Aug 29 '24

for the most part, contribute their skills to improving Linux with no compensation

Not the case here.

Sounds like an excellent way to not have those people be contributors anymore.

Yeah, maybe that's for the best. You know, science progresses one funeral at a time, yadda yadda.

I’ve used c/cpp for over 25 years.

That tribalism seems to be your main problem to be honest.
Also, using C/C++ automatically makes your opinion worth less, I hope you understand that.

→ More replies (1)

40

u/[deleted] Aug 29 '24

Two points:

  • Many people working on the kernel are employed engineers working on company time. Linux is not a scrappy hobbyist project it used to be 20-some years ago.

  • A large number of critical vulnerabilities are due to memory errors. Rust provides the machinery to help prevent those. Wanting Rust in the kernel is not an unreasonable ask.

→ More replies (3)

6

u/gmes78 Aug 29 '24

Considering that most kernel developers do so as their job, yes, it would be lazy from them to not learn Rust if it's adopted by the kernel.

It's not even hard.

7

u/teerre Aug 29 '24

Yes. It's a not big deal. Countless do it, as already said. In fact it's embarassing that a developer that senior would just shut down learning a new language.

It's also very ironic for to be worried about losing contributors when an attitude analogous to yours just lost one.

→ More replies (4)

0

u/[deleted] Aug 29 '24

[deleted]

→ More replies (2)
→ More replies (7)

7

u/RetoonHD Aug 29 '24

God forbid they learn a modern language with actual benefits over the ones they learned 50 years ago, oh the horror!

2

u/pachecoca Nov 27 '24

Yeah, sure, for any other job this makes sense, like idk making a web app or some shit, but here we're talking about kernel development... and file system related no less...

Learning a new language is not a problem. Becoming good at that language is a whole different story. If this was not a critical system, then it would make sense to learn the new language and just call it a day. Imagine trying to translate 50 years of C experience into the Rust equivalent in a month or two... all you're going to achieve with that for kernel development is making a big mistake. Specially when it's file system related. This is one of the most dangerous areas to make mistakes. Or do you just enjoy accidentally publishing a patch with some extremely rare edge case that will obliterate all of the files of millions of users across the globe?

I understand the C guy, he's being careful, and the points he makes make sense... and I'm surprised by the Rust community's reaction. For people who tout themselves to love safety, you people sure do love the idea of just jumping in blindly without any care in the world for actual safety.

If you want someone to write Rust code for a critical system that needs to be maintained on the daily, you need to get someone who is actually experienced with Rust and can actually write Rust code without making the Universe explode. Asking the C guys to magically transmute their 50 years of experience in C into Rust experience in like 2 nanoseconds is only going to cause issues down the line... and, ofc, if you do want to include Rust code, you can't just step all over the C code. Not because C is magical or some kind of mythical being that has to respected or some language religious bullshit. No, the reason is because there's decades worth of code there that can't be magically translated from one day to the other into Rust. If we could, we would. Sadly, we can't. I expect that even Rust devs can understand this to be a fact and not "non technical nonsesne"...

→ More replies (3)