diff options
Diffstat (limited to 'kernel/time/time.c')
-rw-r--r-- | kernel/time/time.c | 58 |
1 files changed, 29 insertions, 29 deletions
diff --git a/kernel/time/time.c b/kernel/time/time.c index de332250d6fa..f1983f468fe3 100644 --- a/kernel/time/time.c +++ b/kernel/time/time.c | |||
@@ -104,12 +104,12 @@ SYSCALL_DEFINE1(stime, time_t __user *, tptr) | |||
104 | #ifdef CONFIG_COMPAT | 104 | #ifdef CONFIG_COMPAT |
105 | #ifdef __ARCH_WANT_COMPAT_SYS_TIME | 105 | #ifdef __ARCH_WANT_COMPAT_SYS_TIME |
106 | 106 | ||
107 | /* compat_time_t is a 32 bit "long" and needs to get converted. */ | 107 | /* old_time32_t is a 32 bit "long" and needs to get converted. */ |
108 | COMPAT_SYSCALL_DEFINE1(time, compat_time_t __user *, tloc) | 108 | COMPAT_SYSCALL_DEFINE1(time, old_time32_t __user *, tloc) |
109 | { | 109 | { |
110 | compat_time_t i; | 110 | old_time32_t i; |
111 | 111 | ||
112 | i = (compat_time_t)ktime_get_real_seconds(); | 112 | i = (old_time32_t)ktime_get_real_seconds(); |
113 | 113 | ||
114 | if (tloc) { | 114 | if (tloc) { |
115 | if (put_user(i,tloc)) | 115 | if (put_user(i,tloc)) |
@@ -119,7 +119,7 @@ COMPAT_SYSCALL_DEFINE1(time, compat_time_t __user *, tloc) | |||
119 | return i; | 119 | return i; |
120 | } | 120 | } |
121 | 121 | ||
122 | COMPAT_SYSCALL_DEFINE1(stime, compat_time_t __user *, tptr) | 122 | COMPAT_SYSCALL_DEFINE1(stime, old_time32_t __user *, tptr) |
123 | { | 123 | { |
124 | struct timespec64 tv; | 124 | struct timespec64 tv; |
125 | int err; | 125 | int err; |
@@ -225,7 +225,7 @@ SYSCALL_DEFINE2(settimeofday, struct timeval __user *, tv, | |||
225 | } | 225 | } |
226 | 226 | ||
227 | #ifdef CONFIG_COMPAT | 227 | #ifdef CONFIG_COMPAT |
228 | COMPAT_SYSCALL_DEFINE2(gettimeofday, struct compat_timeval __user *, tv, | 228 | COMPAT_SYSCALL_DEFINE2(gettimeofday, struct old_timeval32 __user *, tv, |
229 | struct timezone __user *, tz) | 229 | struct timezone __user *, tz) |
230 | { | 230 | { |
231 | if (tv) { | 231 | if (tv) { |
@@ -244,7 +244,7 @@ COMPAT_SYSCALL_DEFINE2(gettimeofday, struct compat_timeval __user *, tv, | |||
244 | return 0; | 244 | return 0; |
245 | } | 245 | } |
246 | 246 | ||
247 | COMPAT_SYSCALL_DEFINE2(settimeofday, struct compat_timeval __user *, tv, | 247 | COMPAT_SYSCALL_DEFINE2(settimeofday, struct old_timeval32 __user *, tv, |
248 | struct timezone __user *, tz) | 248 | struct timezone __user *, tz) |
249 | { | 249 | { |
250 | struct timespec64 new_ts; | 250 | struct timespec64 new_ts; |
@@ -863,10 +863,10 @@ int put_timespec64(const struct timespec64 *ts, | |||
863 | } | 863 | } |
864 | EXPORT_SYMBOL_GPL(put_timespec64); | 864 | EXPORT_SYMBOL_GPL(put_timespec64); |
865 | 865 | ||
866 | int __compat_get_timespec64(struct timespec64 *ts64, | 866 | int __get_old_timespec32(struct timespec64 *ts64, |
867 | const struct compat_timespec __user *cts) | 867 | const struct old_timespec32 __user *cts) |
868 | { | 868 | { |
869 | struct compat_timespec ts; | 869 | struct old_timespec32 ts; |
870 | int ret; | 870 | int ret; |
871 | 871 | ||
872 | ret = copy_from_user(&ts, cts, sizeof(ts)); | 872 | ret = copy_from_user(&ts, cts, sizeof(ts)); |
@@ -879,33 +879,33 @@ int __compat_get_timespec64(struct timespec64 *ts64, | |||
879 | return 0; | 879 | return 0; |
880 | } | 880 | } |
881 | 881 | ||
882 | int __compat_put_timespec64(const struct timespec64 *ts64, | 882 | int __put_old_timespec32(const struct timespec64 *ts64, |
883 | struct compat_timespec __user *cts) | 883 | struct old_timespec32 __user *cts) |
884 | { | 884 | { |
885 | struct compat_timespec ts = { | 885 | struct old_timespec32 ts = { |
886 | .tv_sec = ts64->tv_sec, | 886 | .tv_sec = ts64->tv_sec, |
887 | .tv_nsec = ts64->tv_nsec | 887 | .tv_nsec = ts64->tv_nsec |
888 | }; | 888 | }; |
889 | return copy_to_user(cts, &ts, sizeof(ts)) ? -EFAULT : 0; | 889 | return copy_to_user(cts, &ts, sizeof(ts)) ? -EFAULT : 0; |
890 | } | 890 | } |
891 | 891 | ||
892 | int compat_get_timespec64(struct timespec64 *ts, const void __user *uts) | 892 | int get_old_timespec32(struct timespec64 *ts, const void __user *uts) |
893 | { | 893 | { |
894 | if (COMPAT_USE_64BIT_TIME) | 894 | if (COMPAT_USE_64BIT_TIME) |
895 | return copy_from_user(ts, uts, sizeof(*ts)) ? -EFAULT : 0; | 895 | return copy_from_user(ts, uts, sizeof(*ts)) ? -EFAULT : 0; |
896 | else | 896 | else |
897 | return __compat_get_timespec64(ts, uts); | 897 | return __get_old_timespec32(ts, uts); |
898 | } | 898 | } |
899 | EXPORT_SYMBOL_GPL(compat_get_timespec64); | 899 | EXPORT_SYMBOL_GPL(get_old_timespec32); |
900 | 900 | ||
901 | int compat_put_timespec64(const struct timespec64 *ts, void __user *uts) | 901 | int put_old_timespec32(const struct timespec64 *ts, void __user *uts) |
902 | { | 902 | { |
903 | if (COMPAT_USE_64BIT_TIME) | 903 | if (COMPAT_USE_64BIT_TIME) |
904 | return copy_to_user(uts, ts, sizeof(*ts)) ? -EFAULT : 0; | 904 | return copy_to_user(uts, ts, sizeof(*ts)) ? -EFAULT : 0; |
905 | else | 905 | else |
906 | return __compat_put_timespec64(ts, uts); | 906 | return __put_old_timespec32(ts, uts); |
907 | } | 907 | } |
908 | EXPORT_SYMBOL_GPL(compat_put_timespec64); | 908 | EXPORT_SYMBOL_GPL(put_old_timespec32); |
909 | 909 | ||
910 | int get_itimerspec64(struct itimerspec64 *it, | 910 | int get_itimerspec64(struct itimerspec64 *it, |
911 | const struct __kernel_itimerspec __user *uit) | 911 | const struct __kernel_itimerspec __user *uit) |
@@ -937,23 +937,23 @@ int put_itimerspec64(const struct itimerspec64 *it, | |||
937 | } | 937 | } |
938 | EXPORT_SYMBOL_GPL(put_itimerspec64); | 938 | EXPORT_SYMBOL_GPL(put_itimerspec64); |
939 | 939 | ||
940 | int get_compat_itimerspec64(struct itimerspec64 *its, | 940 | int get_old_itimerspec32(struct itimerspec64 *its, |
941 | const struct compat_itimerspec __user *uits) | 941 | const struct old_itimerspec32 __user *uits) |
942 | { | 942 | { |
943 | 943 | ||
944 | if (__compat_get_timespec64(&its->it_interval, &uits->it_interval) || | 944 | if (__get_old_timespec32(&its->it_interval, &uits->it_interval) || |
945 | __compat_get_timespec64(&its->it_value, &uits->it_value)) | 945 | __get_old_timespec32(&its->it_value, &uits->it_value)) |
946 | return -EFAULT; | 946 | return -EFAULT; |
947 | return 0; | 947 | return 0; |
948 | } | 948 | } |
949 | EXPORT_SYMBOL_GPL(get_compat_itimerspec64); | 949 | EXPORT_SYMBOL_GPL(get_old_itimerspec32); |
950 | 950 | ||
951 | int put_compat_itimerspec64(const struct itimerspec64 *its, | 951 | int put_old_itimerspec32(const struct itimerspec64 *its, |
952 | struct compat_itimerspec __user *uits) | 952 | struct old_itimerspec32 __user *uits) |
953 | { | 953 | { |
954 | if (__compat_put_timespec64(&its->it_interval, &uits->it_interval) || | 954 | if (__put_old_timespec32(&its->it_interval, &uits->it_interval) || |
955 | __compat_put_timespec64(&its->it_value, &uits->it_value)) | 955 | __put_old_timespec32(&its->it_value, &uits->it_value)) |
956 | return -EFAULT; | 956 | return -EFAULT; |
957 | return 0; | 957 | return 0; |
958 | } | 958 | } |
959 | EXPORT_SYMBOL_GPL(put_compat_itimerspec64); | 959 | EXPORT_SYMBOL_GPL(put_old_itimerspec32); |