From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 325191E571B; Thu, 31 Jul 2025 09:19:16 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1753953557; cv=none; b=Ige18S3JmEz6QoaMYR1wP0Ktr8hLZr48ERDK43hZjU/JVNwuPFRza1QpUeMY9nrYxn1qk46QhRcnxhu9QKRsGlmDKLHm6wQayRsAbKLpdh427bKBvNbfvfjnXJCMWiqaPm5RjtMOsUw/EaypWGlT3VMOPvb6VRWrjX7PEyIjiUE= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1753953557; c=relaxed/simple; bh=IzQM3tIFM174kzIiR7pD6odpuP6sYQLUGs0TfrEDGnU=; h=Mime-Version:Content-Type:Date:Message-Id:Subject:Cc:To:From: References:In-Reply-To; b=ZAgpsUsFdC5DpEkKKj688Zb5HV/iym13xfZHttIU/j+AFHC7aE1fGE4RIBsHWKK1jIg8pmJ5VobdCG0V9OJHQ6FuCfdvegIuhcEgI+n51t8RGVMmas5WiNaqG4/0F6R0yrdN54hu2ZIxPeESOcbv4URI7WyNwWS0nnDeQujfQ0A= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=uz7ACl2p; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="uz7ACl2p" Received: by smtp.kernel.org (Postfix) with ESMTPSA id ACA07C4CEEF; Thu, 31 Jul 2025 09:19:12 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1753953556; bh=IzQM3tIFM174kzIiR7pD6odpuP6sYQLUGs0TfrEDGnU=; h=Date:Subject:Cc:To:From:References:In-Reply-To:From; b=uz7ACl2p+xVl7AquQs8bLHBUg7U/CyUt/sbGv/ykEOya8pttxW0qbUS+KhO2CwuWe wf8r8DtY4oBxNQ6D2wM5A2c2ZFM7wOX9OD+jyeXpKhHosfVvy7LRrU73rFrqUS0WGR /G3G6ZOVWcWcAz/qyzGQlqGEKMm+gahrAi7Spwq9Ecwcx+Yf4Qed6ABZxBdafVPFBE wddpMWjtjM7HE8eNgE2MAEtJzlI8bXldVQ0vWCEqttpdOE3qjl9ng3O/ZxQzq8I2OQ 5RIdkMdKlKZWgtDUW1ebJ1s0l5TGWvDXKKlbfhiEMCLbPvvBUYVhb9fLWmDVha/Gi/ h9EDYhJ9kgsjA== Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: Mime-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=UTF-8 Date: Thu, 31 Jul 2025 11:19:10 +0200 Message-Id: Subject: Re: [PATCH v7 1/3] rust: allocator: add KUnit tests for alignment guarantees Cc: "Lorenzo Stoakes" , "Vlastimil Babka" , "Liam R . Howlett" , "Uladzislau Rezki" , "Miguel Ojeda" , "Alex Gaynor" , "Boqun Feng" , "Gary Guo" , , "Benno Lossin" , "Andreas Hindborg" , "Alice Ryhl" , "Trevor Gross" , , , , "Hui Zhu" , "Geliang Tang" , "Kunwu Chan" To: "Hui Zhu" , "Andrew Morton" From: "Danilo Krummrich" References: In-Reply-To: On Thu Jul 31, 2025 at 4:50 AM CEST, Hui Zhu wrote: > From: Hui Zhu > > 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 > Signed-off-by: Geliang Tang > Signed-off-by: Hui Zhu > Reviewed-by: Kunwu Chan Acked-by: Danilo Krummrich @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@konsul= ko.se/