summaryrefslogtreecommitdiff
path: root/arch/x86/um
diff options
context:
space:
mode:
authorArnd Bergmann <arnd@arndb.de>2017-11-23 16:29:37 +0300
committerArnd Bergmann <arnd@arndb.de>2019-11-15 16:38:27 +0300
commitddccf40fe82b7ac7c44b186ec4b6d1d1bbc2cbff (patch)
tree72fb6a1393d55066a99f14ebbd63a721b457dcb4 /arch/x86/um
parent94c467ddb273dc9a6a4fb09aef392c119b151edb (diff)
downloadlinux-ddccf40fe82b7ac7c44b186ec4b6d1d1bbc2cbff.tar.xz
y2038: vdso: change timeval to __kernel_old_timeval
The gettimeofday() function in vdso uses the traditional 'timeval' structure layout, which will be incompatible with future versions of glibc on 32-bit architectures that use a 64-bit time_t. This interface is problematic for y2038, when time_t overflows on 32-bit architectures, but the plan so far is that a libc with 64-bit time_t will not call into the gettimeofday() vdso helper at all, and only have a method for entering clock_gettime(). This means we don't have to fix it here, though we probably want to add a new clock_gettime() entry point using a 64-bit version of 'struct timespec' at some point. Changing the vdso code to use __kernel_old_timeval helps isolate this usage from the other ones that still need to be fixed properly, and it gets us closer to removing the 'timeval' definition from the kernel sources. Reviewed-by: Thomas Gleixner <tglx@linutronix.de> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Diffstat (limited to 'arch/x86/um')
-rw-r--r--arch/x86/um/vdso/um_vdso.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/arch/x86/um/vdso/um_vdso.c b/arch/x86/um/vdso/um_vdso.c
index 891868756a51..845336c11364 100644
--- a/arch/x86/um/vdso/um_vdso.c
+++ b/arch/x86/um/vdso/um_vdso.c
@@ -25,7 +25,7 @@ int __vdso_clock_gettime(clockid_t clock, struct timespec *ts)
int clock_gettime(clockid_t, struct timespec *)
__attribute__((weak, alias("__vdso_clock_gettime")));
-int __vdso_gettimeofday(struct timeval *tv, struct timezone *tz)
+int __vdso_gettimeofday(struct __kernel_old_timeval *tv, struct timezone *tz)
{
long ret;
@@ -34,7 +34,7 @@ int __vdso_gettimeofday(struct timeval *tv, struct timezone *tz)
return ret;
}
-int gettimeofday(struct timeval *, struct timezone *)
+int gettimeofday(struct __kernel_old_timeval *, struct timezone *)
__attribute__((weak, alias("__vdso_gettimeofday")));
time_t __vdso_time(time_t *t)