Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

y2038: vdso: change time_t to __kernel_old_time_t

Only x86 uses the 'time' syscall in vdso, so change that to
__kernel_old_time_t as a preparation for removing 'time_t' and
'__kernel_time_t' later.

Reviewed-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>

+8 -8
+3 -3
arch/x86/entry/vdso/vclock_gettime.c
··· 15 15 #include "../../../../lib/vdso/gettimeofday.c" 16 16 17 17 extern int __vdso_gettimeofday(struct __kernel_old_timeval *tv, struct timezone *tz); 18 - extern time_t __vdso_time(time_t *t); 18 + extern __kernel_old_time_t __vdso_time(__kernel_old_time_t *t); 19 19 20 20 int __vdso_gettimeofday(struct __kernel_old_timeval *tv, struct timezone *tz) 21 21 { ··· 25 25 int gettimeofday(struct __kernel_old_timeval *, struct timezone *) 26 26 __attribute__((weak, alias("__vdso_gettimeofday"))); 27 27 28 - time_t __vdso_time(time_t *t) 28 + __kernel_old_time_t __vdso_time(__kernel_old_time_t *t) 29 29 { 30 30 return __cvdso_time(t); 31 31 } 32 32 33 - time_t time(time_t *t) __attribute__((weak, alias("__vdso_time"))); 33 + __kernel_old_time_t time(__kernel_old_time_t *t) __attribute__((weak, alias("__vdso_time"))); 34 34 35 35 36 36 #if defined(CONFIG_X86_64) && !defined(BUILD_VDSO32_64)
+1 -1
arch/x86/entry/vsyscall/vsyscall_64.c
··· 194 194 break; 195 195 196 196 case 1: 197 - if (!write_ok_or_segv(regs->di, sizeof(time_t))) { 197 + if (!write_ok_or_segv(regs->di, sizeof(__kernel_old_time_t))) { 198 198 ret = -EFAULT; 199 199 goto check_fault; 200 200 }
+2 -2
arch/x86/um/vdso/um_vdso.c
··· 37 37 int gettimeofday(struct __kernel_old_timeval *, struct timezone *) 38 38 __attribute__((weak, alias("__vdso_gettimeofday"))); 39 39 40 - time_t __vdso_time(time_t *t) 40 + __kernel_old_time_t __vdso_time(__kernel_old_time_t *t) 41 41 { 42 42 long secs; 43 43 ··· 47 47 48 48 return secs; 49 49 } 50 - time_t time(time_t *t) __attribute__((weak, alias("__vdso_time"))); 50 + __kernel_old_time_t time(__kernel_old_time_t *t) __attribute__((weak, alias("__vdso_time"))); 51 51 52 52 long 53 53 __vdso_getcpu(unsigned *cpu, unsigned *node, struct getcpu_cache *unused)
+2 -2
lib/vdso/gettimeofday.c
··· 164 164 } 165 165 166 166 #ifdef VDSO_HAS_TIME 167 - static __maybe_unused time_t __cvdso_time(time_t *time) 167 + static __maybe_unused __kernel_old_time_t __cvdso_time(__kernel_old_time_t *time) 168 168 { 169 169 const struct vdso_data *vd = __arch_get_vdso_data(); 170 - time_t t = READ_ONCE(vd[CS_HRES_COARSE].basetime[CLOCK_REALTIME].sec); 170 + __kernel_old_time_t t = READ_ONCE(vd[CS_HRES_COARSE].basetime[CLOCK_REALTIME].sec); 171 171 172 172 if (time) 173 173 *time = t;