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: <c64447d9-3e9f-40d4-944c-327f3f7e26ba@kernel.org>
Date: Sun, 26 Oct 2025 16:35:52 +0100
From: Danilo Krummrich <dakr@...nel.org>
To: Alexandre Courbot <acourbot@...dia.com>
Cc: Alice Ryhl <aliceryhl@...gle.com>, David Airlie <airlied@...il.com>,
 Simona Vetter <simona@...ll.ch>, 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>, Trevor Gross <tmgross@...ch.edu>,
 John Hubbard <jhubbard@...dia.com>, Alistair Popple <apopple@...dia.com>,
 Joel Fernandes <joelagnelf@...dia.com>, Timur Tabi <ttabi@...dia.com>,
 Edwin Peer <epeer@...dia.com>, nouveau@...ts.freedesktop.org,
 dri-devel@...ts.freedesktop.org, linux-kernel@...r.kernel.org,
 rust-for-linux@...r.kernel.org
Subject: Re: [PATCH 0/7] gpu: nova-core: remove use of `as` for integer
 conversions

On 10/26/25 3:39 PM, Alexandre Courbot wrote:
> This patchset tries to eradicate the use of `as` in nova-core, by using
> existing means and introducing new ones.

Thanks a lot for working on this cleanup!
> The first 4 patches use the already-available `From` and `TryFrom` trait
> where it is possible or advisable.
> 
> The fifth patch introduces a new module that proposes conversion
> functions for those that are infallible under the current build target.
> This is done through a set of const functions, and the `FromAs` and
> `IntoAs` extension traits which, as their names lightly suggest, offer
> conversion for those types on which the `as` operator can be used
> losslessly.
> 
> This new module is put to use in the sixth patch.
> 
> The idea was first suggested by Danilo, and I hope I captured it
> properly. :)

Yes, this is what I thought of.
> As Danilo suggested, this could eventually find its place in the kernel
> crate if the implementation is deemed to be fit, but for now let's
> review and let it mature in nova-core.

Yeah, I think this approach makes sense. Though, I think we want to move this to
the kernel crate sooner than later, it's definitely something we want for core
code and other drivers as well.

Depending on the initial feedback, it might even make sense to do it right away.

I won't have time for a thorough review, but at a first glance the patches all
look good!

Acked-by: Danilo Krummrich <dakr@...nel.org>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ