Speaking more broadly, freely breaking stuff in large projects is dangerous, since fixing stuff may require a more specialized expertise and knowledge, e.g. being well-versed in Rust safety rules, knowing some obscure information about hardware behavior, or being aware about some tricky invariant which must be preserved by the code. This is why changes in API boundaries often require synchronization between different teams.
> There is a need for documentation and tutorials on how to write filesystem code in idiomatic Rust. He said that he has a lot to learn; he is willing to do that, but needs help on what to learn.
That's why sign-offs from reviewers are "required", no?
It seems the correct mentality to encourage people to do hack on the kernel, show that things are possible, they are "working on my machine", and then ... yeah, they will need to go through the usually length process of getting it merged.
But starting with "synchronization between different teams" usually gets shrugs and "let's get back to it soon"-s.
Sometimes this is just simple stuff, like adding a function argument, changing a type, or something like that.
"Break whatever" is a bit of a crude way of putting it, but yeah, it's definitely an advantage IMHO. Not just for the final patch, but also prototyping, experimenting, showing ideas, etc.
I think the Rust developers weren't even asking for that. They just want the C developers to sign up to some semantics. But the C developers know the function interface has evolved to be merely functional: it works, but with few invariants, riddled with caveats and few cross-function guarantees. It can't be hoisted into meaningful semantics, no less a type system, particularly across 10 filesystem API's.
Rust developers should focus on drivers in subsystems with stable API's, instead of trying to stabilize what decades of work has failed to.
Why not devote the time to writing a better memory safety tool for the Linux kernel (or C in general) rather than keep trying to force two disparate cultures and ideologies to meet in some fantasy middle?
ThePrimeagen actually had an interesting opinion on this recently too, worth a watch: https://www.youtube.com/watch?v=62oTu9hjxL4
It’s also not just about memory safety. Greg in particular has recognized how Rust’s type system will be helpful for preventing other kinds of bugs, for example.
But not in the Linux kernel. Any new effort will be greenfield, why rally around an entirely different programming language instead of writing a novel tool?
> Greg in particular has recognized how Rust’s type system will be helpful for preventing other kinds of bugs
Do you have any examples here?
Sure, it is still an experiment, but that's irrelevant: your theoretical "make C memory safe" tooling does not exist and does not exist in the kernel.
> instead of writing a novel tool?
Do you have a proposed design for the novel tool? Many have tried, nobody has succeeded.
> Do you have any examples here?
From the article:
> Kroah-Hartman said that it could eliminate entire classes of bugs in the kernel.
He's said similar things elsewhere: https://social.kernel.org/notice/AlxbVeMxyJNsLoNa6q
Kernel devs should just put on their big boy pants and go with the times. C is simply not the right tool for the job anymore for a lot/most kernel work.
I think this is the main technical change needed from the Linux kernel. It needs a layer of quasi-stable well documented subsystem APIs, which ideally would be "inherently safe" or at least have clear safe usage contracts. And it's fine for these interfaces to have relaxed stability guarantees in the early (pre-1.0, if you will) experimental stages. Changing them would involve more work and synchronization (C maintainers would not be able to quickly "refactor" these parts), but it's a familiar problem for many large projects.
It's the only reasonable point from the infamous tantrum by Ted Ts'o during the Rust for filesystems talk, everything else, to put it mildly, was a really disappointing behavior from a Linux subsystem maintainer.