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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-Id: <DEJIUDQ3ZGPA.2UIPTGU4WT7RW@nvidia.com>
Date: Thu, 27 Nov 2025 22:46:08 +0900
From: "Alexandre Courbot" <acourbot@...dia.com>
To: "Joel Fernandes" <joelagnelf@...dia.com>, "John Hubbard"
 <jhubbard@...dia.com>, "Alexandre Courbot" <acourbot@...dia.com>
Cc: "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
 "rust-for-linux@...r.kernel.org" <rust-for-linux@...r.kernel.org>,
 "dri-devel@...ts.freedesktop.org" <dri-devel@...ts.freedesktop.org>,
 "dakr@...nel.org" <dakr@...nel.org>, "airlied@...il.com"
 <airlied@...il.com>, "Alistair Popple" <apopple@...dia.com>,
 "ojeda@...nel.org" <ojeda@...nel.org>, "alex.gaynor@...il.com"
 <alex.gaynor@...il.com>, "boqun.feng@...il.com" <boqun.feng@...il.com>,
 "gary@...yguo.net" <gary@...yguo.net>, "bjorn3_gh@...tonmail.com"
 <bjorn3_gh@...tonmail.com>, "lossin@...nel.org" <lossin@...nel.org>,
 "a.hindborg@...nel.org" <a.hindborg@...nel.org>, "aliceryhl@...gle.com"
 <aliceryhl@...gle.com>, "tmgross@...ch.edu" <tmgross@...ch.edu>,
 "simona@...ll.ch" <simona@...ll.ch>, "maarten.lankhorst@...ux.intel.com"
 <maarten.lankhorst@...ux.intel.com>, "mripard@...nel.org"
 <mripard@...nel.org>, "tzimmermann@...e.de" <tzimmermann@...e.de>, "Timur
 Tabi" <ttabi@...dia.com>, "joel@...lfernandes.org"
 <joel@...lfernandes.org>, "elle@...thered-steel.dev"
 <elle@...thered-steel.dev>, "daniel.almeida@...labora.com"
 <daniel.almeida@...labora.com>, "Andrea Righi" <arighi@...dia.com>,
 "phasta@...nel.org" <phasta@...nel.org>, "nouveau@...ts.freedesktop.org"
 <nouveau@...ts.freedesktop.org>, "Nouveau"
 <nouveau-bounces@...ts.freedesktop.org>
Subject: Re: [PATCH v2 1/3] rust: helpers: Add list helpers for C linked
 list operations

On Thu Nov 27, 2025 at 2:10 PM JST, Joel Fernandes wrote:
>
>
> On 11/26/2025 3:57 PM, John Hubbard wrote:
>>  
>>> I am torn on this. On the one hand, if someone changes how list_head api works, then the rust side breaks 
>> OK, this is not going to happen, at list not without a truly epic, long-term
>> effort, accompanied by *lots* of publicity. The list_head API is just too
>> foundational to change easily.
>> 
>> It's been stable since *at least* 2006. The only change since then has been
>> to add WRITE_ONCE() wrappers to the INIT_LIST_HEAD implementation--and that
>> is not an API change.
>> 
>> Anything is possible, but this is sufficiently far out there that it should
>> not count for much here.
>> 
>> (though that is easy to flag though via doc tests). On the other hand, we have the function call overhead you pointed and we are dealing with the pointers in rust directly anyway in some cases.
>> 
>> Whereas this is very significant! We really, really do not want to accept
>> a performance loss vs. C, without an excellent justification.
>> 
>> So I think you've made the right decision. The above is just to help
>> solidify the reasons why.
>
> Yeah, these are good points. Thanks John.

There is also at least one precedent: the Rust `page_align()` does not
call a C helper that wraps `PAGE_ALIGN()`, it just reimplements it. I
think `list_head` is a quite similar situation, but ultimately that's
for the core team to say.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ