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: <D797D35C-C1ED-4AD5-8779-C3F3E0D6BC6E@nvidia.com>
Date: Thu, 9 Oct 2025 15:41:13 +0000
From: Joel Fernandes <joelagnelf@...dia.com>
To: Alexandre Courbot <acourbot@...dia.com>, Danilo Krummrich
	<dakr@...nel.org>, Yury Norov <yury.norov@...il.com>, Jesung Yang
	<y.j3ms.n@...il.com>, 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>
CC: "nouveau@...ts.freedesktop.org" <nouveau@...ts.freedesktop.org>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
	"rust-for-linux@...r.kernel.org" <rust-for-linux@...r.kernel.org>, Edwin Peer
	<epeer@...dia.com>
Subject: Re: [PATCH RFC v2 1/3] gpu: nova-core: register: use field type for
 Into implementation



> On Oct 9, 2025, at 11:17 AM, Joel Fernandes <joelagnelf@...dia.com> wrote:
> 
> Hi Alex,
> 
>> On 10/9/2025 8:37 AM, Alexandre Courbot wrote:
>> The getter method of a field works with the field type, but its setter
>> expects the type of the register. This leads to an asymmetry in the
>> From/Into implementations required for a field with a dedicated type.
>> For instance, a field declared as
>> 
>>    pub struct ControlReg(u32) {
>>        3:0 mode as u8 ?=> Mode;
>>        ...
>>    }
>> 
>> currently requires the following implementations:
>> 
>>    impl TryFrom<u8> for Mode {
>>      ...
>>    }
>> 
>>    impl From<Mode> for u32 {
>>      ...
>>    }
>> 
>> Change this so the `From<Mode>` now needs to be implemented for `u8`,
>> i.e. the primitive type of the field. This is more consistent, and will
>> become a requirement once we start using the TryFrom/Into derive macros
>> to implement these automatically.
>> 
>> Reported-by: Edwin Peer <epeer@...dia.com>
>> Signed-off-by: Alexandre Courbot <acourbot@...dia.com>
> 
> As these are incremental improvements, could you please rebase on top of the v6
> bitfield series so it does not conflict?
> 
> https://git.kernel.org/pub/scm/linux/kernel/git/jfern/linux.git/log/?h=nova.dev.bitfield.submitted.v6

On second thought, I could just carry this patch on top of my v6 series and avoid too much conflict.

So if it is ok with you, please only carry the last 2 patches of this series whenever applying.

For this patch:
Reviewed-by: Joel Fernandes <joelagnelf@...dia.com>

I will review the other two patches as well. Thanks.


> 
> Thanks.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ