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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <DC8Z2MLOJN7D.3IOSY6SJ7DPVD@kernel.org>
Date: Fri, 22 Aug 2025 14:57:55 +0200
From: "Danilo Krummrich" <dakr@...nel.org>
To: "Alexandre Courbot" <acourbot@...dia.com>
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" <lossin@...nel.org>, "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>,
 <rust-for-linux@...r.kernel.org>, <linux-kernel@...r.kernel.org>,
 <nouveau@...ts.freedesktop.org>, <dri-devel@...ts.freedesktop.org>
Subject: Re: [PATCH 5/5] gpu: nova-core: firmware: process and prepare the
 GSP firmware

Hi Alex,

not a full review yet, but a few ad-hoc comments from skimming over it.

On Fri Aug 22, 2025 at 2:47 PM CEST, Alexandre Courbot wrote:
> +/// A device-mapped firmware with a set of (also device-mapped) pages tables mapping the firmware
> +/// to the start of their own address space.
> +pub(crate) struct GspFirmware {
> +    /// The GSP firmware inside a [`VVec`], device-mapped via a SG table.
> +    #[expect(unused)]

Do we expect this to change? Otherwise, just prefix the field name with an
underscore.

> +    fw: Pin<KBox<SGTable<Owned<VVec<u8>>>>>,
> +    /// The level 2 page table, mapping [`Self::fw`] at its beginning.
> +    #[expect(unused)]
> +    lvl2: Pin<KBox<SGTable<Owned<VVec<u8>>>>>,
> +    /// The level 1 page table, mapping [`Self::lvl2`] at its beginning.
> +    #[expect(unused)]
> +    lvl1: Pin<KBox<SGTable<Owned<VVec<u8>>>>>,

Instead of creating three allocations, just make struct GspFirmware pin_data by
itself. This should even propagate down to struct Gpu, which is pin_data.

So everything can be in one single allocation.

> +    /// The level 0 page table, mapping [`Self::lvl1`] at its beginning.
> +    lvl0: DmaObject,
> +    /// Size in bytes of the firmware contained in [`Self::fw`].
> +    #[expect(unused)]
> +    pub size: usize,
> +}

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ