linux-stable/arch/alpha
Arnd Bergmann f184f21978 y2038: rusage: use __kernel_old_timeval
[ Upstream commit bdd565f817 ]

There are two 'struct timeval' fields in 'struct rusage'.

Unfortunately the definition of timeval is now ambiguous when used in
user space with a libc that has a 64-bit time_t, and this also changes
the 'rusage' definition in user space in a way that is incompatible with
the system call interface.

While there is no good solution to avoid all ambiguity here, change
the definition in the kernel headers to be compatible with the kernel
ABI, using __kernel_old_timeval as an unambiguous base type.

In previous discussions, there was also a plan to add a replacement
for rusage based on 64-bit timestamps and nanosecond resolution,
i.e. 'struct __kernel_timespec'. I have patches for that as well,
if anyone thinks we should do that.

Reviewed-by: Cyrill Gorcunov <gorcunov@gmail.com>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Stable-dep-of: daa694e413 ("getrusage: move thread_group_cputime_adjusted() outside of lock_task_sighand()")
Signed-off-by: Sasha Levin <sashal@kernel.org>
2024-03-15 10:48:18 -04:00
..
boot treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 152 2019-05-30 11:26:32 -07:00
configs scsi: sr: remove references to BLK_DEV_SR_VENDOR, leave it enabled 2020-07-22 09:32:57 +02:00
include init: Remove check_bugs() leftovers 2023-08-08 19:56:34 +02:00
kernel y2038: rusage: use __kernel_old_timeval 2024-03-15 10:48:18 -04:00
lib
math-emu treewide: Add SPDX license identifier - Makefile/Kconfig 2019-05-21 10:50:46 +02:00
mm exit: Add and use make_task_dead. 2023-02-06 07:52:49 +01:00
oprofile smp: Remove smp_call_function() and on_each_cpu() return values 2019-06-23 14:26:26 +02:00
Kconfig kbuild: add CONFIG_ASM_MODVERSIONS 2019-08-22 01:14:11 +09:00
Kconfig.debug
Makefile kconfig: make arch/*/configs/defconfig the default of KBUILD_DEFCONFIG 2019-06-09 15:08:18 +09:00