Live data from Hacker News

The state of the kernel Rust experiment

lwn.net

1–10 of 148 posts

Re: The state of the kernel Rust experiment

#2
From the comment section:

> To me the more salient questions are how long before (a) we get Rust in a core subsystem (thus making Rust truly _required_ instead of "optional unless you have hardware foo"), and (b) requiring Rust for _all_ new code.

Previously, the position was that C developers would not be forced to learn Rust.

And a few days ago a security vulnerability was found in the Rust Linux kernel code.

https://news.ycombinator.com/item?id=46309536

Re: The state of the kernel Rust experiment

#3

From the comment section: > To me the more salient questions are how long before (a) we get Rust in a core subsystem (thus making Rust truly _required_ instead of "optional unless you have hardware foo"), and (b) requiring Rust for _all_ new code. Previously, the position was that C developers would not be forced to learn Rust. And a few days ago a security vulnerability was found in the Rust Linux kernel code. https…

Where did anyone promise that the Rust bits will never have security issues? That CVE was a fantastic demonstration of just how much better the situation is in Rust code and I don't think there's a realistic argument that the experiment has been anything other than successful.

Re: The state of the kernel Rust experiment

#4

From the comment section: > To me the more salient questions are how long before (a) we get Rust in a core subsystem (thus making Rust truly _required_ instead of "optional unless you have hardware foo"), and (b) requiring Rust for _all_ new code. Previously, the position was that C developers would not be forced to learn Rust. And a few days ago a security vulnerability was found in the Rust Linux kernel code. https…

> And a few days ago a security vulnerability was found in the Rust Linux kernel code.

was it a security vulnerability? I'm pretty sure it was "just" a crash. Though maybe someone smarter than me could have turned that into something more.

I have no dog in this race, I really like the idea of Rust drivers but can very much understand retiscience at getting Rust to be handling more core parts of the kernel, just because Rust's value seems to pay off way more in higher level code where you have these invariants to maintain across large code paths (meanwhile writing a bunch of doubly-linked lists in unsafe Rust seems a bit like busy work, modulo the niceties Rust itself can give you)

Re: The state of the kernel Rust experiment

#5
Once again, congrats to the R4L team! It's a big milestone and I'm looking forwards to future developments!.

There was a lot of interesting discussion on the previous post [0], but one thing I didn't see was much discussion about this bit:

> The DRM (graphics) subsystem has been an early adopter of the Rust language. It was still perhaps surprising, though, when Airlie (the DRM maintainer) said that the subsystem is only "about a year away" from disallowing new drivers written in C and requiring the use of Rust.

I was a bit surprised when I first read this. Is this meant to be read in a way that is more just a description of the state of Rust bindings (e.g., the DRM subsystem is about a year away from being able to require the use of Rust, but isn't actually planning on doing so), or it is describing actual plans (e.g., the DRM subsystem is about a year away from actually requiring the use of Rust)? I was originally more inclined to go for the former interpretation, but this other bit:

> With regard to adding core-kernel dependencies on Rust code, Airlie said that it shouldn't happen for another year or two.

Makes me think that perhaps the devs are actually considering the latter. Is anyone more in-the-know able to comment on this?

[0]: https://news.ycombinator.com/item?id=46213585

Re: The state of the kernel Rust experiment

#6

Once again, congrats to the R4L team! It's a big milestone and I'm looking forwards to future developments!. There was a lot of interesting discussion on the previous post [0], but one thing I didn't see was much discussion about this bit: > The DRM (graphics) subsystem has been an early adopter of the Rust language. It was still perhaps surprising, though, when Airlie (the DRM maintainer) said that the subsystem is…

I'm not more "in the know" but it makes sense that new drivers could require it. New drivers, after all, are pretty much always written for newer platforms that Rust has support for. The main issue with enabling Rust (let alone requiring it) is that Linux still supports platforms which Rust does not.

Re: The state of the kernel Rust experiment

#8

Once again, congrats to the R4L team! It's a big milestone and I'm looking forwards to future developments!. There was a lot of interesting discussion on the previous post [0], but one thing I didn't see was much discussion about this bit: > The DRM (graphics) subsystem has been an early adopter of the Rust language. It was still perhaps surprising, though, when Airlie (the DRM maintainer) said that the subsystem is…

Is DRM considered core kernel dependencies?

Re: The state of the kernel Rust experiment

#9
post #8

Once again, congrats to the R4L team! It's a big milestone and I'm looking forwards to future developments!. There was a lot of interesting discussion on the previous post [0], but one thing I didn't see was much discussion about this bit: > The DRM (graphics) subsystem has been an early adopter of the Rust language. It was still perhaps surprising, though, when Airlie (the DRM maintainer) said that the subsystem is…

Is DRM considered core kernel dependencies?

I don't know. My line of thinking is that if the Linux devs are comfortable with using Rust in core Linux then they might also be comfortable requiring Rust for new drivers as well. No idea if that makes sense, though.

Re: The state of the kernel Rust experiment

#10
Offtopic but this title makes me want to create an alternate-universe version of the HN front page where every title is shrill/spectacular/hysterical/urgent/clickbaity. Such as:

The Absolute State of the Kernel Rust Experiment Right Now

And every comment has its confidence/aggressiveness taken up to 11 (tho still within site rules).

Post reply on HN