History

y2038: syscalls: change remaining timeval to __kernel_old_timeval

All of the remaining syscalls that pass a timeval (gettimeofday, utime, futimesat) can trivially be changed to pass a __kernel_old_timeval instead, which has a compatible layout, but avoids ambiguity with the timeval type in user space.

Arnd Bergmann committed 7 years ago

Commit 75d319c1 parent bdd565f7 files · +20 −19Browse files

Showing the changes to include/linux (1 of 7 files). Show all

Unified · Split

include/linux/syscalls.h+5−5
@@ -51,7 +51,7 @@ struct statx; · 50 unmodified lines
5151 struct __sysctl_args;
5252 struct sysinfo;
5353 struct timespec;
54−struct timeval;
54+struct __kernel_old_timeval;
5555 struct __kernel_timex;
5656 struct timezone;
5757 struct tms;
@@ -732,7 +732,7 @@ asmlinkage long sys_prctl(int option, unsigned long arg2, unsigned long arg3, · 674 unmodified lines
732732 asmlinkage long sys_getcpu(unsigned __user *cpu, unsigned __user *node, struct getcpu_cache __user *cache);
733733
734734 /* kernel/time.c */
735−asmlinkage long sys_gettimeofday(struct timeval __user *tv,
735+asmlinkage long sys_gettimeofday(struct __kernel_old_timeval __user *tv,
736736 struct timezone __user *tz);
737737 asmlinkage long sys_settimeofday(struct timeval __user *tv,
738738 struct timezone __user *tz);
@@ -1082,9 +1082,9 @@ asmlinkage long sys_time32(old_time32_t __user *tloc); · 343 unmodified lines
10821082 asmlinkage long sys_utime(char __user *filename,
10831083 struct utimbuf __user *times);
10841084 asmlinkage long sys_utimes(char __user *filename,
1085− struct timeval __user *utimes);
1085+ struct __kernel_old_timeval __user *utimes);
10861086 asmlinkage long sys_futimesat(int dfd, const char __user *filename,
1087− struct timeval __user *utimes);
1087+ struct __kernel_old_timeval __user *utimes);
10881088 #endif
10891089 asmlinkage long sys_futimesat_time32(unsigned int dfd,
10901090 const char __user *filename,
@@ -1098,7 +1098,7 @@ asmlinkage long sys_getdents(unsigned int fd, · 7 unmodified lines
10981098 struct linux_dirent __user *dirent,
10991099 unsigned int count);
11001100 asmlinkage long sys_select(int n, fd_set __user *inp, fd_set __user *outp,
1101− fd_set __user *exp, struct timeval __user *tvp);
1101+ fd_set __user *exp, struct __kernel_old_timeval __user *tvp);
11021102 asmlinkage long sys_poll(struct pollfd __user *ufds, unsigned int nfds,
11031103 int timeout);
11041104 asmlinkage long sys_epoll_wait(int epfd, struct epoll_event __user *events,

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t