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: <2f03e11d-3621-4314-a232-611a5fd9ffcb@nvidia.com>
Date: Tue, 3 Jun 2025 09:47:52 -0400
From: Joel Fernandes <joelagnelf@...dia.com>
To: Alexandre Courbot <acourbot@...dia.com>,
 Danilo Krummrich <dakr@...nel.org>
Cc: 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>, David Airlie <airlied@...il.com>,
 Simona Vetter <simona@...ll.ch>,
 Maarten Lankhorst <maarten.lankhorst@...ux.intel.com>,
 Maxime Ripard <mripard@...nel.org>, Thomas Zimmermann <tzimmermann@...e.de>,
 John Hubbard <jhubbard@...dia.com>, Ben Skeggs <bskeggs@...dia.com>,
 Timur Tabi <ttabi@...dia.com>, Alistair Popple <apopple@...dia.com>,
 linux-kernel@...r.kernel.org, rust-for-linux@...r.kernel.org,
 nouveau@...ts.freedesktop.org, dri-devel@...ts.freedesktop.org,
 Shirish Baskaran <sbaskaran@...dia.com>
Subject: Re: [PATCH v4 16/20] nova-core: Add support for VBIOS ucode
 extraction for boot



On 6/3/2025 4:12 AM, Alexandre Courbot wrote:
> On Tue Jun 3, 2025 at 12:15 AM JST, Joel Fernandes wrote:
>> On Mon, Jun 02, 2025 at 03:33:56PM +0200, Danilo Krummrich wrote:
>>> On Wed, May 21, 2025 at 03:45:11PM +0900, Alexandre Courbot wrote:
>>>> +impl Vbios {
>>>
>>> <snip>
>>>
>>>> +    pub(crate) fn fwsec_header(&self, pdev: &device::Device) -> Result<&FalconUCodeDescV3> {
>>>> +        self.fwsec_image.fwsec_header(pdev)
>>>> +    }
>>>> +
>>>> +    pub(crate) fn fwsec_ucode(&self, pdev: &device::Device) -> Result<&[u8]> {
>>>> +        self.fwsec_image.fwsec_ucode(pdev, self.fwsec_header(pdev)?)
>>>> +    }
>>>> +
>>>> +    pub(crate) fn fwsec_sigs(&self, pdev: &device::Device) -> Result<&[u8]> {
>>>> +        self.fwsec_image.fwsec_sigs(pdev, self.fwsec_header(pdev)?)
>>>> +    }
>>>
>>> Can't we just implement Deref here? Why do we need this indirection?
>>
>> We could, but it seems weird to deref a Vbios struct to an FwsecBiosImage
>> struct. Conceptually a Vbios is a collection of things and it could have
>> future extensions to its struct.
> 
> Would it then make sense to make `FwSecBiosImage` public, add an `fn
> fwsec_image(&self) -> &FwSecBiosImage` method and have the caller call
> its methods directly (maybe renamed to `header`, `ucode` and `sigs`)?

Yeah, that seems better. Danilo, you're good with that idea too?

If yes, I can just do it that way (with suggestion attribution to Alex).

Thanks.



Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ