linux-stable/arch/alpha
Arnd Bergmann d5e38d6b84 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:17 -04:00
..
boot kbuild: Rename HOSTCFLAGS to KBUILD_HOSTCFLAGS 2018-07-18 01:18:05 +09:00
include init: Remove check_bugs() leftovers 2023-08-08 19:49:18 +02:00
kernel y2038: rusage: use __kernel_old_timeval 2024-03-15 10:48:17 -04:00
lib alpha: Remove custom dec_and_lock() implementation 2018-06-12 23:33:24 +02:00
math-emu
mm exit: Add and use make_task_dead. 2023-02-06 07:49:45 +01:00
oprofile
defconfig scsi: sr: remove references to BLK_DEV_SR_VENDOR, leave it enabled 2020-07-22 09:32:04 +02:00
Kconfig kconfig: include kernel/Kconfig.preempt from init/Kconfig 2018-08-02 08:06:54 +09:00
Kconfig.debug Kconfig: consolidate the "Kernel hacking" menu 2018-08-02 08:06:48 +09:00
Makefile kbuild: add machine size to CHECKFLAGS 2018-06-01 11:36:58 +09:00