Re: [PATCH] delayacct: fix uapi timespec64 definition

From: Andrew Morton

Date: Mon Feb 02 2026 - 15:42:50 EST


On Mon, 2 Feb 2026 10:59:00 +0100 Arnd Bergmann <arnd@xxxxxxxxxx> wrote:

> From: Arnd Bergmann <arnd@xxxxxxxx>
>
> The custom definition of 'struct timespec64' is incompatible with
> both the kernel's internal definition and the glibc type, at least
> on big-endian targets that have the tv_nsec field in a different
> place, and the definition clashes with any userspace that also
> defines a timespec64 structure.
>
> Running the header check with -Wpadding enabled produces this output
> that warns about the incorrect padding:
>
> usr/include/linux/taskstats.h:25:1: error: padding struct size to alignment boundary with 4 bytes [-Werror=padded]
>
> Remove the hack and instead use the regular __kernel_timespec
> type that is meant to be used in uapi definitions.
>

Thanks.

> @@ -251,14 +242,14 @@ struct taskstats {
> __u64 irq_delay_min;
>
> /*v17: delay max timestamp record*/
> - struct timespec64 cpu_delay_max_ts;
> - struct timespec64 blkio_delay_max_ts;
> - struct timespec64 swapin_delay_max_ts;
> - struct timespec64 freepages_delay_max_ts;
> - struct timespec64 thrashing_delay_max_ts;
> - struct timespec64 compact_delay_max_ts;
> - struct timespec64 wpcopy_delay_max_ts;
> - struct timespec64 irq_delay_max_ts;
> + struct __kernel_timespec cpu_delay_max_ts;
> + struct __kernel_timespec blkio_delay_max_ts;
> + struct __kernel_timespec swapin_delay_max_ts;
> + struct __kernel_timespec freepages_delay_max_ts;
> + struct __kernel_timespec thrashing_delay_max_ts;
> + struct __kernel_timespec compact_delay_max_ts;
> + struct __kernel_timespec wpcopy_delay_max_ts;
> + struct __kernel_timespec irq_delay_max_ts;
> } __uapi_arch_align;

There's no __uapi_arch_align here in any tree I looked at?