]> git.proxmox.com Git - mirror_ubuntu-jammy-kernel.git/commitdiff
time: Change types to new y2038 safe __kernel_* types
authorDeepa Dinamani <deepa.kernel@gmail.com>
Wed, 14 Mar 2018 04:03:32 +0000 (21:03 -0700)
committerArnd Bergmann <arnd@arndb.de>
Thu, 19 Apr 2018 11:31:49 +0000 (13:31 +0200)
Change over clock_settime, clock_gettime and clock_getres
syscalls to use __kernel_timespec times. This will enable
changing over of these syscalls to use new y2038 safe syscalls
when the architectures define the CONFIG_64BIT_TIME.

Cc: linux-api@vger.kernel.org
Signed-off-by: Deepa Dinamani <deepa.kernel@gmail.com>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
include/linux/syscalls.h
kernel/time/posix-stubs.c
kernel/time/posix-timers.c

index 70fcda1a9049a8c5566176f930c1fc40db319de6..40bb40d1741b0e01c4af5f7f2ba91ad0332b835d 100644 (file)
@@ -567,11 +567,11 @@ asmlinkage long sys_timer_settime(timer_t timer_id, int flags,
                                struct itimerspec __user *old_setting);
 asmlinkage long sys_timer_delete(timer_t timer_id);
 asmlinkage long sys_clock_settime(clockid_t which_clock,
-                               const struct timespec __user *tp);
+                               const struct __kernel_timespec __user *tp);
 asmlinkage long sys_clock_gettime(clockid_t which_clock,
-                               struct timespec __user *tp);
+                               struct __kernel_timespec __user *tp);
 asmlinkage long sys_clock_getres(clockid_t which_clock,
-                               struct timespec __user *tp);
+                               struct __kernel_timespec __user *tp);
 asmlinkage long sys_clock_nanosleep(clockid_t which_clock, int flags,
                                const struct timespec __user *rqtp,
                                struct timespec __user *rmtp);
index b605b0a40ba99f8f77231b78f5215b7715d47251..4e76021cea7f3c543283f0e9d58f4ca54808ef9c 100644 (file)
@@ -59,7 +59,7 @@ SYS_NI(alarm);
  */
 
 SYSCALL_DEFINE2(clock_settime, const clockid_t, which_clock,
-               const struct timespec __user *, tp)
+               const struct __kernel_timespec __user *, tp)
 {
        struct timespec64 new_tp;
 
@@ -92,7 +92,7 @@ int do_clock_gettime(clockid_t which_clock, struct timespec64 *tp)
        return 0;
 }
 SYSCALL_DEFINE2(clock_gettime, const clockid_t, which_clock,
-               struct timespec __user *, tp)
+               struct __kernel_timespec __user *, tp)
 {
        int ret;
        struct timespec64 kernel_tp;
@@ -106,7 +106,7 @@ SYSCALL_DEFINE2(clock_gettime, const clockid_t, which_clock,
        return 0;
 }
 
-SYSCALL_DEFINE2(clock_getres, const clockid_t, which_clock, struct timespec __user *, tp)
+SYSCALL_DEFINE2(clock_getres, const clockid_t, which_clock, struct __kernel_timespec __user *, tp)
 {
        struct timespec64 rtn_tp = {
                .tv_sec = 0,
index 147d79e2cef51821648e0e2c98b79074eb673648..93b2c38ad0f3511c840fccb2ce992189bea6b8a0 100644 (file)
@@ -1041,7 +1041,7 @@ void exit_itimers(struct signal_struct *sig)
 }
 
 SYSCALL_DEFINE2(clock_settime, const clockid_t, which_clock,
-               const struct timespec __user *, tp)
+               const struct __kernel_timespec __user *, tp)
 {
        const struct k_clock *kc = clockid_to_kclock(which_clock);
        struct timespec64 new_tp;
@@ -1056,7 +1056,7 @@ SYSCALL_DEFINE2(clock_settime, const clockid_t, which_clock,
 }
 
 SYSCALL_DEFINE2(clock_gettime, const clockid_t, which_clock,
-               struct timespec __user *,tp)
+               struct __kernel_timespec __user *, tp)
 {
        const struct k_clock *kc = clockid_to_kclock(which_clock);
        struct timespec64 kernel_tp;
@@ -1097,7 +1097,7 @@ SYSCALL_DEFINE2(clock_adjtime, const clockid_t, which_clock,
 }
 
 SYSCALL_DEFINE2(clock_getres, const clockid_t, which_clock,
-               struct timespec __user *, tp)
+               struct __kernel_timespec __user *, tp)
 {
        const struct k_clock *kc = clockid_to_kclock(which_clock);
        struct timespec64 rtn_tp;