Re: [PATCH 1/2] copy_process: Handle architectures where sizeof(unsigned long) < sizeof(u64)

From: schuster.simon@xxxxxxxxxxxxxxxxxx
Date: Fri Aug 22 2025 - 04:56:09 EST


On Thu, Aug 21, 2025 at 11:14:00PM +0200, David Hildenbrand wrote:
> Sounds reasonable.
>
> But is this actually something that is already exposed before patch#2
> on other architectures?

I'm not sure, but I would assume so, as e.g., arch/arm seems to have
support for clone3, but also seems to use 32bit unsigned longs as far as
I can tell and, thus, should also be affected:

$ cat /tmp/printulsize.c
#include <stdio.h>

int main(void) {
printf("sizeof(unsigned long): %zu\n", sizeof(unsigned long));
}
$ arm-linux-gnueabi-gcc-12 /tmp/printulsize.c -o printulsize
$ qemu-arm -L /usr/arm-linux-gnueabi ./printulsize
sizeof(unsigned long): 4

Is the above test enough to warrant a "Fixes: ", or do we need a
reproduced kselftest failure on some arch for that?

> (I assume above output is with patch #2 but without patch #1)

Yes, sorry, that one is on me; I've naturally first implemented support
for clone3 on nios2 and then investigated the test failures, but somehow
deemed it wise for whatever reason to switch the commit order in the
patch submission...

Best regards,
Simon