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: <DBQ4N5NCU8H5.356OH5T3KRGJ1@kernel.org>
Date: Thu, 31 Jul 2025 11:19:10 +0200
From: "Danilo Krummrich" <dakr@...nel.org>
To: "Hui Zhu" <hui.zhu@...ux.dev>, "Andrew Morton"
 <akpm@...ux-foundation.org>
Cc: "Lorenzo Stoakes" <lorenzo.stoakes@...cle.com>, "Vlastimil Babka"
 <vbabka@...e.cz>, "Liam R . Howlett" <Liam.Howlett@...cle.com>, "Uladzislau
 Rezki" <urezki@...il.com>, "Miguel Ojeda" <ojeda@...nel.org>, "Alex Gaynor"
 <alex.gaynor@...il.com>, "Boqun Feng" <boqun.feng@...il.com>, "Gary Guo"
 <gary@...yguo.net>, <bjorn3_gh@...tonmail.com>, "Benno Lossin"
 <lossin@...nel.org>, "Andreas Hindborg" <a.hindborg@...nel.org>, "Alice
 Ryhl" <aliceryhl@...gle.com>, "Trevor Gross" <tmgross@...ch.edu>,
 <rust-for-linux@...r.kernel.org>, <linux-kernel@...r.kernel.org>,
 <vitaly.wool@...sulko.se>, "Hui Zhu" <zhuhui@...inos.cn>, "Geliang Tang"
 <geliang@...nel.org>, "Kunwu Chan" <chentao@...inos.cn>
Subject: Re: [PATCH v7 1/3] rust: allocator: add KUnit tests for alignment
 guarantees

On Thu Jul 31, 2025 at 4:50 AM CEST, Hui Zhu wrote:
> From: Hui Zhu <zhuhui@...inos.cn>
>
> Add a test module to verify memory alignment guarantees for Rust kernel
> allocators.
> The tests cover `Kmalloc`, `Vmalloc` and `KVmalloc` allocators
> with both standard and large page-aligned allocations.
>
> Key features of the tests:
> 1. Creates alignment-constrained types:
>    - 128-byte aligned `Blob`
>    - 8192-byte (4-page) aligned `LargeAlignBlob`
> 2. Validates allocators using `TestAlign` helper which:
>    - Checks address alignment masks
>    - Supports uninitialized allocations
> 3. Tests all three allocators with both alignment requirements:
>    - Kmalloc with 128B and 8192B
>    - Vmalloc with 128B and 8192B
>    - KVmalloc with 128B and 8192B
>
> Co-developed-by: Geliang Tang <geliang@...nel.org>
> Signed-off-by: Geliang Tang <geliang@...nel.org>
> Signed-off-by: Hui Zhu <zhuhui@...inos.cn>
> Reviewed-by: Kunwu Chan <chentao@...inos.cn>

Acked-by: Danilo Krummrich <dakr@...nel.org>

@Andrew: Can you please pick this one up once we land Vitaly's series [1]? I'll
take the other two patches of the series through the Rust alloc tree once -rc1
is out.

[1] https://lore.kernel.org/lkml/20250730191921.352591-1-vitaly.wool@konsulko.se/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ