[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <2025053148-gore-badass-1d1d@gregkh>
Date: Sat, 31 May 2025 07:45:13 +0200
From: Greg KH <gregkh@...uxfoundation.org>
To: Timur Tabi <timur@...nel.org>
Cc: Alexandre Courbot <acourbot@...dia.com>,
Danilo Krummrich <dakr@...nel.org>,
John Hubbard <jhubbard@...dia.com>, Miguel Ojeda <ojeda@...nel.org>,
Alex Gaynor <alex.gaynor@...il.com>,
Boqun Feng <boqun.feng@...il.com>, Gary Guo <gary@...yguo.net>,
Björn Roy Baron <bjorn3_gh@...tonmail.com>,
Benno Lossin <benno.lossin@...ton.me>,
Andreas Hindborg <a.hindborg@...nel.org>,
Alice Ryhl <aliceryhl@...gle.com>, Trevor Gross <tmgross@...ch.edu>,
linux-kernel@...r.kernel.org, rust-for-linux@...r.kernel.org
Subject: Re: [PATCH] rust: add basic ELF sections parser
On Fri, May 30, 2025 at 01:10:50PM -0500, Timur Tabi wrote:
> On Fri, May 30, 2025 at 10:42 AM Greg KH <gregkh@...uxfoundation.org> wrote:
> >
> > On Fri, May 30, 2025 at 11:34:02PM +0900, Alexandre Courbot wrote:
> > > So to try to answer your question, I am not disagreeing that userspace
> > > is capable of doing what we currently do in the kernel. My follow-up
> > > questions to that are: how do we command userspace to do that work for
> > > us when we request the firmware, how do we provide the result to the
> > > kernel, and is this something that distros can adopt easily? I'm happy
> > > to consider doing things this way, but would need a few pointers to look
> > > into.
> >
> > Again, look at how your firmware for your devices in your laptop are
> > loaded today.
Note, I am talking about non-gpu firmare images here (wifi, usb
controllers, etc.) that are using the firmware download subsystem for
ages as examples of what to look at as to how to trigger a firmware
image to be loaded by userspace into the device.
> Today, Nouveau loads and parses these binary images (that are already
> in linux-firmware) in the driver. As I said before, Nova/Nouveau are
> using ELF simply as a packaging format, so that these small binary
> blobs are kept together and processed as one. It makes no sense for
> Nouveau to consume them as-is, but Nova has to have user-space break
> them up first.
>
> We could easily have said that the format is proprietary and not used
> the word "elf" in the parser.
And even if you did that, I would say "do it in userspace as firmware
images should be pass-through only".
> IMHO, Nova should really do what Nouveau does, and just have the image
> parser in the driver itself, without any generic Rust code to do it.
> After all, what Nova needs to do with these images is driver-specific.
Again, no, do not do any firmware image parsing in the kernel please
unless you can prove exactly why it MUST be done there.
thanks,
greg k-h
Powered by blists - more mailing lists