From: "Danilo Krummrich" <dakr@kernel.org>
To: "Hui Zhu" <hui.zhu@linux.dev>,
"Andrew Morton" <akpm@linux-foundation.org>
Cc: "Lorenzo Stoakes" <lorenzo.stoakes@oracle.com>,
"Vlastimil Babka" <vbabka@suse.cz>,
"Liam R . Howlett" <Liam.Howlett@oracle.com>,
"Uladzislau Rezki" <urezki@gmail.com>,
"Miguel Ojeda" <ojeda@kernel.org>,
"Alex Gaynor" <alex.gaynor@gmail.com>,
"Boqun Feng" <boqun.feng@gmail.com>,
"Gary Guo" <gary@garyguo.net>, <bjorn3_gh@protonmail.com>,
"Benno Lossin" <lossin@kernel.org>,
"Andreas Hindborg" <a.hindborg@kernel.org>,
"Alice Ryhl" <aliceryhl@google.com>,
"Trevor Gross" <tmgross@umich.edu>,
<rust-for-linux@vger.kernel.org>, <linux-kernel@vger.kernel.org>,
<vitaly.wool@konsulko.se>, "Hui Zhu" <zhuhui@kylinos.cn>,
"Geliang Tang" <geliang@kernel.org>,
"Kunwu Chan" <chentao@kylinos.cn>
Subject: Re: [PATCH v7 1/3] rust: allocator: add KUnit tests for alignment guarantees
Date: Thu, 31 Jul 2025 11:19:10 +0200 [thread overview]
Message-ID: <DBQ4N5NCU8H5.356OH5T3KRGJ1@kernel.org> (raw)
In-Reply-To: <d2e3d6454c1435713be0fe3c0dc444d2c60bba51.1753929369.git.zhuhui@kylinos.cn>
On Thu Jul 31, 2025 at 4:50 AM CEST, Hui Zhu wrote:
> From: Hui Zhu <zhuhui@kylinos.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@kernel.org>
> Signed-off-by: Geliang Tang <geliang@kernel.org>
> Signed-off-by: Hui Zhu <zhuhui@kylinos.cn>
> Reviewed-by: Kunwu Chan <chentao@kylinos.cn>
Acked-by: Danilo Krummrich <dakr@kernel.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/
next prev parent reply other threads:[~2025-07-31 9:19 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-07-31 2:50 [PATCH v7 0/3] Rust allocator and kvec improvements Hui Zhu
2025-07-31 2:50 ` [PATCH v7 1/3] rust: allocator: add KUnit tests for alignment guarantees Hui Zhu
2025-07-31 9:19 ` Danilo Krummrich [this message]
2025-08-13 16:48 ` Danilo Krummrich
2025-07-31 2:50 ` [PATCH v7 2/3] rust: alloc: kvec: add doc example for as_slice method Hui Zhu
2025-07-31 2:50 ` [PATCH v7 3/3] rust: alloc: kvec: simplify KUnit test module name to "rust_kvec" Hui Zhu
2025-07-31 4:14 ` [PATCH v7 0/3] Rust allocator and kvec improvements David Gow
2025-07-31 9:01 ` Danilo Krummrich
2025-08-15 17:53 ` Danilo Krummrich
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=DBQ4N5NCU8H5.356OH5T3KRGJ1@kernel.org \
--to=dakr@kernel.org \
--cc=Liam.Howlett@oracle.com \
--cc=a.hindborg@kernel.org \
--cc=akpm@linux-foundation.org \
--cc=alex.gaynor@gmail.com \
--cc=aliceryhl@google.com \
--cc=bjorn3_gh@protonmail.com \
--cc=boqun.feng@gmail.com \
--cc=chentao@kylinos.cn \
--cc=gary@garyguo.net \
--cc=geliang@kernel.org \
--cc=hui.zhu@linux.dev \
--cc=linux-kernel@vger.kernel.org \
--cc=lorenzo.stoakes@oracle.com \
--cc=lossin@kernel.org \
--cc=ojeda@kernel.org \
--cc=rust-for-linux@vger.kernel.org \
--cc=tmgross@umich.edu \
--cc=urezki@gmail.com \
--cc=vbabka@suse.cz \
--cc=vitaly.wool@konsulko.se \
--cc=zhuhui@kylinos.cn \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®