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: <33553C18-F9CC-47A0-8049-3E4C1A745A84@collabora.com>
Date: Fri, 28 Nov 2025 15:20:40 -0300
From: Daniel Almeida <daniel.almeida@...labora.com>
To: John Hubbard <jhubbard@...dia.com>
Cc: Joel Fernandes <joelagnelf@...dia.com>,
 Alexandre Courbot <acourbot@...dia.com>,
 "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>,
 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 26 Nov 2025, at 17:57, John Hubbard <jhubbard@...dia.com> wrote:
> 
> On 11/26/25 10:50 AM, Joel Fernandes wrote:
>>> On Nov 25, 2025, at 8:16 PM, Alexandre Courbot <acourbot@...dia.com> wrote:
>>> On Wed Nov 26, 2025 at 3:16 AM JST, Joel Fernandes wrote:
>>>>>> On Nov 25, 2025, at 9:52 AM, Alexandre Courbot <acourbot@...dia.com> wrote:
>>>>> On Wed Nov 12, 2025 at 2:13 AM JST, Joel Fernandes wrote:
> ...
>> You do have a point that we have an abstraction leak anyway, so the question is do we need helpers at all.
>> 
> 
> I'm writing this in order to suggest a stance in this area, for future
> feature tradeoffs. If this is somehow "off", I'll upgrade my thinking,
> but at the moment I'm very comfortable making the following claims:
> 
> 
>> 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.

JFYI, and let me preface this by saying I know little about NVIDIA hardware: this overhead
had very little impact on the Rust Arm Mali driver.

> 
> So I think you've made the right decision. The above is just to help
> solidify the reasons why.
> 
> 
> thanks,
> -- 
> John Hubbard
> 
> 

— Daniel


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ