diff options
author | Arnd Bergmann <arnd@arndb.de> | 2019-10-25 23:46:48 +0300 |
---|---|---|
committer | Arnd Bergmann <arnd@arndb.de> | 2019-11-15 16:38:29 +0300 |
commit | bdd565f817a74b9e30edec108f7cb1dbc762b8a6 (patch) | |
tree | ce401e7b12bc0c3c77af23ba8e1fd18f223ee040 /arch/alpha | |
parent | 2a785996cc5e2fc1d1d29d196f530905f68d2dc2 (diff) | |
download | linux-bdd565f817a74b9e30edec108f7cb1dbc762b8a6.tar.xz |
y2038: rusage: use __kernel_old_timeval
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>
Diffstat (limited to 'arch/alpha')
-rw-r--r-- | arch/alpha/kernel/osf_sys.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/alpha/kernel/osf_sys.c b/arch/alpha/kernel/osf_sys.c index bf497b8b0ec6..bbe7a0da6264 100644 --- a/arch/alpha/kernel/osf_sys.c +++ b/arch/alpha/kernel/osf_sys.c @@ -963,7 +963,7 @@ put_tv32(struct timeval32 __user *o, struct timespec64 *i) } static inline long -put_tv_to_tv32(struct timeval32 __user *o, struct timeval *i) +put_tv_to_tv32(struct timeval32 __user *o, struct __kernel_old_timeval *i) { return copy_to_user(o, &(struct timeval32){ .tv_sec = i->tv_sec, |