[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-Id: <DC1GCMZDC5GE.2IJ4JAIWRO8HZ@kernel.org>
Date: Wed, 13 Aug 2025 18:48:59 +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 11:19 AM CEST, Danilo Krummrich wrote:
> 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.
Just a reminder for this one to be picked up; I gave it a quick shot on top of
mm-everything and everything looks fine..
> [1] https://lore.kernel.org/lkml/20250730191921.352591-1-vitaly.wool@konsulko.se/
Powered by blists - more mailing lists