* Re: [PATCH v2 0/2] Take ARCH_KMALLOC_MINALIGN into account for build-time XArray check
[not found] ` <DC38NDRET9NB.31UDI8FHB7WAY@kernel.org>
@ 2025-08-18 11:09 ` Thorsten Leemhuis
2025-08-18 11:18 ` Miguel Ojeda
2025-08-18 12:03 ` Danilo Krummrich
0 siblings, 2 replies; 3+ messages in thread
From: Thorsten Leemhuis @ 2025-08-18 11:09 UTC (permalink / raw)
To: Alice Ryhl, Danilo Krummrich
Cc: Lorenzo Stoakes, Liam R. Howlett, Matthew Wilcox,
Tamir Duberstein, Andreas Hindborg, Miguel Ojeda, Boqun Feng,
Gary Guo, Björn Roy Baron, Benno Lossin, Trevor Gross,
linux-mm, rust-for-linux, linux-kernel, Stephen Rothwell,
Linux Next Mailing List, Andrew Morton
On 15.08.25 21:12, Danilo Krummrich wrote:
> On Mon Aug 11, 2025 at 2:31 PM CEST, Alice Ryhl wrote:
>> Alice Ryhl (2):
>> rust: alloc: specify the minimum alignment of each allocator
>
> [ Add helper for ARCH_KMALLOC_MINALIGN; remove cast to usize. - Danilo ]
>
>> rust: alloc: take the allocator into account for FOREIGN_ALIGN
>
> Applied to alloc-next, thanks!
I had a build error with my daily linux-next builds for Fedora (using
the Fedora rawhide config) on arm64 (ppc64le and x86_64 worked fine).
From a quick look it seems it might be due to this series, which
turned up in -next today:
"""
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
For more information about this error, try `rustc --explain E0428`.
make[2]: *** [rust/Makefile:539: rust/bindings.o] Error 1
make[1]: *** [/builddir/build/BUILD/kernel-6.17.0-build/kernel-next-20250818/linux-6.17.0-0.0.next.20250818.423.vanilla.fc44.aarch64/Makefile:1294: prepare] Error 2
make: *** [Makefile:256: __sub-make] Error 2
"""
Full log:
https://download.copr.fedorainfracloud.org/results/@kernel-vanilla/next/fedora-rawhide-aarch64/09439461-next-next-all/builder-live.log.gz
Ciao, Thorsten
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH v2 0/2] Take ARCH_KMALLOC_MINALIGN into account for build-time XArray check
2025-08-18 11:09 ` [PATCH v2 0/2] Take ARCH_KMALLOC_MINALIGN into account for build-time XArray check Thorsten Leemhuis
@ 2025-08-18 11:18 ` Miguel Ojeda
2025-08-18 12:03 ` Danilo Krummrich
1 sibling, 0 replies; 3+ messages in thread
From: Miguel Ojeda @ 2025-08-18 11:18 UTC (permalink / raw)
To: Thorsten Leemhuis
Cc: Alice Ryhl, Danilo Krummrich, Lorenzo Stoakes, Liam R. Howlett,
Matthew Wilcox, Tamir Duberstein, Andreas Hindborg, Miguel Ojeda,
Boqun Feng, Gary Guo, Björn Roy Baron, Benno Lossin,
Trevor Gross, linux-mm, rust-for-linux, linux-kernel,
Stephen Rothwell, Linux Next Mailing List, Andrew Morton
On Mon, Aug 18, 2025 at 1:09 PM Thorsten Leemhuis <linux@leemhuis.info> wrote:
>
> on arm64 (ppc64le and x86_64 worked fine).
Yeah, it happens in arm, arm64, loongarch64 and riscv64 -- we don't
have powerpc support for Rust upstream yet (we had it originally
out-of-tree, but it never got upstreamed).
Cheers,
Miguel
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH v2 0/2] Take ARCH_KMALLOC_MINALIGN into account for build-time XArray check
2025-08-18 11:09 ` [PATCH v2 0/2] Take ARCH_KMALLOC_MINALIGN into account for build-time XArray check Thorsten Leemhuis
2025-08-18 11:18 ` Miguel Ojeda
@ 2025-08-18 12:03 ` Danilo Krummrich
1 sibling, 0 replies; 3+ messages in thread
From: Danilo Krummrich @ 2025-08-18 12:03 UTC (permalink / raw)
To: Thorsten Leemhuis
Cc: Alice Ryhl, Lorenzo Stoakes, Liam R. Howlett, Matthew Wilcox,
Tamir Duberstein, Andreas Hindborg, Miguel Ojeda, Boqun Feng,
Gary Guo, Björn Roy Baron, Benno Lossin, Trevor Gross,
linux-mm, rust-for-linux, linux-kernel, Stephen Rothwell,
Linux Next Mailing List, Andrew Morton
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
^ permalink raw reply related [flat|nested] 3+ messages in thread
end of thread, other threads:[~2025-08-18 12:03 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <20250811-align-min-allocator-v2-0-3386cc94f4fc@google.com>
[not found] ` <DC38NDRET9NB.31UDI8FHB7WAY@kernel.org>
2025-08-18 11:09 ` [PATCH v2 0/2] Take ARCH_KMALLOC_MINALIGN into account for build-time XArray check Thorsten Leemhuis
2025-08-18 11:18 ` Miguel Ojeda
2025-08-18 12:03 ` Danilo Krummrich
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).