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. Acked-by: Christian Brauner <christian.brauner@ubuntu.com> Acked-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
This commit is contained in:
@@ -51,7 +51,7 @@ struct statx;
|
||||
struct __sysctl_args;
|
||||
struct sysinfo;
|
||||
struct timespec;
|
||||
struct timeval;
|
||||
struct __kernel_old_timeval;
|
||||
struct __kernel_timex;
|
||||
struct timezone;
|
||||
struct tms;
|
||||
@@ -732,7 +732,7 @@ asmlinkage long sys_prctl(int option, unsigned long arg2, unsigned long arg3,
|
||||
asmlinkage long sys_getcpu(unsigned __user *cpu, unsigned __user *node, struct getcpu_cache __user *cache);
|
||||
|
||||
/* kernel/time.c */
|
||||
asmlinkage long sys_gettimeofday(struct timeval __user *tv,
|
||||
asmlinkage long sys_gettimeofday(struct __kernel_old_timeval __user *tv,
|
||||
struct timezone __user *tz);
|
||||
asmlinkage long sys_settimeofday(struct timeval __user *tv,
|
||||
struct timezone __user *tz);
|
||||
@@ -1082,9 +1082,9 @@ asmlinkage long sys_time32(old_time32_t __user *tloc);
|
||||
asmlinkage long sys_utime(char __user *filename,
|
||||
struct utimbuf __user *times);
|
||||
asmlinkage long sys_utimes(char __user *filename,
|
||||
struct timeval __user *utimes);
|
||||
struct __kernel_old_timeval __user *utimes);
|
||||
asmlinkage long sys_futimesat(int dfd, const char __user *filename,
|
||||
struct timeval __user *utimes);
|
||||
struct __kernel_old_timeval __user *utimes);
|
||||
#endif
|
||||
asmlinkage long sys_futimesat_time32(unsigned int dfd,
|
||||
const char __user *filename,
|
||||
@@ -1098,7 +1098,7 @@ asmlinkage long sys_getdents(unsigned int fd,
|
||||
struct linux_dirent __user *dirent,
|
||||
unsigned int count);
|
||||
asmlinkage long sys_select(int n, fd_set __user *inp, fd_set __user *outp,
|
||||
fd_set __user *exp, struct timeval __user *tvp);
|
||||
fd_set __user *exp, struct __kernel_old_timeval __user *tvp);
|
||||
asmlinkage long sys_poll(struct pollfd __user *ufds, unsigned int nfds,
|
||||
int timeout);
|
||||
asmlinkage long sys_epoll_wait(int epfd, struct epoll_event __user *events,
|
||||
|
Reference in New Issue
Block a user