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 timespec to __kernel_old_timespec

In order to remove 'timespec' completely from the kernel, all
internal uses should be converted to a y2038-safe type, while
those that are only for compatibity with existing user space
should be marked appropriately.

Change vdso to use __kernel_old_timespec in order to avoid
the deprecated type and mark these interfaces as outdated.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>

+26 -26
+1 -1
arch/ia64/kernel/asm-offsets.c
··· 211 211 offsetof (struct cpuinfo_ia64, ptce_stride)); 212 212 BLANK(); 213 213 DEFINE(IA64_TIMESPEC_TV_NSEC_OFFSET, 214 - offsetof (struct timespec, tv_nsec)); 214 + offsetof (struct __kernel_old_timespec, tv_nsec)); 215 215 DEFINE(IA64_TIME_SN_SPEC_SNSEC_OFFSET, 216 216 offsetof (struct time_sn_spec, snsec)); 217 217
+11 -11
arch/nds32/kernel/vdso/gettimeofday.c
··· 48 48 } 49 49 50 50 static notrace long clock_gettime_fallback(clockid_t _clkid, 51 - struct timespec *_ts) 51 + struct __kernel_old_timespec *_ts) 52 52 { 53 - register struct timespec *ts asm("$r1") = _ts; 53 + register struct __kernel_old_timespec *ts asm("$r1") = _ts; 54 54 register clockid_t clkid asm("$r0") = _clkid; 55 55 register long ret asm("$r0"); 56 56 ··· 63 63 return ret; 64 64 } 65 65 66 - static notrace int do_realtime_coarse(struct timespec *ts, 66 + static notrace int do_realtime_coarse(struct __kernel_old_timespec *ts, 67 67 struct vdso_data *vdata) 68 68 { 69 69 u32 seq; ··· 78 78 return 0; 79 79 } 80 80 81 - static notrace int do_monotonic_coarse(struct timespec *ts, 81 + static notrace int do_monotonic_coarse(struct __kernel_old_timespec *ts, 82 82 struct vdso_data *vdata) 83 83 { 84 84 struct timespec tomono; ··· 115 115 return ((u64) cycle_delta & vdso->cs_mask) * vdso->cs_mult; 116 116 } 117 117 118 - static notrace int do_realtime(struct timespec *ts, struct vdso_data *vdata) 118 + static notrace int do_realtime(struct __kernel_old_timespec *ts, struct vdso_data *vdata) 119 119 { 120 120 unsigned count; 121 121 u64 ns; ··· 133 133 return 0; 134 134 } 135 135 136 - static notrace int do_monotonic(struct timespec *ts, struct vdso_data *vdata) 136 + static notrace int do_monotonic(struct __kernel_old_timespec *ts, struct vdso_data *vdata) 137 137 { 138 138 struct timespec tomono; 139 139 u64 nsecs; ··· 158 158 return 0; 159 159 } 160 160 161 - notrace int __vdso_clock_gettime(clockid_t clkid, struct timespec *ts) 161 + notrace int __vdso_clock_gettime(clockid_t clkid, struct __kernel_old_timespec *ts) 162 162 { 163 163 struct vdso_data *vdata; 164 164 int ret = -1; ··· 191 191 } 192 192 193 193 static notrace int clock_getres_fallback(clockid_t _clk_id, 194 - struct timespec *_res) 194 + struct __kernel_old_timespec *_res) 195 195 { 196 196 register clockid_t clk_id asm("$r0") = _clk_id; 197 - register struct timespec *res asm("$r1") = _res; 197 + register struct __kernel_old_timespec *res asm("$r1") = _res; 198 198 register int ret asm("$r0"); 199 199 200 200 asm volatile ("movi $r15, %3\n" ··· 206 206 return ret; 207 207 } 208 208 209 - notrace int __vdso_clock_getres(clockid_t clk_id, struct timespec *res) 209 + notrace int __vdso_clock_getres(clockid_t clk_id, struct __kernel_old_timespec *res) 210 210 { 211 211 struct vdso_data *vdata = __get_datapage(); 212 212 ··· 248 248 249 249 notrace int __vdso_gettimeofday(struct __kernel_old_timeval *tv, struct timezone *tz) 250 250 { 251 - struct timespec ts; 251 + struct __kernel_old_timespec ts; 252 252 struct vdso_data *vdata; 253 253 int ret; 254 254
+12 -12
arch/sparc/vdso/vclock_gettime.c
··· 63 63 return (struct vvar_data *) ret; 64 64 } 65 65 66 - notrace static long vdso_fallback_gettime(long clock, struct timespec *ts) 66 + notrace static long vdso_fallback_gettime(long clock, struct __kernel_old_timespec *ts) 67 67 { 68 68 register long num __asm__("g1") = __NR_clock_gettime; 69 69 register long o0 __asm__("o0") = clock; ··· 144 144 } 145 145 146 146 notrace static __always_inline int do_realtime(struct vvar_data *vvar, 147 - struct timespec *ts) 147 + struct __kernel_old_timespec *ts) 148 148 { 149 149 unsigned long seq; 150 150 u64 ns; ··· 164 164 } 165 165 166 166 notrace static __always_inline int do_realtime_stick(struct vvar_data *vvar, 167 - struct timespec *ts) 167 + struct __kernel_old_timespec *ts) 168 168 { 169 169 unsigned long seq; 170 170 u64 ns; ··· 184 184 } 185 185 186 186 notrace static __always_inline int do_monotonic(struct vvar_data *vvar, 187 - struct timespec *ts) 187 + struct __kernel_old_timespec *ts) 188 188 { 189 189 unsigned long seq; 190 190 u64 ns; ··· 204 204 } 205 205 206 206 notrace static __always_inline int do_monotonic_stick(struct vvar_data *vvar, 207 - struct timespec *ts) 207 + struct __kernel_old_timespec *ts) 208 208 { 209 209 unsigned long seq; 210 210 u64 ns; ··· 224 224 } 225 225 226 226 notrace static int do_realtime_coarse(struct vvar_data *vvar, 227 - struct timespec *ts) 227 + struct __kernel_old_timespec *ts) 228 228 { 229 229 unsigned long seq; 230 230 ··· 237 237 } 238 238 239 239 notrace static int do_monotonic_coarse(struct vvar_data *vvar, 240 - struct timespec *ts) 240 + struct __kernel_old_timespec *ts) 241 241 { 242 242 unsigned long seq; 243 243 ··· 251 251 } 252 252 253 253 notrace int 254 - __vdso_clock_gettime(clockid_t clock, struct timespec *ts) 254 + __vdso_clock_gettime(clockid_t clock, struct __kernel_old_timespec *ts) 255 255 { 256 256 struct vvar_data *vvd = get_vvar_data(); 257 257 ··· 275 275 return vdso_fallback_gettime(clock, ts); 276 276 } 277 277 int 278 - clock_gettime(clockid_t, struct timespec *) 278 + clock_gettime(clockid_t, struct __kernel_old_timespec *) 279 279 __attribute__((weak, alias("__vdso_clock_gettime"))); 280 280 281 281 notrace int 282 - __vdso_clock_gettime_stick(clockid_t clock, struct timespec *ts) 282 + __vdso_clock_gettime_stick(clockid_t clock, struct __kernel_old_timespec *ts) 283 283 { 284 284 struct vvar_data *vvd = get_vvar_data(); 285 285 ··· 311 311 if (likely(vvd->vclock_mode != VCLOCK_NONE)) { 312 312 if (likely(tv != NULL)) { 313 313 union tstv_t { 314 - struct timespec ts; 314 + struct __kernel_old_timespec ts; 315 315 struct __kernel_old_timeval tv; 316 316 } *tstv = (union tstv_t *) tv; 317 317 do_realtime(vvd, &tstv->ts); ··· 347 347 if (likely(vvd->vclock_mode != VCLOCK_NONE)) { 348 348 if (likely(tv != NULL)) { 349 349 union tstv_t { 350 - struct timespec ts; 350 + struct __kernel_old_timespec ts; 351 351 struct __kernel_old_timeval tv; 352 352 } *tstv = (union tstv_t *) tv; 353 353 do_realtime_stick(vvd, &tstv->ts);
+2 -2
arch/x86/um/vdso/um_vdso.c
··· 13 13 #include <linux/getcpu.h> 14 14 #include <asm/unistd.h> 15 15 16 - int __vdso_clock_gettime(clockid_t clock, struct timespec *ts) 16 + int __vdso_clock_gettime(clockid_t clock, struct __kernel_old_timespec *ts) 17 17 { 18 18 long ret; 19 19 ··· 22 22 23 23 return ret; 24 24 } 25 - int clock_gettime(clockid_t, struct timespec *) 25 + int clock_gettime(clockid_t, struct __kernel_old_timespec *) 26 26 __attribute__((weak, alias("__vdso_clock_gettime"))); 27 27 28 28 int __vdso_gettimeofday(struct __kernel_old_timeval *tv, struct timezone *tz)