Re: Rust kernel policy
From: Jason Gunthorpe
Date: Thu Feb 20 2025 - 11:17:10 EST
On Wed, Feb 19, 2025 at 04:07:40PM -0500, Steven Rostedt wrote:
> On Wed, 19 Feb 2025 12:52:14 -0800
> Bart Van Assche <bvanassche@xxxxxxx> wrote:
>
> > On 2/19/25 12:46 PM, Steven Rostedt wrote:
> > > I do feel that new drivers written in Rust would help with the
> > > vulnerabilities that new drivers usually add to the kernel.
> >
> > For driver developers it is easier to learn C than to learn Rust. I'm
> > not sure that all driver developers, especially the "drive by"
> > developers, have the skills to learn Rust.
>
> That's a short term problem.
>
> But it's not like we are going to ban C from all new drivers. But as Rust
> becomes more popular, we should at the very least make it easy to support
> Rust drivers.
If we had infinite resources sure, but the whole argument here is ROI
and you often here vauge assertions that it is worth it.
What I was asking for is some actual data - how many new drivers merge
per cycle, which subsystems. What is the actual impact that we could
see under this "new drivers only" idea.
Personally I think new drivers only is not sustainable. I think there
will be endless arguments about converting existing code to Rust for
various reasons. I really have a big fear about Chritoph's point "with
no clear guidelines what language is to be used for where". We already
have so many barriers to contribution. Random demands to "rewrite X in
Rust" is going to be just a joy. :(
Jason