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: <20250720181721.54ab9faf@nimda.home>
Date: Sun, 20 Jul 2025 18:17:21 +0300
From: Onur Özkan <work@...rozkan.dev>
To: "Benno Lossin" <lossin@...nel.org>
Cc: <rust-for-linux@...r.kernel.org>, <dakr@...nel.org>, <ojeda@...nel.org>,
 <alex.gaynor@...il.com>, <boqun.feng@...il.com>, <gary@...yguo.net>,
 <bjorn3_gh@...tonmail.com>, <a.hindborg@...nel.org>,
 <aliceryhl@...gle.com>, <tmgross@...ch.edu>, <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH v1 0/3] rust: make various `alloc` functions `const fn`

On Sun, 20 Jul 2025 16:43:49 +0200
"Benno Lossin" <lossin@...nel.org> wrote:

> On Sun Jul 20, 2025 at 11:48 AM CEST, Onur Özkan wrote:
> > This patch series makes various functions in the
> > `alloc` crate const fn.
> >
> > Each patch corresponds to a different module within
> > the same `alloc` crate.
> >
> > Onur Özkan (3):
> >   rust: make `allocator::aligned_size` a `const fn`
> >   rust: make `ArrayLayout::new_unchecked` a `const fn`
> >   rust: make `kvec::Vec` functions `const fn`
> >
> >  rust/kernel/alloc/allocator.rs |  2 +-
> >  rust/kernel/alloc/kvec.rs      | 10 +++++-----
> >  rust/kernel/alloc/layout.rs    |  2 +-
> >  3 files changed, 7 insertions(+), 7 deletions(-)
> 
> This looks sensible, any particular reason for why you need them
> const?
> 
> For the entire series:
> 
> Reviewed-by: Benno Lossin <lossin@...nel.org>
> 
> ---
> Cheers,
> Benno

Personally, I don't have a specific reason. I thought the change is
harmless and might extend functionality for other people in the future.
It could also (although less likely) help the compiler optimize things
further.

Regards,
Onur

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ