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: <DDJA432ZT4VN.1OR5IBE322IAC@nvidia.com>
Date: Thu, 16 Oct 2025 08:19:40 +0900
From: "Alexandre Courbot" <acourbot@...dia.com>
To: "Joel Fernandes" <joelagnelf@...dia.com>,
 <linux-kernel@...r.kernel.org>, <rust-for-linux@...r.kernel.org>,
 <dri-devel@...ts.freedesktop.org>, <dakr@...nel.org>, <acourbot@...dia.com>
Cc: "Alistair Popple" <apopple@...dia.com>, "Miguel Ojeda"
 <ojeda@...nel.org>, "Alex Gaynor" <alex.gaynor@...il.com>, "Boqun Feng"
 <boqun.feng@...il.com>, "Gary Guo" <gary@...yguo.net>,
 <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>, "John Hubbard"
 <jhubbard@...dia.com>, "Timur Tabi" <ttabi@...dia.com>,
 <joel@...lfernandes.org>, "Daniel Almeida" <daniel.almeida@...labora.com>,
 <nouveau@...ts.freedesktop.org>
Subject: Re: [PATCH v2] nova-core: vbios: Rework BiosImage to be simpler

On Thu Oct 9, 2025 at 9:47 AM JST, Joel Fernandes wrote:
> Currently, the BiosImage type in vbios code is implemented as a
> type-wrapping enum with the sole purpose of implementing a type that is
> common to all specific image types. To make this work, macros were used
> to overcome limitations of using enums. Ugly match statements were also
> required to route methods from the enum type to the specific image type.
>
> Simplify the code by just creating the common BiosImage type in the
> iterator, and then converting it to specific image type after. This
> works well since all the methods common to different BiosImage are
> called only during the iteration and not later. Should we need to call
> these common methods later, we can use AsRef and traits, but for now not
> doing so gives us a nice ~50 negative line delta versus the existing code
> and is a lot simpler.
>
> Also remove the now obsolete BiosImage enum type.
>
> Cc: Benno Lossin <lossin@...nel.org>
> Signed-off-by: Joel Fernandes <joelagnelf@...dia.com>

Pushed to drm-rust-next! Thank you.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ