Skip to content
This repository has been archived by the owner on Aug 14, 2023. It is now read-only.

Commit

Permalink
time: Change types to new y2038 safe __kernel_* types
Browse files Browse the repository at this point in the history
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: [email protected]
Signed-off-by: Deepa Dinamani <[email protected]>
Signed-off-by: Arnd Bergmann <[email protected]>
  • Loading branch information
deepa-hub authored and arndb committed Apr 19, 2018
1 parent ea2ce8f commit 6d5b841
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 9 deletions.
6 changes: 3 additions & 3 deletions include/linux/syscalls.h
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
6 changes: 3 additions & 3 deletions kernel/time/posix-stubs.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down Expand Up @@ -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;
Expand All @@ -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,
Expand Down
6 changes: 3 additions & 3 deletions kernel/time/posix-timers.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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;
Expand Down Expand Up @@ -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;
Expand Down

0 comments on commit 6d5b841

Please sign in to comment.