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: <f85c4bb9-2fb0-4dfc-9a07-992762df0822@nvidia.com>
Date: Fri, 23 Jan 2026 17:42:01 -0800
From: John Hubbard <jhubbard@...dia.com>
To: Gary Guo <gary@...yguo.net>, Danilo Krummrich <dakr@...nel.org>
Cc: Alexandre Courbot <acourbot@...dia.com>,
 Joel Fernandes <joelagnelf@...dia.com>, Timur Tabi <ttabi@...dia.com>,
 Alistair Popple <apopple@...dia.com>, Edwin Peer <epeer@...dia.com>,
 Zhi Wang <zhiw@...dia.com>, David Airlie <airlied@...il.com>,
 Simona Vetter <simona@...ll.ch>, Bjorn Helgaas <bhelgaas@...gle.com>,
 Miguel Ojeda <ojeda@...nel.org>, Alex Gaynor <alex.gaynor@...il.com>,
 Boqun Feng <boqun.feng@...il.com>, Björn Roy Baron
 <bjorn3_gh@...tonmail.com>, Benno Lossin <lossin@...nel.org>,
 Andreas Hindborg <a.hindborg@...nel.org>, Alice Ryhl <aliceryhl@...gle.com>,
 Trevor Gross <tmgross@...ch.edu>, nouveau@...ts.freedesktop.org,
 rust-for-linux@...r.kernel.org, LKML <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH 29/31] gpu: nova-core: Hopper/Blackwell: add FSP Chain of
 Trust boot path

On 1/23/26 5:38 PM, John Hubbard wrote:
> On 1/21/26 8:35 AM, Gary Guo wrote:
>> On Wed Dec 3, 2025 at 5:59 AM GMT, John Hubbard wrote:
> ...
>>> +        // SAFETY: fmc_full is a valid DmaObject with a contiguous allocation of size() bytes
>>> +        // starting at start_ptr(). The slice is only used for signature extraction within this
>>> +        // function scope while fsp_fw remains valid.
>>> +        let fmc_full_data = unsafe {
>>> +            core::slice::from_raw_parts(fsp_fw.fmc_full.start_ptr(), fsp_fw.fmc_full.size())
>>> +        };
>>
>> The justification is week because it does not mention about the non-race nature
>> of this, which need to be justified for a DMA allocation. If you use
>> `CoherentAllocation::as_slice`, then this requirement would be obvious.
>>
>> For example:
>>
>>     // SAFETY: the dma buffer is not yet submitted too hardware and we are the
>>     // unique owner at this point.
>>     let fmc_full_data = unsafe { fsp_fw.fmc_full.as_slice(0, fsp_fw.fmc_full.size()) };
>  
> I see. OK, after a lot of fussing over the wording, I'm have come up
> with this, which might be much too wordy? I'm not sure.
> 
>     // SAFETY: fmc_full, which contains the complete FMC ELF file, is never submitted to
>     // hardware, so it is safe from hardware-software races. And we are the unique owner of
>     // fsp_fw (and therefore of fsp_fw.fmc_full). (A separate buffer, fsp_fw.fmc_image, is what
>     // gets submitted to the hardware).
>  
> 

Oh, forget to mention that I also changed it to use .as_slice(), so:

     // SAFETY: fmc_full, which contains the complete FMC ELF file, is never submitted to
     // hardware, so it is safe from hardware-software races. And we are the unique owner of
     // fsp_fw (and therefore of fsp_fw.fmc_full). (A separate buffer, fsp_fw.fmc_image, is what
     // gets submitted to the hardware).
     let fmc_full_data = unsafe { fsp_fw.fmc_full.as_slice(0, fsp_fw.fmc_full.size())? };


thanks,
-- 
John Hubbard


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ