r/programming • u/steveklabnik1 • Aug 29 '24
One Of The Rust Linux Kernel Maintainers Steps Down - Cites "Nontechnical Nonsense"
https://www.phoronix.com/news/Rust-Linux-Maintainer-Step-Down69
u/Psychoscattman Aug 29 '24
Can somebody explain what is going on in the context that was included?
Looks like a conference presentation about a filesystem written in rust and an audience member is talking down on them? What's going on there?
61
Aug 29 '24
Can somebody explain what is going on in the context that was included?
→ More replies (5)42
u/atred Aug 29 '24
Amazing summary, it makes though sound like the discussion was more rational than it seemed if you watch the video linked above.
9
u/noboruma Aug 30 '24
Honestly even the video linked above makes sense if you are willing to accept people can have diverging opinions.
Yes adding a new language is going to add extra burden, and this needs to be addressed. The way people communicate is not the best, but the worst that could happen is being ignored, then the project would truly die. Here you know what you need to work on.29
u/atred Aug 30 '24
It makes sense, the problem is the style, timing, and not be willing to listen to what the other person is saying.
→ More replies (1)37
u/JoeyJoeJoeTheIII Aug 30 '24
Except he attacked them as being religious zealots then claimed they were making demands they have never made and finished off by crying about much he doesn’t want to learn rust.
This wasn’t a diverging opinion, it was just asshole having a public tantrum.
→ More replies (3)15
u/suid Aug 30 '24
The problem is that it's not a "small burden", like "oh, just get on the shiny new Rust train and get with the program and deal with it".
You have 10000 programmers who have been working with C in the kernel for 35 years. There are hundreds and hundreds of different subsystems (filesystems, drivers, memory management, schedulers, you name it), that have groups of maintainers that all have to work together.
You can't just waltz in there with your shiny new language and say "this is the future, you must now start coding with an entirely new paradigm that fits in with our shiny new toy, and if you break something in my code when you fix something, that's your fault".
It's really easy for the Reddit peanut gallery to come in and say "Oh, that Ted, what an asshole". He has some valid points; even Linus' acceptance of Rust is conditioned on the interface being kept clean and simple, and not acting as a boat anchor on future development of the kernel.
Rust is a massively new paradigm, and while it may seem now that it's "obviously the greatest thing since sliced bread, and C is such a shitty stupid language that's only for stupid people, and they should just bow to our superior language now", that's just not going to happen.
And that's just the truth.
Edit: If the Rust community (which includes the Peanut Gallery above) can produce even 100 competent kernel developers who are willing to work with Rust in the kernel, that would be a HUGE thing. It's easy to throw stones from the gallery - get in there and do the goddamned work yourself, and your opinions may well change.
→ More replies (15)22
604
u/cosmic-parsley Aug 29 '24
Ted: I don’t like Rust, the experiment will wind up a failure
Ted: Flames Rust developers to make it clear he doesn’t want them, refuses any attempt to be accommodating, does everything possible to block progress
Rust maintainers: get burnt out from uphill battles, contributions slow down
Ted, in another year: “See? Told you it would be a failure”
Sounds like this is an attempt to bully rust out and then confirmation-bias that it was doomed to fail, by doing everything possible to try to make it fail.
Luckily the kernel is full of many many people that are more open minded people than Ted, the naysayers are always just the loudest.
8
u/deanrihpee Aug 30 '24
the developer of the GPU Driver for MacBook (or M CPU/SoC in general I guess) so you can run Linux on it also experience the same thing, since she uses Rust for the driver the upstream progress is so slow and her suggestions or discussion just not being considered, they're actively slowing down Rust adoption just because they don't want new language, not because the language is bad or anything
2
→ More replies (62)1
Sep 01 '24
Linus: “let’s introduce Rust into the kernel” Ted: “how about I be a toxic douchebag instead?”
56
u/sisyphus Aug 29 '24
From the youtube he linked I can't tell if the nontechnical nonsense is pushback on people seen as pushing 'the Rust religion' or the tone in which they do it, but I found this bit interesting: "we will find out whether or not this concept of encoding huge amounts of semantics into the type system is a good thing or a bad thing" when I talk to static typing people they take that being a good thing as a truism. It's definitely hard to make progress with people who have spent a lifetime learning the intricacies of C and C++ who tend to be very defensive about them, and it's probably even worse in a project that doesn't take security particularly seriously like the linux kernel.
138
u/quaternaut Aug 29 '24
A bit off-topic, but why do you say that the Linux kernel project doesn't take security particularly seriously? Were there security incidents that could have been prevented had the kernel devs been more vigilant or security-minded?
66
u/meltbox Aug 29 '24
Yeah I don’t follow that comment at all.
19
u/neoKushan Aug 29 '24
So many companies use and rely on the linux kernel, it gets audited to hell and back. It's difficult to imagine anyone thinking it's not security focussed.
→ More replies (1)3
68
u/Plasma_000 Aug 29 '24 edited Aug 29 '24
Not OP but:
Linux (Linus specifically) has long had a policy of "security vulnerabilities are just bugs" - which while true, puts aside that security vulnerabilities often have extra impact to users, and so instead they are treated and prioritised without any special attention.
Furthermore, recently the Linux org became able to publish and reserve CVE numbers - this is a system which is designed to inform people which vulnerabilities they have patched by giving each a number. What Linux instead proceeds to do is give nearly every commit to the kernel its own CVE irrespective of whether any actual vulnerability is present, which is poisoning the well and throwing off normal statistics and decision making.
Additionally, Linux has a history of pushback at any security mitigations or hardenings, especially ones that would have even a negligible performance impact. Today this is a little more relaxed but still very much exists.
16
u/schlenk Aug 29 '24
CVEs are just numbers, so people talk about the same issues instead of every vendor invents its own numbers.
The security "industry" came up with the grand idea to consider any CVE in a component important and spamming people with HIGH, CRITICAL security alerts all over the place, when all you have is an issue in a commandline tool that is explicitly just used in some test and totally irrelevant for 99.999999% of all users of that library. Might leave a few users if you happen to develop Android, okay. Thank you for wasting everyone elses time.
Like, imagine to have a public bug tracker. Now some clueless horde of attention seekers starts to file all kinds of hillarious bugs there. And can set the "severity" externally. And then the same crowd tries to convince you to totally absolutely treat their specific issues with super high priority, because its seehhhcuuuurityyyy, and obvious HIGH, because they said so. And if you don't react, they go to some social media, press or whatever and present their scandals and critical problems. Thats the current CVE system. 95% noise.
9
Aug 29 '24
Hmm, regarding the CVEs, are there any particular examples of an irrelevant CVE?
I haven’t looked deeply into it but it has always seemed to me that they publish proactive CVEs when they patch a security class bug.
Should they use a higher CVSS as threshold or are there a lot of egregious CVEs I’ve just not seen (since I haven’t actively been looking).
→ More replies (1)21
u/Plasma_000 Aug 29 '24 edited Aug 29 '24
So far this year Linux has published nearly 3000 CVEs, nearly none of them are actual vulnerabilities.
Instead of any effort to publish security vulnerabilities, org is actively undermining the system by publishing practically any bug fix as a CVE.
Linus is quoted saying "Bugs will happen, and anything can be a security bug […]"
Edit: reading this article gives a much more charitable perspective and changed my mind a bit https://lwn.net/Articles/978711/ but imo the process is still very flawed.
→ More replies (1)13
u/iiiinthecomputer Aug 29 '24
There's a whole other side to the story though, with abuse of the CVE system by "vulnerability" and "security" scanner companies to drive sales, and by a whole Compliance™ industry around it. Combined with some security researchers being much more interested in CV-padding than finding genuine issues, we've landed up in a situation where the CVE database is full of noise, seeverities are inflated, and it can be actively unhelpful.
The Linux maintainers are reacting to the resulting high churn environment full of meaningless noise and demands for rushed urgent fixes for non-vulnerabilities some code scanner flagged, before some company who sure isn't paying the maintainer for the work exceeds some arbitrary remediation deadline set by their tech-ignorant corporate compliance team, baked into external contracts, or even into industry regulations or law.
As usual - capitalism ruins everything.
16
Aug 29 '24
What Linux instead proceeds to do is give nearly every commit to the kernel its own CVE irrespective of whether any actual vulnerability is present, which is poisoning the well and throwing off normal statistics and decision making.
Jesus Christ this has to be one of the most idiotic movements I've ever seen.
Security vulnerabilities are bugs
OK. I can stand living with that idea if someone wants to see it that way even though it doesn't work like that in reality.
But then using a system that's exclusively for security, to register all bugs...that's just being idiot.
43
u/Booty_Bumping Aug 29 '24 edited Aug 30 '24
It's not idiotic when you consider that environmental CVSS scores are now a thing. It was always a bad idea to create automations that read from the CVE system that don't do any filtering whatsoever, and the Linux kernel is just adapting to this reality. The kernel team essentially DoSing the CVE system with noise is a blessing in disguise, and is actively improving the situation by weeding out automation tools that were already prone to information overload. The CVE system was never intended as a list of all severe problems to pay attention to, it is just a way to make sure a non-overlapping number is assigned to each security issues so that they can be discussed without confusion.
→ More replies (1)→ More replies (1)19
u/iiiinthecomputer Aug 29 '24
There's more to it than it sounds like.
A bunch of companies have created automation around CVEs to scan code and infrastructure. Which was be handy and a good idea until a whole industry grew around blindly and slavishly following the scanner results, using them to "prove" your product or service is "secure", etc. Now it's routine to have to do an urgent upgrade of some library you use becuse an unrelated feature you don't use is vulnerable to a theoretical exploit by a local user even though you only use the library in container images anyway.
This industry has been successful at lobbying to get use of their products encoded into industry compliance standards like PCI/DSS, into government procurement, and in some places even into law. All nuance has gone with it, and it's now common to just blindly follow the scanner.
I've had to fork upstream projects or libraries and back port fixes myself in cases where a direct upgrade wasn't feasible in the time allowed. For something completely irrelevant, where a sane process should only have required an inspection and sign-off that the component is unaffected by the issue with a suitably justification.
Then there's the issue that a significant number or security researchers are CV-padding using CVEs; they will try to find any way they can to get high severity CVEs to their name. Its actual risk or significance isn't a concern. This has led to a huge spike in nonsense higher severity CVEs, which drowns the real ones in noise.
This wears out maintainers, who are then deluged by these minor code linter complaints dressed up as security issues, and by bugs raised by companies using these scanners about the need to upgrade some "vulnerable" component. Urgently of course, but without a patch or PR.
It's also creating a high code churn environment that makes it WAY too easy to sneak in malicious changes because nobody has time to even look properly over "PR: bump libfoobar to v1.9.79999 for CVE-ABCD-12342234".
→ More replies (2)22
u/sisyphus Aug 29 '24
Linus famously said 'security problems are just bugs'; it's been an article of faith among security people for ever and in the present that if you have a local shell on a Linux box you've got root; grsecurity and pax have never gotten upstreamed (though spender ain't exactly the easiest person to work with; neither are Linus and Co.). You can see what a security focus looks like in a project like OpenBSD; Linux for better or worse leaves a lot of this up to third parties.
20
u/astrange Aug 29 '24
Linus famously said 'security problems are just bugs'
That's a good approach if you want to keep developers on your open source project, since you need to defend their egos (and they already have Linus yelling at them.) Security offense researchers are unique among bug reporters because they're extremely annoying and self-important and when they find a bug in your code they go around giving conference talks about it, giving themselves prizes, making up logos for it, getting bounty programs to give them a million dollars etc.
Nobody's doing that for the guy who put the bug in even if you needed the feature he wrote!
8
u/astrange Aug 29 '24 edited Aug 29 '24
OpenBSD is not really very good at security because they don't actually engage with vulnerability research. They maintain some projects in the security category, but their OS mitigations aren't good and aren't based on realistic priorities. They basically just make up defenses for imaginary attacks and put them in there.
https://isopenbsdsecu.re/quotes/
iOS and Android have the most effort put into them since they have the most real-world attacks. It helps that ARMv8 is the only hardware ISA with useful security features regularly being added.
→ More replies (2)14
u/UncleMeat11 Aug 29 '24
The kernel is filled with CVEs.
But what's worse, the kernel has had vuln regressions because they didn't introduce tests alongside fixes.
The linux kernel is an incredibly complicated piece of software, but it is probably also the most important piece of software on the planet when it comes to the world's security posture. The kernel developers aren't totally blase about security, but they definitely aren't taking an approach that prioritizes security whenever possible.
I know a number of people who have spent careers trying to find ways to change the culture within the kernel community and ultimately failed.
→ More replies (9)→ More replies (5)7
u/Coffee_Ops Aug 29 '24 edited Aug 29 '24
Watching the story arc of the spectre / meltdown etc fixes certainly gave me that impression. I recall intel giving guidance to MS and the Linux devs on how to fix it; Microsoft took their approach but Linus rejected it as a crap idea due to the performance implications.
Sometime around 2022-2023 a new variant came around which Windows was immune to, having baked Intel's suggestions in years prior, while new releases (Ubuntu 23.04?) were hit. This resulted in the linux kernel having to implement those fixes after all, performance regressions and all.
I also recall that a lot of the anti-exploit features that Windows has been implementing for years now were historically available with grsecurity but generally rejected as not necessary.
Beyond that (not all of these are kernel but go to the general anti-security vibe)
sudo /setuid is a security dumpster fire
Things like SELinux user constraint that might help are generally not used
Secureboot has been a dumpster fire for years as well, which is only recently starting to get fixed with UKIs
54
u/tejoka Aug 29 '24
"we will find out whether or not this concept of encoding huge amounts of semantics into the type system is a good thing or a bad thing" when I talk to static typing people they take that being a good thing as a truism.
Well, sure. I mean, we figured out the answer was yes in the 80s. In 2009 they gave Barbara Liskov a Turing award for her part in figuring this out. (Pop articles often talk about object-oriented programming for her Turing award, but oddly enough I find the above quote to actually be a more accurate of a description of Liskov's contribution than anything "OO.")
Maybe we could read a lot into the word "huge", because there's certainly room to critique, say, dependently typed languages as maybe going "too far." But Rust's type system is really quite conservatively designed.
Sometimes we do actually figure things out, and the industry isn't just a morass of "well that's just your opinion man."
30
u/JoeyJoeJoeTheIII Aug 29 '24
C programmers prefer not to acknowledge any PL options and theory that’s from beyond the 70s.
Actually it’s pretty funny how they went from one unhinged whine fest about rust to immediately a weird tangential whine fest about Java.
Just a toxic group.
It’s kind of funny how Torvalds got shit on so much for being toxic but on this topic he’s been reasonable and pragmatic.
→ More replies (2)4
u/Ravek Aug 29 '24
Not surprising though that people who only use C are a bit behind the curve on programming language design.
→ More replies (6)24
u/bleachisback Aug 29 '24
when I talk to static typing people they take that being a good thing as a truism.
It's strong typing people. C obviously has static typing, but proficient C programmers love how weak C's type system is, which is why Rust is seen in such a bad light by them.
6
Aug 29 '24
The whole embedded field is based on the fact that C is weakly typed. There are some “tricks”(or hacks) that low level programmers (ab)use to do their job. Unfortunately the change is just too big
8
u/Glacia Aug 29 '24 edited Aug 29 '24
Ada exists and is strong typed and is embedded friendly. Way more than C, actually. Strong typing is not equal memory safety.
6
u/n7tr34 Aug 29 '24
Yeah most embedded devices are dealing with memory mapped IO which usually requires manipulating individual bits. Unfortunately, most control registers don't really have a fundamental type as they just mash everything together.
That being said it's certainly possible to use safer typed languages like Rust, modern C++ in embedded no problem, just have to encapsulate the bit fiddling and then don't touch it.
Getting embedded devs to do anything except old school C is sometimes like pulling teeth though.
→ More replies (1)12
u/bleachisback Aug 29 '24
I’m not sure that there’s anything inherent in the embedded field that requires the use of weak typing. I’m sure embedded programmers, as mentioned before, love using C’s weak typing to get things done, but I’m not sure that that’s evidence that it’s required. There are plenty of embedded programmers using Rust with very strict typing systems.
3
u/HeroicKatora Aug 29 '24
Ironically, based on the specification, you might call Rust weaker typed. It doesn't come with type-based alias analysis in the language (C/C++) nor an object model (C++). The strongest typing influences are atomics where all memory models including that of llvm require parallel access to the same memory to use the exact same atomic size to avoid data races; the kernel chooses to ignore this and does relaxed reads of u8 size from a u64 slot. I'm sure nothing will ever go wrong if a large project is ignoring the compiler's main operational semantic model, right? Everything else you can type extremely weakly in Rust if you know what you're doing. And leverage proc-macros to make working with mixed type sematics surprisingly pleasant (e.g. Google's
zerocopy).I could take an opinion in favor of C serious if they jumped at a need for volatile atomics, which Rust doesn't provide as types. Alas people complaining loudly don't seem to have the technical depth to bring this up. How strange.
2
u/nicheComicsProject Aug 30 '24
"we will find out whether or not this concept of encoding huge amounts of semantics into the type system is a good thing or a bad thing"
It's funny that the person who said this claimed the Rust devs were "religious". This kind of attitude is certainly not something from an impartial engineer. Imagine going to a civil engineer and stating "we'll see if this process which catches more imperfections in bridge building material turns out to be good or bad!" or a doctor and saying "we'll see if this test which has less false negatives is good or bad!".
2
u/gmueckl Aug 30 '24
There is one important practical subtlety in this particular discussion that only occurs at the boundary between languages, because language semantics never line up perfectly in practice: the rules embedded in the type system on one side are mirroring a convention on the other side of the bindings. The only way to ensure that the two of them are in sync is through manual effort. This is especially troublesome if the interface is intricate and subject to change. It's easy to get into one of two situations in this case:
The type based interface is not adjusted to mirror a convention change or misses a subtlety in the convention and therefore encourages/enforces wrong use of the interface.
A change in the bound function is of a nature such that the types used to express the constraints of the interface need to change drastically to keep up. This would drive up the refactoring effort to keep the strictly typed side in sync.
2
u/JoeyJoeJoeTheIII Aug 30 '24
I would guess it’s the “rust religion” bullshit, putting words in their mouth, and vehement I WILL NEVER LEARN RUST!
Plus no one likes being publicly bullied like this.
Anyway, C people seem to love pretending that stuff already well accepted by other languages is totally novel and unproven.
1
u/MaleficentFig7578 Aug 30 '24
There's basic static typing where the compiler knows if you have a string or an integer and there's advanced static typing where nothing compiles until everything is correct.
1
-3
-6
u/JoeyJoeJoeTheIII Aug 29 '24
I’m guessing it’s angry C zealots shoving words in their mouths and nearly have a full on tantrum over the idea that might someday potentially have to modify some rust code to avoid breaking it.
C developers really are the worst. Shit on every other language (except Zig, a stupid fucking idea that could only be had by C programmers) and then complain about how “toxic” the rust community is.
Why would anyone want to deal with people like the guy ranting in the video?
0
Aug 29 '24
[deleted]
2
u/ResidentAppointment5 Aug 29 '24
This.
I'll never use Zig, but I greatly respect its developers for looking at Go and saying "no, thanks. Let's do an actually better C."
→ More replies (2)→ More replies (12)20
113
u/Positive_Method3022 Aug 29 '24 edited Aug 29 '24
That guy on the audience was very emotional. He was clearly triggered by fear of seeing rusr becoming the "first class citizen" in the Linux kernel. The other guy repeated several times "WE ARE NOT FORCING ANYONE TO USE RUST"
59
u/lukaasm Aug 29 '24
But implicitly, they are forcing him to use Rust. As a maintainer responsible for kernel module after refactoring he needs to fix all 'users' of API he maintains which also includes rust bridge which takes C API through FFI and transforms it into strong Rust types through safe wrappers. To 'fix' them, he must now go outside his 'C' domain and understand Rust code.
There is a real discussion to be had about this and plans on how to deal with breakage but without all these emotions.
131
u/bik1230 Aug 29 '24
But implicitly, they are forcing him to use Rust. As a maintainer responsible for kernel module after refactoring he needs to fix all 'users' of API he maintains which also includes rust bridge which takes C API through FFI and transforms it into strong Rust types through safe wrappers. To 'fix' them, he must now go outside his 'C' domain and understand Rust code.
Did you watch the presentation? The Rust people said, multiple times, that they would be happy to take care of fixing Rust stuff when C interfaces change.
96
u/TheEruditeSycamore Aug 29 '24
A huge amount of exhausting discourse is people replying to things they imagined rather than what was actually said. Just look at this thread, the comment you replied too is not the only one...
15
u/Efficient-Chair6250 Aug 29 '24 edited Aug 30 '24
If I had the option of world peace or fixing people imagining what other people think, I would solve every problem ever by choosing the latter.
Edit: spelling
6
7
u/Efficient-Chair6250 Aug 29 '24
If I had the option of world peace or fixing people imagining what other people think, I would solve every problem ever by choosing the later
6
u/fandingo Aug 30 '24
I'm skeptical whether the Rust people will be able to keep up.
→ More replies (1)14
Aug 30 '24
That really doesn't seem practical. Like, what if I just want to try something? How do I experiment with changing C interfaces on my local machine if I need somebody else to come fix up the dependent Rust code? How can I be productive if my changes won't even compile without you making corresponding changes?
7
u/JoeyJoeJoeTheIII Aug 30 '24
Because the rust code isn’t going to block kernel development when it breaks.
11
u/MaleficentFig7578 Aug 30 '24
So every time the C maintainer changes the C API, he has to get the Rust maintainer to fix the Rust layer before the kernel will even build? Before he can test his changes? Will he pair program with the Rust maintainer?
→ More replies (1)6
u/deanrihpee Aug 30 '24
I don't think so, if there's a C API changes anyway, then there would be a change in the codebase, and he don't have to "get" the Rust maintainer, the Rust maintainer understand and would do it on their own, it's their job, and why would he need to wait to test his change? just test and push, if his change can't be tested because there's something blocking it, I dont think the absence of Rust would eliminate it, it would just be a blocker anyway, let the Rust maintainer do their job next and test their stuff, you just unnecessarily making it more complicated than it has to be
→ More replies (1)8
u/josefx Aug 30 '24
that they would be happy to take care of fixing Rust stuff when C interfaces change.
They also mention outright that they will need the input of the C developers for that at the beginning of the presentation. Turning a fine tuned process of managing thousands of commits and merge request that the guy can do by himself into a coordinated effort where any merge might require scheduling meetings, preparing an ELI5 summary of the changes that covers every possible change of semantics and herding cats who seem to think that one large breaking change is the best chance to run wild with the kernel naming convention and leaking implementation details into a public interface.
7
Aug 30 '24
Did YOU watch the video? You seem to have a selective memory because the presenter first stated that the binding should be fixed by who broke it and relented when the response was that other won’t be forced to learn rust.
2
u/deanrihpee Aug 30 '24
I'm no kernel developer but, it "should", not "have to", if the user of the binding, e.g the rust developer is free and can help, why refuse such help? sounds like a good reason to off load the work…
0
Aug 29 '24
[deleted]
40
u/Efficient-Chair6250 Aug 29 '24
They are justified in being concerned, but I don't think they are justified in acting the way the person did in the video. Being the intelligent people they are I think they can work out who has which responsibilities. If people want Rust in the Kernel, they have to work hard for it and might get little help. But actively bullying people out of their passion is just plain rude
→ More replies (3)3
u/tom-dixon Aug 30 '24
And sometimes people just quit, and maintainers inherit the code until they find someone to put in charge of it. A C maintainer having to fully maintain a large Rust project sounds like a nightmare.
14
u/Anthony356 Aug 30 '24
But implicitly, they are forcing him to use Rust.
Isnt Linus forcing them to use rust by allowing rust in the kernel? Why are we blaming rust devs when Linus made the call?
I feel like the solution here is the same as any job: stop making excuses and just learn the language expected of you.
→ More replies (2)8
u/MaleficentFig7578 Aug 30 '24
Linus is ok with Rust existing, especially out-of-tree. He might not be ok with every change being held up by the Rust people.
19
u/PeaSlight6601 Aug 29 '24
To add to that the rust guys had just presented an example API for one function and gotten the types and behavior wrong.
It's unclear what they thought they were presenting. It could have been a hypothetical, or a statement of how they think the code actually behaves, but it doesn't give the C maintainers confidence when the rust maintainers don't get the base interface correct.
Who will be responsible? The C programmers who don't know how rust works? The rust programmers who don't know the details of the C code?
9
u/Efficient-Chair6250 Aug 29 '24
Maybe I'm wrong, but I thought the code was just one example of matching the logic of C code that is actually used in some file systems. But different filesystems model the lifecycles of inodes differently, so the example is not generally applicable to them. So in the end they should have invested in a taller wall to show the "rewrite" of ALL inode functionality in ALL filesystem ever on a single slide
→ More replies (6)6
u/josefx Aug 30 '24
So in the end they should have invested in a taller wall to show the "rewrite" of ALL inode functionality in ALL filesystem ever on a single slide
Which is also the wrong outcome. From what I understand the function is part of an interface that is currently filesystem agnostic, as in there should only be one interface for all ALL inode functionallity, not a wall filled with interfaces for each specific implementation.
→ More replies (1)→ More replies (11)2
u/Vadoola Aug 29 '24
Doesn't he "needs to fix all 'users' of API he maintains" only if he is also maintaining this down stream users? If someone else (as in this case) is maintaining the file system rust bridge then he doesn't need to learn rust or do anything. I would say ideally he shouldn't be breaking the API that often, but that is a separate issue.
10
u/ub3rh4x0rz Aug 29 '24
I don't think that's how Linux kernel development works. For better or worse (and history has shown that it's been "better" considering the world runs on linux, no matter how inconvenient it makes this particular effort to incorporate rust), it's a monolithic kernel, with decades of maintenance norm forming that reflects and solidifies the architectural and ordering principles. I think a fact of that project at this point is, "sometimes you have to break APIs, and when you do, you're responsible for fixing the consumers". It's a totally reasonable approach, and it's a reasonable position to take to say, "these experimental consumers are excluded from that rule". If the experiment can't succeed as a result of this, it's a failed experiment.
→ More replies (2)6
u/Vadoola Aug 30 '24
it's a reasonable position to take to say, "these experimental consumers are excluded from that rule". If the experiment can't succeed as a result of this, it's a failed experiment
You are correct it's a very reasonable position to take, that these experimental consumers are excluded from that rule that, but that seems to be Ted Ts'o's issue here. He feels like they aren't being excluded from that rule and he is being forced to learn and maintain Rust when he breaks the API he is responsible for. However from what I am seeing it IS being excluded so I don't understand why it is an issue for him.
All that being said, I've never been involved in kernel development of any sort, and I may completely misunderstand something here from a technological, organizational, or political perspective.
→ More replies (6)0
Aug 29 '24
[deleted]
6
u/ub3rh4x0rz Aug 29 '24
A rust experiment in mainline Linux necessarily must not be depended on by the nonexperimental codebase. If the experiment can't succeed without forcing internal apis to be stagnant as if they're public apis, then relegating rust to kernel modules is precisely the recourse. That means a failed experiment in incrementally replatforming the Linux monolith though, and I don't think that's the outcome anyone wants, all else being equal.
2
u/JoeyJoeJoeTheIII Aug 30 '24
If it’s not the outcome they want then kernel devs wouldn’t be bullying rust devs into stopping their contributions.
→ More replies (1)
6
269
u/qmunke Aug 29 '24
Man the comments on that article make me really glad I have no interest in kernel development.
So many people who think somehow C is the only language that could ever be suitable for writing the linux kernel in, for no real reason other than Linus Torvald's bashing of C++ several decades ago.
They're basically the programming equivalents of MAGA nutjobs.
33
u/josefx Aug 29 '24
Man the comments on that article make me really glad I have no interest in kernel development.
If comments on news articles where anything to go by life in general would not be worth living.
140
u/JoeyJoeJoeTheIII Aug 29 '24
There was a guy in there complaining about rust being too woke and calling the EU nazis.
Insane place.
And of course during all of this insane behavior they insist the problem is that rust people are too toxic.
96
Aug 29 '24
[removed] — view removed comment
→ More replies (8)22
u/Zalack Aug 29 '24
Yeah, at worst most pro Rust people just seem to be really excited and passionate about a tool they believe in. Even when it becomes a little much, it’s hard to fault people too much for being passionate about something.
→ More replies (8)24
u/Dave9876 Aug 30 '24
There was a while there where every crypto gronk was trying to get onto the rust bandwagon. Made parts of the community kinda uncomfortable. Thankfully most of that seems to have gone away now
53
u/Calavar Aug 29 '24
Obviously something from 20 years ago isn't very relevant to today, since people change their opinions over time, but there's actually an extra level of irony in Linus's C++ bashing:
If you want a VCS that is written in C++, go play with Monotone. Really. They use a "real database". They use "nice object-oriented libraries". They use "nice C++ abstractions". And quite frankly, as a result of all these design decisions that sound so appealing to some CS people, the end result is a horrible and unmaintainable mess.
But I'm sure you'd like it more than git.
Monotone was written by Graydon Hoare
1
u/dys_functional Aug 30 '24
I want to make a time machine not to solve any actual problems in the world, but to go back and piss Linus off enough to be the recipient of one of his tantrums when he regularly sent out spicey emails like this. I feel like it's the highest badge of honor in our field.
154
u/crusoe Aug 29 '24
Google has been bringing more Rust into Android and their Fuchsia OS , and has basically found 0 memory releated bugs or CVEs reported against the Rust code.
That's pretty damn huge if you ask me.
"But memory bugs are only a fraction of total bugs"
Yes, but its like 25% and they tend to be most customer/user impacting, either security or stability.
62
u/JoeyJoeJoeTheIII Aug 29 '24
I thought it was something like 70% of CVEs, did I hear the wrong number?
48
Aug 29 '24
Nope you are right, but C devs feel personally attacked if god forbid someone says anything
16
13
u/quavan Aug 30 '24
In school, we had a Chrome dev come give a talk about what Chrome development is like, and what kind of things they have to frequently debug and the strategies they use to do so. I had just started going through the Rust Book at the time, and noticed that none of the bugs would compile in Rust. That was my "ah ha" moment.
→ More replies (1)→ More replies (11)1
Aug 30 '24
Google uses tons of languages. I don't think Google can be our metric. They even created their own languages and use it too. Like Dart! Or Go!
→ More replies (1)16
u/Richandler Aug 29 '24
Adding another language does add to complexity. It shouldn't be dismissed; it's not a technical problem it's an organizational problem. Typically organizational problems make or break your product if you actually have a sellable product.
13
u/coding_guy_ Aug 29 '24
Forgive me but I’m wondering what the performance overhead of using rust vs c is. Because rust is compiled I assume it’s virtually unnoticeable but I’m not a kernel dev or a rust programmer.
45
Aug 29 '24 edited Aug 29 '24
There are some variations in runtime performance, although the main overhead is compilation times - Rust code is much slower to compile than the equivalent C/C++ code, because the compiler performs various checks for correctness during compilation.
edit: see /u/bik1230's comment below for more nuance
63
u/bik1230 Aug 29 '24
Rust code is much slower to compile than the equivalent C/C++ code, because the compiler performs various checks for correctness during compilation.
Than the equivalent C code, not C++ code. The checks are very fast. What's slow is generics and macros, which generate tons of work for the compiler. C++ has the exact same problem with templates. How bad any given C++ or Rust code base is to compile is going to depend on the extent to which they use tons of templates/generics/macros.
8
u/snaketacular Aug 29 '24
I haven't written any non-trivial Rust, but there are a couple such as array and vector bounds checks by default in Rust (where C would happily index into garbage if you ask it to) and (in debug mode, which you probably would not use for production) detection of integer overflow/wrap etc.
Conversely, Rust theoretically allows stronger aliasing optimizations to be made than C (unless you want to add 'restrict' keyword everywhere), historically there was trouble with LLVM bugs in that area though.
13
u/blairjam Aug 29 '24
You can also skip the bounds-checking in situations where ultimate performance is required and/or the checks have been profiled and found to be too slow under your specific setup. This means delving into
unsafeterritory though, so the programmer is responsible to ensure out-of-bounds access doesn't happen.See the docs here: Slice::get_unchecked
11
Aug 29 '24
Forgive me but I’m wondering what the performance overhead of using rust vs c is
Basically none assuming competent developers, except in obscure situations.
→ More replies (4)1
u/nicheComicsProject Aug 30 '24
Rust can end up being faster because the compiler can determine that certain runtime checks aren't even needed because e.g. a bounds overrun or accessing memory from two threads at once cannot happen.
0
Aug 29 '24
[deleted]
43
Aug 29 '24
This is a common myth but the "huge amount of checks" rustc does is not really why compilation is slow. The proof is that
cargo check(which does the same amount of "checks" as a real build) is many times faster than doing an actual build (especially a release build).The real reason rustc is slow is because generics tend to generate a huge amount of LLVM code which rustc relies on LLVM to eliminate, which is slow.
0
Aug 29 '24
[deleted]
4
u/MEaster Aug 30 '24
Outside of LLVM, there are other parts that slow things down. Macro expansion is on the slower side, as is trait resolution. So those will impact compile times in codebases that make heavy use of macros or trait system.
In addition to that, the rustc frontend is currently running single-threaded, and can't actually feed LLVM fast enough to make full use of all of its threads. So while LLVM is slow, rustc itself isn't helping.
There is ongoing work to make the frontend multi-threaded, and the compiler actually runs that infrastructure limited to a single thread, but there are currently bugs related to actually using multiple threads.
→ More replies (44)8
u/thefoojoo2 Aug 29 '24
I had to double check that i was reading comments posted in 2024. Incredible.
43
u/stonerbobo Aug 29 '24
I don’t know why people have such strong reactions to Rust lol. The idea of using a different language is seen to be like religious evangelism when that language is Rust instead of just another technical decision. In other cases people constantly make jokey allusions to being forced into transgenderism when Rust is mentioned? Like this language in particular is seen as some kind of political or religious statement instead of a language lol..
I have written a bunch of Rust code in my personal time and it’s just a great language albeit with a steep initial learning curve. It’s not a cult, just a good language that fills a gap in the space and brings a lot of modern language niceties to the systems space.
12
u/Efficient-Chair6250 Aug 29 '24
"Try not to make things about politics challenge" - impossible
"Rust is a Religion" but people cling to C like it's some kind of Messiah. They are just programming languages, chill
2
u/HINDBRAIN Aug 29 '24
I don’t know why people have such strong reactions to Rust lol.
It's not Rust, it's Rust users. Check how every single comment critical of the language is in the -40s of downvotes, that should give you a good idea of the zealotry.
38
u/BlandSauce Aug 30 '24
Check how every single comment critical of the language is in the -40s of downvotes
Do you mean in this thread, or others? The only comment I've seen here that matches that description starts with "Rust is not a normal language for normal people." which really isn't "critical of" as much as "shitting on".
27
u/UltraPoci Aug 30 '24
Most *good* critical comments about Rust are actually upvoted in r/rust. Take the discussions about async and function coloring, for example: it's constantly discussed and it's never donwvoted to oblivion. The "critical" comments that are downvoted are normally from people that don't understand Rust and what it's trying to achieve. There are soooo many people thinking that the presence of the unsafe blocks makes Rust as unsafe as C and you should just use C, which is completely misguided in my opinion.
3
u/JoeyJoeJoeTheIII Aug 30 '24
Or maybe people are just sick of narrow minded C zealots who refuse to acknowledge the languages shortcomings and shit on everything else.
Except maybe some pre1.0 modern C language no one uses, those they are fine with.
1
Aug 30 '24
Rustees initially promised to rewrite everything in Rust. Rust became the king of the programming languages.
12
u/ESHKUN Aug 30 '24
You’re telling me the Linux community is toxic and unfriendly to new things??? No way!
6
u/Useful_Can7463 Aug 31 '24
You posted about how you're excited to see a Youtuber burn in hell because he didn't reaffirm the position you have on some retarded drama. I'm sure you're not toxic at all lol.
→ More replies (1)
8
u/ilawon Aug 30 '24
I can only imagine the discussion if we were talking about a rust project that had dotnet or java bindings that had to be kept in sync together with their dependencies. :)
The "C guy" sounds whiny for good reason... he suddenly has to keep the rust code in mind when making changes to the code he's responsible for. I've heard "don't worry, do your thing and we'll take care of it" way too many times during my career to know it sounds more like "you'll be left waiting or in a continuous string of meetings and discussions so you're better off just avoiding us".
I have no doubt the rust team means well but...
15
u/abandonplanetearth Aug 29 '24
I didn't read the article because of the gigantic cookie popup that cannot easily be declined.
→ More replies (9)
2
u/nolilbopeepbro Aug 30 '24
Hmm Linux kernel developers being socially jarring, aggressive and elitist? I don't believe you!
2
Aug 29 '24
Rust aside, how difficult it would be to implement a C compiler that tracks pointers lifetime similar to how Rust works? Something not too advanced, something capable of statically identify dangling pointers, unfreed memory areas and memory leaks in general.
C is a simple and small language, why there’s no such thing?
51
u/Mwahahahahahaha Aug 29 '24
IIRC, tracking lifetimes is undecidable which is why Rust requires some lifetimes to be manually marked and unsafe if you need to break out of the compiler’s ability to track them. In short, you can’t just add them to C, it would require a syntax change which would break backwards compatibility.
→ More replies (6)16
u/UncleMeat11 Aug 30 '24
Monstrously hard. People have been writing papers on this topic for 30 years with fairly minimal success.
You can't control aliasing relationships in C without FPs in almost all existing code. This destroys a static analyzer's ability to reason about even basic things. Add some indirect function calls and oops your analyzer emits Top and the user turns it off.
Look at how difficult it is to adopt Apple's proposal just to have bounds-checkable arrays.
19
u/ResidentAppointment5 Aug 29 '24
You wouldn't have C at the end; you'd have Rust minus most of its abstraction-building facilities.
What I mean by this is, Rust's secret sauce is its type system, which is different from C's in ways you can't reproduce with C's. So you'd have to change it, and those changes wouldn't be backward-compatible.
→ More replies (8)4
Aug 30 '24
As long as pointers can point to pointers, it's a form of halting problems and thus can never be solved efficiently.
1
1
u/Money-Newspaper-2619 Sep 23 '24
C folks didn't even know rust does not use inheritance.
And these are some of the brightest minds. It tells they have not even bothered to do a rust 101 and have already made their mind. It's maybe 1 week of their time to understand the basics and then have a more rationale argument.
1
u/knobbyknee Aug 30 '24
This is an example of reaction to change in any field, be it cooking with gas instead of firewood or using relativity instead of Newtonian physics.
A number of the incumbents see it as a threat to the status quo. They fear that it may change their social standing, make their work obsolete, make them obsolete, make their work harder, make them learn stuff that they may not be able to learn, make them move out of thir comfort zone.
The only remedy is to slowly and patiently work on the change. Most people will eventually come around to the change, while there are a few holdouts who will either leave or die off.
6
u/Sevni Aug 30 '24
This is a really political, very general and a bad analysis of the situation even from the little reading I had. There is no change or revolution here, everything stays in place you are just adding a new language on top that needs to be synced with everything else. You are creating more work not removing work. There are valid criticisms to be had here, this is not it chief.
1
u/knobbyknee Aug 30 '24
So you are saying that Linux developers are not behaving like normal people in the face of change? Don't you consider the addition of Rust to the kernel to be a rather disruptive change, given that essentially all the kernel is written in C? My analysis isn't political, it is behavioural. This is (statistically speaking) what humans do in the face of change.
→ More replies (1)2
u/Awyls Aug 30 '24
Alternatively, they will be pushed away to keep the status quo which is what seems to be happening (and most likely outcome).
1
u/knobbyknee Aug 30 '24
No, the change is inevitable. Efforts like this just delays it a bit. Relativity got adopted despite the pushbacks.
1
u/WhatIsThisSevenNow Aug 30 '24
It is absolutely amazing how much "nontechnical nonsense" there is in the day-to-day life of a software developer. Things they NEVER teach you of in college.
-2
u/qoning Aug 30 '24
What's with all the snowflaking in the comments here? Discussions sometimes get heated, people use strong words for strongly held opinions, disagreement leads to confrontation and confrontation leads to eventual resolution.
3
u/vlakreeh Aug 30 '24
That's hardly a productive way to do things, and if every conversation you deal with when trying to upstream something is met by excessive bike shedding (or calling a language a "religion" like one of the audience members) by people either resistant to change or calling you a "M$ Trojan" it's pretty understandable that someone would get burnt out. Not everyone that doesn't want to deal with some kernel developers acting like teenagers is a "snowflake".
-1
0
u/MaleficentFig7578 Aug 30 '24
Read: I felt the whole kernel must go the Rust way or the highway. The whole kernel wouldn't go the Rust way, so I took the highway!
5
u/Botahamec Aug 31 '24
It's quite the opposite actually. A C developer wanted the entire kernel to be C and harassed this presenter to the point where he quit.
→ More replies (39)
-57
u/JigglyWiggly_ Aug 29 '24
Hardly surprised, rust devs have a tendency to keep talking about stuff nobody cares about.
At my company they keep putting the language above what the product is supposed to actually do.
27
u/Ghosty141 Aug 29 '24
What?
rust devs have a tendency to keep talking about stuff nobody cares about.
Maybe the ones you've met do so but I find it a bit troubling generalizing this to all rust developers. The same thing can be said about any new technology ever.
Apart from that, the problem in the linux kernel is not that, it's about a misunderstanding of what rust in the kernel tries to do. If you watch the youtube link in the article you can hear that, people constantly bring up strawman arguments that lead to these endless discussions and I can understand the maintainer not wanting to keep up with that bs anymore.
19
u/ps1horror Aug 29 '24
Human beings have a tendency to generalise entire groups of people based on a couple of examples from their own life.... one of those humans being you!
6
u/Efficient-Chair6250 Aug 29 '24
"Non-technical Nonsense" was directed at C devs, not Rust devs. The title is misleading imo.
13
u/Dankbeast-Paarl Aug 29 '24
rust devs have a tendency to keep talking about stuff nobody cares about
Right?! Those silly Rust developers. With their memory safety concerns /s
336
u/bik1230 Aug 29 '24
Everyone should watch the video clip that the maintainer in question posted for context: https://youtu.be/WiPp9YEBV0Q?t=1529