| @@ -22,7 +22,7 @@ · 21 unmodified lines |
| 22 | 22 | */ |
| 23 | 23 | SYSCALL_DEFINE2(utime, char __user *, filename, struct utimbuf __user *, times) |
| 24 | 24 | { |
| 25 | | − struct timespec tv[2]; |
| 25 | + struct timespec64 tv[2]; |
| 26 | 26 | |
| 27 | 27 | if (times) { |
| 28 | 28 | if (get_user(tv[0].tv_sec, ×->actime) || |
| @@ -44,7 +44,7 @@ static bool nsec_valid(long nsec) · 15 unmodified lines |
| 44 | 44 | return nsec >= 0 && nsec <= 999999999; |
| 45 | 45 | } |
| 46 | 46 | |
| 47 | | −static int utimes_common(const struct path *path, struct timespec *times) |
| 47 | +static int utimes_common(const struct path *path, struct timespec64 *times) |
| 48 | 48 | { |
| 49 | 49 | int error; |
| 50 | 50 | struct iattr newattrs; |
| @@ -115,7 +115,7 @@ out: · 64 unmodified lines |
| 115 | 115 | * must be owner or have write permission. |
| 116 | 116 | * Else, update from *times, must be owner or super user. |
| 117 | 117 | */ |
| 118 | | −long do_utimes(int dfd, const char __user *filename, struct timespec *times, |
| 118 | +long do_utimes(int dfd, const char __user *filename, struct timespec64 *times, |
| 119 | 119 | int flags) |
| 120 | 120 | { |
| 121 | 121 | int error = -EINVAL; |
| @@ -167,10 +167,11 @@ out: · 45 unmodified lines |
| 167 | 167 | SYSCALL_DEFINE4(utimensat, int, dfd, const char __user *, filename, |
| 168 | 168 | struct timespec __user *, utimes, int, flags) |
| 169 | 169 | { |
| 170 | | − struct timespec tstimes[2]; |
| 170 | + struct timespec64 tstimes[2]; |
| 171 | 171 | |
| 172 | 172 | if (utimes) { |
| 173 | | − if (copy_from_user(&tstimes, utimes, sizeof(tstimes))) |
| 173 | + if ((get_timespec64(&tstimes[0], &utimes[0]) || |
| 174 | + get_timespec64(&tstimes[1], &utimes[1]))) |
| 174 | 175 | return -EFAULT; |
| 175 | 176 | |
| 176 | 177 | /* Nothing to do, we must not even check the path. */ |
| @@ -186,7 +187,7 @@ SYSCALL_DEFINE3(futimesat, int, dfd, const char __user *, filename, · 9 unmodified lines |
| 186 | 187 | struct timeval __user *, utimes) |
| 187 | 188 | { |
| 188 | 189 | struct timeval times[2]; |
| 189 | | − struct timespec tstimes[2]; |
| 190 | + struct timespec64 tstimes[2]; |
| 190 | 191 | |
| 191 | 192 | if (utimes) { |
| 192 | 193 | if (copy_from_user(×, utimes, sizeof(times))) |
| @@ -224,7 +225,7 @@ SYSCALL_DEFINE2(utimes, char __user *, filename, · 31 unmodified lines |
| 224 | 225 | COMPAT_SYSCALL_DEFINE2(utime, const char __user *, filename, |
| 225 | 226 | struct compat_utimbuf __user *, t) |
| 226 | 227 | { |
| 227 | | − struct timespec tv[2]; |
| 228 | + struct timespec64 tv[2]; |
| 228 | 229 | |
| 229 | 230 | if (t) { |
| 230 | 231 | if (get_user(tv[0].tv_sec, &t->actime) || |
| @@ -238,11 +239,11 @@ COMPAT_SYSCALL_DEFINE2(utime, const char __user *, filename, · 7 unmodified lines |
| 238 | 239 | |
| 239 | 240 | COMPAT_SYSCALL_DEFINE4(utimensat, unsigned int, dfd, const char __user *, filename, struct compat_timespec __user *, t, int, flags) |
| 240 | 241 | { |
| 241 | | − struct timespec tv[2]; |
| 242 | + struct timespec64 tv[2]; |
| 242 | 243 | |
| 243 | 244 | if (t) { |
| 244 | | − if (compat_get_timespec(&tv[0], &t[0]) || |
| 245 | | − compat_get_timespec(&tv[1], &t[1])) |
| 245 | + if (compat_get_timespec64(&tv[0], &t[0]) || |
| 246 | + compat_get_timespec64(&tv[1], &t[1])) |
| 246 | 247 | return -EFAULT; |
| 247 | 248 | |
| 248 | 249 | if (tv[0].tv_nsec == UTIME_OMIT && tv[1].tv_nsec == UTIME_OMIT) |
| @@ -253,7 +254,7 @@ COMPAT_SYSCALL_DEFINE4(utimensat, unsigned int, dfd, const char __user *, filena · 4 unmodified lines |
| 253 | 254 | |
| 254 | 255 | COMPAT_SYSCALL_DEFINE3(futimesat, unsigned int, dfd, const char __user *, filename, struct compat_timeval __user *, t) |
| 255 | 256 | { |
| 256 | | − struct timespec tv[2]; |
| 257 | + struct timespec64 tv[2]; |
| 257 | 258 | |
| 258 | 259 | if (t) { |
| 259 | 260 | if (get_user(tv[0].tv_sec, &t[0].tv_sec) || |