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] [day] [month] [year] [list]
Message-ID: <ed2aa3cf-ca2e-4abb-9c7a-7134572e4997@nvidia.com>
Date: Fri, 20 Jun 2025 16:47:08 -0400
From: Joel Fernandes <joelagnelf@...dia.com>
To: Daniel Almeida <daniel.almeida@...labora.com>
Cc: Boqun Feng <boqun.feng@...il.com>, Alexandre Courbot
 <acourbot@...dia.com>, Miguel Ojeda <ojeda@...nel.org>,
 Alex Gaynor <alex.gaynor@...il.com>, Gary Guo <gary@...yguo.net>,
 Björn Roy Baron <bjorn3_gh@...tonmail.com>,
 Benno Lossin <benno.lossin@...ton.me>,
 Andreas Hindborg <a.hindborg@...nel.org>, Alice Ryhl <aliceryhl@...gle.com>,
 Trevor Gross <tmgross@...ch.edu>, Danilo Krummrich <dakr@...nel.org>,
 linux-kernel@...r.kernel.org, rust-for-linux@...r.kernel.org
Subject: Re: [PATCH v6] rust: kernel: add support for bits/genmask macros

Hi Daniel,

On 6/20/2025 9:48 AM, Daniel Almeida wrote:
> Hi Joel,
> 
>>>>> I think generic over `RangeBounds` is a good idea, and we should
>>>>> .is_emtpy() or .contains() instead of comparison + boolean operation
>>>>> when possible. Seems we need a function to check whether one range
>> I am also of the opinion that RangeBounds is a good idea. I think it may come
>> down to both classes of devs, those who have used genmask before in C and
>> expect inclusivity, and those who are using it for the first time in Rust -
>> the latter may almost always want to use the non-inclusive syntax, no? 
>>
>> thanks,
>>
>> - Joel
> 
> Can’t do that in a const fn, and we really want a const fn as the default.
> Hence my suggestion to only support a..=b, which is both correct and explicit.

I haven't looked too deeply into the const issue, but the a..=b syntax is fine
with me.

thanks,

 - Joel


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ