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: <CANiq72mUXy6AYkwCW_kO3ikjNBc5pLzXw0+fXFGmYum0tGmw1g@mail.gmail.com>
Date: Sat, 16 Aug 2025 22:40:32 +0200
From: Miguel Ojeda <miguel.ojeda.sandonis@...il.com>
To: Danilo Krummrich <dakr@...nel.org>
Cc: lorenzo.stoakes@...cle.com, vbabka@...e.cz, Liam.Howlett@...cle.com, 
	urezki@...il.com, ojeda@...nel.org, alex.gaynor@...il.com, 
	boqun.feng@...il.com, gary@...yguo.net, bjorn3_gh@...tonmail.com, 
	lossin@...nel.org, a.hindborg@...nel.org, aliceryhl@...gle.com, 
	tmgross@...ch.edu, maarten.lankhorst@...ux.intel.com, mripard@...nel.org, 
	tzimmermann@...e.de, airlied@...il.com, simona@...ll.ch, 
	rust-for-linux@...r.kernel.org, dri-devel@...ts.freedesktop.org, 
	linux-kernel@...r.kernel.org
Subject: Re: [PATCH 1/4] rust: alloc: replace aligned_size() with Kmalloc::aligned_layout()

On Thu, Jul 31, 2025 at 5:49 PM Danilo Krummrich <dakr@...nel.org> wrote:
>
> +impl Kmalloc {
> +    /// Returns a [`Layout`] that makes [`Kmalloc`] fulfill the requested size and alignment of
> +    /// `layout`.
> +    pub const fn aligned_layout(layout: Layout) -> Layout {

I think this `const fn` here was removed when applying to make it work
with older compilers, right?

I was fixing another `rusttest` thing and noticed while applying
these. I had a patch to fix it, since we can actually just use the
feature, and then I noticed it wasn't in the tree. Since I have it, I
am attaching it for reference in case the now-stable feature is
needed, e.g. if you want to make that `const fn` again.

Cheers,
Miguel

Download attachment "0001-rust-kernel-use-const_alloc_layout-feature-to-fix-Ru.patch" of type "application/x-patch" (1625 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ