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: <D8L5DDS82E64.37ZBEA441AMJS@nvidia.com>
Date: Thu, 20 Mar 2025 23:02:10 +0900
From: "Alexandre Courbot" <acourbot@...dia.com>
To: "Daniel Almeida" <daniel.almeida@...labora.com>
Cc: "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" <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>, "Fiona Behrens" <me@...enk.dev>
Subject: Re: [PATCH v4] rust: kernel: add support for bits/genmask macros

On Thu Mar 20, 2025 at 10:50 PM JST, Daniel Almeida wrote:
> Hi Alex,
>
>> Would it make sense to also have u16 and u8 variants? I guess one can
>> always use genmask_u32 and then cast to the desired type though.
>
> There’s no u16 and u8 variants because I did not think there would be users. 
>
> I can add them otherwise, IMHO we should refrain from using casts when possible.

The plan with the register definition macros is to also support 16-bit
and 8-bit registers, in this case it would be useful to have these as
well.

Since the body of these functions is roughly the same, maybe you can use
a macro to define all the variants?


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ