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: <1a55b7ec-bc06-495b-8f94-92ff34b3353d@nvidia.com>
Date: Mon, 29 Sep 2025 15:47:35 -0400
From: Joel Fernandes <joelagnelf@...dia.com>
To: Alexandre Courbot <acourbot@...dia.com>, linux-kernel@...r.kernel.org,
 rust-for-linux@...r.kernel.org, dri-devel@...ts.freedesktop.org,
 dakr@...nel.org
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, Elle Rhumsaa <elle@...thered-steel.dev>,
 Yury Norov <yury.norov@...il.com>,
 Daniel Almeida <daniel.almeida@...labora.com>, nouveau@...ts.freedesktop.org
Subject: Re: [PATCH v4 2/6] nova-core: bitfield: Add support for different
 storage widths



On 9/29/2025 8:22 AM, Alexandre Courbot wrote:
> On Sun Sep 21, 2025 at 3:22 AM JST, Joel Fernandes wrote:
>> Previously, bitfields were hardcoded to use u32 as the underlying
>> storage type.  Add support for different storage types (u8, u16, u32,
>> u64) to the bitfield macro.
>>
>> New syntax is: struct Name: <type ex., u32> { ... }
>>
>> Reviewed-by: Elle Rhumsaa <elle@...thered-steel.dev>
>> Signed-off-by: Joel Fernandes <joelagnelf@...dia.com>
>> ---
>>  drivers/gpu/nova-core/bitfield.rs    | 71 +++++++++++++++++-----------
>>  drivers/gpu/nova-core/regs/macros.rs | 16 +++----
>>  2 files changed, 52 insertions(+), 35 deletions(-)
>>
>> diff --git a/drivers/gpu/nova-core/bitfield.rs b/drivers/gpu/nova-core/bitfield.rs
>> index ba6b7caa05d9..687ef234be75 100644
>> --- a/drivers/gpu/nova-core/bitfield.rs
>> +++ b/drivers/gpu/nova-core/bitfield.rs
>> @@ -51,7 +51,7 @@
>>  //! }
>>  //!
>>  //! bitfield! {
>> -//!     struct ControlReg {
>> +//!     struct ControlReg: u32 {
> 
> Haven't we agreed in [1] to align the type definition syntax to that of
> an actual Rust struct? E.g. `struct ControlReg(u32)`?
> 
> [1] https://lore.kernel.org/all/3814d6b7-7551-4e8c-b78a-4ac6236eb406@nvidia.com/

Sorry this slipped (conference travel and all :P). I will make the change this
time. Btw v5 also has other changes in addition to this, your review is much
appreciated :)

 - Joel


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ