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] [thread-next>] [day] [month] [year] [list]
Message-ID: <35c2d37d02409be8fea5acd713832da938966c43.camel@nvidia.com>
Date: Thu, 30 Oct 2025 01:44:28 +0000
From: Timur Tabi <ttabi@...dia.com>
To: "dakr@...nel.org" <dakr@...nel.org>, John Hubbard <jhubbard@...dia.com>
CC: "lossin@...nel.org" <lossin@...nel.org>, "a.hindborg@...nel.org"
	<a.hindborg@...nel.org>, "boqun.feng@...il.com" <boqun.feng@...il.com>, Zhi
 Wang <zhiw@...dia.com>, "simona@...ll.ch" <simona@...ll.ch>,
	"tmgross@...ch.edu" <tmgross@...ch.edu>, "alex.gaynor@...il.com"
	<alex.gaynor@...il.com>, "linux-kernel@...r.kernel.org"
	<linux-kernel@...r.kernel.org>, "ojeda@...nel.org" <ojeda@...nel.org>,
	"nouveau@...ts.freedesktop.org" <nouveau@...ts.freedesktop.org>,
	"rust-for-linux@...r.kernel.org" <rust-for-linux@...r.kernel.org>,
	"bjorn3_gh@...tonmail.com" <bjorn3_gh@...tonmail.com>, Edwin Peer
	<epeer@...dia.com>, "airlied@...il.com" <airlied@...il.com>,
	"aliceryhl@...gle.com" <aliceryhl@...gle.com>, "bhelgaas@...gle.com"
	<bhelgaas@...gle.com>, Joel Fernandes <joelagnelf@...dia.com>, Alexandre
 Courbot <acourbot@...dia.com>, "gary@...yguo.net" <gary@...yguo.net>,
	Alistair Popple <apopple@...dia.com>
Subject: Re: [PATCH v3 2/2] gpu: nova-core: add boot42 support for next-gen
 GPUs

On Wed, 2025-10-29 at 18:07 -0700, John Hubbard wrote:
> Yes, but someone can still plug in a pre-Turing GPU and try to
> boot up with nova-core.ko on the system.
> 
> So it's important to avoid getting into trouble in that case.

Sure, but I think we don't want any real code that looks at boot0.  Nova should really just look
at boot42 to determine any architecture.  So what we really want is to avoid accidentally
reading boot42 on GPUs where it doesn't exist.  I believe that the oldest GPU that supports
boot42 is Fermi GF100, or chipset id 0x0c0.  So we can do something like this:

fn is_gpu_ancient(bar: &Bar0) -> bool {
    let boot0 = regs::NV_PMC_BOOT_0::read(bar);

    if boot0.architecture_1() == 0 && boot0.architecture_0() < 0x0c0 {
        return true;
    } else {
        return false;
}

At the beginning of probe(), if is_gpu_ancient() returns true, just exit immediately.  Then the
rest of the driver can happily ignore boot0 completely and use boot42 for everything.

Just my two cents.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ