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
51struct __sysctl_args;51struct __sysctl_args;
52struct sysinfo;52struct sysinfo;
53struct timespec;53struct timespec;
54struct timeval;54struct __kernel_old_timeval;
55struct __kernel_timex;55struct __kernel_timex;
56struct timezone;56struct timezone;
57struct tms;57struct tms;
@@ -732,7 +732,7 @@ asmlinkage long sys_prctl(int option, unsigned long arg2, unsigned long arg3, · 674 unmodified lines
732asmlinkage long sys_getcpu(unsigned __user *cpu, unsigned __user *node, struct getcpu_cache __user *cache);732asmlinkage long sys_getcpu(unsigned __user *cpu, unsigned __user *node, struct getcpu_cache __user *cache);
733 733
734/* kernel/time.c */734/* kernel/time.c */
735asmlinkage long sys_gettimeofday(struct timeval __user *tv,735asmlinkage long sys_gettimeofday(struct __kernel_old_timeval __user *tv,
736 struct timezone __user *tz);736 struct timezone __user *tz);
737asmlinkage long sys_settimeofday(struct timeval __user *tv,737asmlinkage long sys_settimeofday(struct timeval __user *tv,
738 struct timezone __user *tz);738 struct timezone __user *tz);
@@ -1082,9 +1082,9 @@ asmlinkage long sys_time32(old_time32_t __user *tloc); · 343 unmodified lines
1082asmlinkage long sys_utime(char __user *filename,1082asmlinkage long sys_utime(char __user *filename,
1083 struct utimbuf __user *times);1083 struct utimbuf __user *times);
1084asmlinkage long sys_utimes(char __user *filename,1084asmlinkage long sys_utimes(char __user *filename,
1085 struct timeval __user *utimes);1085 struct __kernel_old_timeval __user *utimes);
1086asmlinkage long sys_futimesat(int dfd, const char __user *filename,1086asmlinkage long sys_futimesat(int dfd, const char __user *filename,
1087 struct timeval __user *utimes);1087 struct __kernel_old_timeval __user *utimes);
1088#endif1088#endif
1089asmlinkage long sys_futimesat_time32(unsigned int dfd,1089asmlinkage long sys_futimesat_time32(unsigned int dfd,
1090 const char __user *filename,1090 const char __user *filename,
@@ -1098,7 +1098,7 @@ asmlinkage long sys_getdents(unsigned int fd, · 7 unmodified lines
1098 struct linux_dirent __user *dirent,1098 struct linux_dirent __user *dirent,
1099 unsigned int count);1099 unsigned int count);
1100asmlinkage long sys_select(int n, fd_set __user *inp, fd_set __user *outp,1100asmlinkage 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);
1102asmlinkage long sys_poll(struct pollfd __user *ufds, unsigned int nfds,1102asmlinkage long sys_poll(struct pollfd __user *ufds, unsigned int nfds,
1103 int timeout);1103 int timeout);
1104asmlinkage long sys_epoll_wait(int epfd, struct epoll_event __user *events,1104asmlinkage 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