linux/include/uapi
Thomas Weißschuh 79ced850e5 y2038: uapi: Use 64-bit __kernel_old_timespec::tv_nsec on x32
'struct __kernel_old_timespec' represents the 'native' time ABI of the
kernel. On 32-bit systems it uses 32-bit fields and on 64-bit systems
it uses 64-bit fields.

However the x86 x32 ABI uses the 64-bit time ABI natively.  This is
correctly handled for the 'tv_sec' fields, through the typedefs of
'__kernel_old_time_t' -> '__kernel_long_t' -> 'long long'. The same
treatment was missed for 'tv_nsec'.

In practice this might not make much of a difference as the value of
'tv_nsec' will always fit into 32 bits and the missing bits fall
into the padding of the structure.

When introspecting the structure however, a difference can be observed.

Switch to 64-bit tv_nsec on x32.  No other architectures or ABIs are
affected.

While this could be interpreted as violating the POSIX requirement of
'timespec::tv_nsec' being 'long':

  * __kernel_old_timespec is not actually the POSIX timespec type

  * the requirement is gone in newer versions of POSIX

  * this matches glibc

Fixes: 94c467ddb2 ("y2038: add __kernel_old_timespec and __kernel_old_time_t")
Signed-off-by: Thomas Weißschuh <thomas.weissschuh@linutronix.de>
Signed-off-by: Thomas Gleixner <tglx@kernel.org>
Link: https://patch.msgid.link/20260504-timespec-x32-v2-1-0739c9047fc4@linutronix.de
2026-07-07 23:59:24 +02:00
..
asm-generic vfs-7.2-rc1.misc 2026-06-15 03:59:45 +05:30
cxl
drm Merge tag 'drm-msm-next-2026-05-30' of https://gitlab.freedesktop.org/drm/msm into drm-next 2026-06-04 06:41:22 +10:00
fwctl fwctl/bnxt_fwctl: Add bnxt fwctl device 2026-03-31 13:33:54 -03:00
linux y2038: uapi: Use 64-bit __kernel_old_timespec::tv_nsec on x32 2026-07-07 23:59:24 +02:00
misc Char/Misc/IIO/Binder changes for 6.18-rc1 2025-10-04 16:26:32 -07:00
mtd
rdma RDMA/uverbs: Expose CoCo DMA bounce requirement to userspace 2026-05-29 20:27:29 -03:00
regulator regulator: uapi: Use UAPI integer type 2025-12-22 09:00:42 +00:00
scsi scsi: fc: Fix typo in fc_els.h 2026-03-27 16:35:04 -04:00
sound ASoC: SOF: ipc4-topology: Add new tokens for pipeline direction 2026-02-04 13:26:05 +00:00
video
xen
Kbuild