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: <DDT3P1OF2JD9.2PS7PL80L5KWQ@nvidia.com>
Date: Mon, 27 Oct 2025 21:24:34 +0900
From: "Alexandre Courbot" <acourbot@...dia.com>
To: "Danilo Krummrich" <dakr@...nel.org>, "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>, "Nouveau"
 <nouveau-bounces@...ts.freedesktop.org>
Subject: Re: [PATCH 0/7] gpu: nova-core: remove use of `as` for integer
 conversions

On Mon Oct 27, 2025 at 12:35 AM JST, Danilo Krummrich wrote:
> 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.

Great!

>> 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.

Moving to the kernel crate sounds good to me, but this work has been
initiated from the Nova GSP boot series and is now a dependency of it -
so taking it through another tree than `drm-rust` would delay the GSP
boot some more.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ