lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <Z6m7MVErUPbkK9vV@pollux>
Date: Mon, 10 Feb 2025 09:39:13 +0100
From: Danilo Krummrich <dakr@...nel.org>
To: Greg KH <gregkh@...uxfoundation.org>
Cc: airlied@...il.com, simona@...ll.ch, corbet@....net,
	maarten.lankhorst@...ux.intel.com, mripard@...nel.org,
	tzimmermann@...e.de, ajanulgu@...hat.com, lyude@...hat.com,
	pstanner@...hat.com, zhiw@...dia.com, cjia@...dia.com,
	jhubbard@...dia.com, bskeggs@...dia.com, acurrid@...dia.com,
	ojeda@...nel.org, alex.gaynor@...il.com, boqun.feng@...il.com,
	gary@...yguo.net, bjorn3_gh@...tonmail.com, benno.lossin@...ton.me,
	a.hindborg@...nel.org, aliceryhl@...gle.com, tmgross@...ch.edu,
	dri-devel@...ts.freedesktop.org, linux-doc@...r.kernel.org,
	linux-kernel@...r.kernel.org, nouveau@...ts.freedesktop.org,
	rust-for-linux@...r.kernel.org
Subject: Re: [PATCH v3 1/2] gpu: nova-core: add initial driver stub

On Mon, Feb 10, 2025 at 07:24:59AM +0100, Greg KH wrote:
> On Sun, Feb 09, 2025 at 06:30:24PM +0100, Danilo Krummrich wrote:
> > +config NOVA_CORE
> > +	tristate "Nova Core GPU driver"
> > +	depends on PCI
> > +	depends on RUST
> > +	depends on RUST_FW_LOADER_ABSTRACTIONS
> > +	default n
> 
> Tiny nit, if you happen to respin this, "default n" is always the
> default, so there's never a need to specify it.

At some point we'll want to change that to 'default m', and I thought keeping it
explicit is probably a good reminder. But I'm also fine removing it.

> 
> > +impl Firmware {
> > +    fn new(dev: &device::Device, spec: &Spec, ver: &str) -> Result<Firmware> {
> > +        let mut chip_name = CString::try_from_fmt(fmt!("{}", spec.chipset))?;
> > +        chip_name.make_ascii_lowercase();
> > +
> > +        let request = |name_| {
> > +            CString::try_from_fmt(fmt!("nvidia/{}/gsp/{}-{}.bin", &*chip_name, name_, ver))
> 
> How does this match up with the MODULE_FIRMWARE() aliases that end up in
> a kernel module so that the tools know to add the firmware to the system
> in the proper place (i.e. initramfs or something like that)?
> 
> I always thought you needed to individually list the firmware files, or
> does the rust implementation now somehow handle that in a programatic
> way from strings like this?

That'd be nice, but the firmware we load is (or in general might be) only a
subset of the firmware that the module needs potentially.

So, you're right, all (potentially) required firmware files need to be listed in
the module!() macro's firmware field (or in this case within
module_pci_driver!()).

Back when I wrote this code we haven't had this field yet -- thanks for
reminding me of that.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ