Subject: Re: [PATCH v2 0/2] Take ARCH_KMALLOC_MINALIGN into account for build-time XArray check

From: "Danilo Krummrich" <[email-masked]>
Date: Mon, 18 Aug 2025 14:03:05 +0200

On Mon Aug 18, 2025 at 1:09 PM CEST, Thorsten Leemhuis wrote:
> error[E0428]: the name `ARCH_KMALLOC_MINALIGN` is defined multiple times
>       --> /builddir/build/BUILD/kernel-6.17.0-build/kernel-next-20250818/linux-6.17.0-0.0.next.20250818.423.vanilla.fc44.aarch64/rust/bindings/bindings_generated.rs:134545:1
>        |
> 9622   | pub const ARCH_KMALLOC_MINALIGN: u32 = 8;
>        | ----------------------------------------- previous definition of the value `ARCH_KMALLOC_MINALIGN` here
> ...
> 134545 | pub const ARCH_KMALLOC_MINALIGN: usize = 8;
>        | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `ARCH_KMALLOC_MINALIGN` redefined here
>        |
>        = note: `ARCH_KMALLOC_MINALIGN` must be defined only once in the value namespace of this module
>
> error: aborting due to 1 previous error

Thanks for reporting, the diff below should fix it, I'll send a patch soon.

diff --git a/rust/bindgen_parameters b/rust/bindgen_parameters
index 0f96af8b9a7f..02b371b98b39 100644
--- a/rust/bindgen_parameters
+++ b/rust/bindgen_parameters
@@ -34,3 +34,4 @@
 # We use const helpers to aid bindgen, to avoid conflicts when constants are
 # recognized, block generation of the non-helper constants.
 --blocklist-item ARCH_SLAB_MINALIGN
+--blocklist-item ARCH_KMALLOC_MINALIGN