diff options
author | Al Viro <viro@zeniv.linux.org.uk> | 2017-06-07 04:42:40 -0400 |
---|---|---|
committer | Thomas Gleixner <tglx@linutronix.de> | 2017-06-13 18:00:45 -0400 |
commit | b180db2c8ca6692a10b79631cadc18d03303d494 (patch) | |
tree | ba94924a438f4c504dd1709647f299cf5081a2c2 /kernel/compat.c | |
parent | 2482097c6c0f01ad74c9b2cff120a519ac59846e (diff) |
time: Move compat_time()/stime() to native
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Cc: John Stultz <john.stultz@linaro.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Link: http://lkml.kernel.org/r/20170607084241.28657-15-viro@ZenIV.linux.org.uk
Diffstat (limited to 'kernel/compat.c')
-rw-r--r-- | kernel/compat.c | 40 |
1 files changed, 0 insertions, 40 deletions
diff --git a/kernel/compat.c b/kernel/compat.c index 4544eb63edfa..aa7b9a27f9e7 100644 --- a/kernel/compat.c +++ b/kernel/compat.c | |||
@@ -739,46 +739,6 @@ COMPAT_SYSCALL_DEFINE4(rt_sigtimedwait, compat_sigset_t __user *, uthese, | |||
739 | return ret; | 739 | return ret; |
740 | } | 740 | } |
741 | 741 | ||
742 | #ifdef __ARCH_WANT_COMPAT_SYS_TIME | ||
743 | |||
744 | /* compat_time_t is a 32 bit "long" and needs to get converted. */ | ||
745 | |||
746 | COMPAT_SYSCALL_DEFINE1(time, compat_time_t __user *, tloc) | ||
747 | { | ||
748 | compat_time_t i; | ||
749 | struct timeval tv; | ||
750 | |||
751 | do_gettimeofday(&tv); | ||
752 | i = tv.tv_sec; | ||
753 | |||
754 | if (tloc) { | ||
755 | if (put_user(i,tloc)) | ||
756 | return -EFAULT; | ||
757 | } | ||
758 | force_successful_syscall_return(); | ||
759 | return i; | ||
760 | } | ||
761 | |||
762 | COMPAT_SYSCALL_DEFINE1(stime, compat_time_t __user *, tptr) | ||
763 | { | ||
764 | struct timespec tv; | ||
765 | int err; | ||
766 | |||
767 | if (get_user(tv.tv_sec, tptr)) | ||
768 | return -EFAULT; | ||
769 | |||
770 | tv.tv_nsec = 0; | ||
771 | |||
772 | err = security_settime(&tv, NULL); | ||
773 | if (err) | ||
774 | return err; | ||
775 | |||
776 | do_settimeofday(&tv); | ||
777 | return 0; | ||
778 | } | ||
779 | |||
780 | #endif /* __ARCH_WANT_COMPAT_SYS_TIME */ | ||
781 | |||
782 | #ifdef CONFIG_NUMA | 742 | #ifdef CONFIG_NUMA |
783 | COMPAT_SYSCALL_DEFINE6(move_pages, pid_t, pid, compat_ulong_t, nr_pages, | 743 | COMPAT_SYSCALL_DEFINE6(move_pages, pid_t, pid, compat_ulong_t, nr_pages, |
784 | compat_uptr_t __user *, pages32, | 744 | compat_uptr_t __user *, pages32, |