Commit a4f7a300 authored by Arnd Bergmann's avatar Arnd Bergmann

y2038: Change sys_utimensat() to use __kernel_timespec

When 32-bit architectures get changed to support 64-bit time_t,
utimensat() needs to use the new __kernel_timespec structure as its
argument.

The older utime(), utimes() and futimesat() system calls don't need a
corresponding change as they are no longer used on C libraries that have
64-bit time support.

As we do for the other syscalls that have timespec arguments, we reuse
the 'compat' syscall entry points to implement the traditional four
interfaces, and only leave the new utimensat() as a native handler,
so that the same code gets used on both 32-bit and 64-bit kernels
on each syscall.
Signed-off-by: default avatarArnd Bergmann <arnd@arndb.de>
parent c5ba7e6c
...@@ -166,7 +166,7 @@ long do_utimes(int dfd, const char __user *filename, struct timespec64 *times, ...@@ -166,7 +166,7 @@ long do_utimes(int dfd, const char __user *filename, struct timespec64 *times,
} }
SYSCALL_DEFINE4(utimensat, int, dfd, const char __user *, filename, SYSCALL_DEFINE4(utimensat, int, dfd, const char __user *, filename,
struct timespec __user *, utimes, int, flags) struct __kernel_timespec __user *, utimes, int, flags)
{ {
struct timespec64 tstimes[2]; struct timespec64 tstimes[2];
......
...@@ -513,7 +513,8 @@ asmlinkage long sys_timerfd_gettime(int ufd, struct __kernel_itimerspec __user * ...@@ -513,7 +513,8 @@ asmlinkage long sys_timerfd_gettime(int ufd, struct __kernel_itimerspec __user *
/* fs/utimes.c */ /* fs/utimes.c */
asmlinkage long sys_utimensat(int dfd, const char __user *filename, asmlinkage long sys_utimensat(int dfd, const char __user *filename,
struct timespec __user *utimes, int flags); struct __kernel_timespec __user *utimes,
int flags);
/* kernel/acct.c */ /* kernel/acct.c */
asmlinkage long sys_acct(const char __user *name); asmlinkage long sys_acct(const char __user *name);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment