aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/time/time.c
diff options
context:
space:
mode:
authorDeepa Dinamani <deepa.kernel@gmail.com>2018-06-17 01:11:42 -0400
committerThomas Gleixner <tglx@linutronix.de>2018-06-24 08:39:46 -0400
commitd0dd63a8aee1ef89f2e48e554b796b9f9e4fcadb (patch)
tree3d7489da71f07ffa8926fd0584597c2a49eb6127 /kernel/time/time.c
parentdc1b7b6ca9d5fa905c164a667086d8a3d8605875 (diff)
time: Introduce struct __kernel_itimerspec
struct itimerspec is not y2038-safe. Introduce a new struct __kernel_itimerspec based on the kernel internal y2038-safe struct itimerspec64. The definition of struct __kernel_itimerspec includes two struct __kernel_timespec. Since struct __kernel_timespec has the same representation in native and compat modes, so does struct __kernel_itimerspec. This helps have a common entry point for syscalls using struct __kernel_itimerspec. New y2038-safe syscalls will use this new type. Since most of the new syscalls are just an update to the native syscalls with the type update, place the new definition under CONFIG_64BIT_TIME. This helps architectures that do not support the above config to keep using the old definition of struct itimerspec. Also change the get/put_itimerspec64 to use struct__kernel_itimerspec. This will help 32 bit architectures to use the new syscalls when architectures select CONFIG_64BIT_TIME. Signed-off-by: Deepa Dinamani <deepa.kernel@gmail.com> Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Cc: arnd@arndb.de Cc: viro@zeniv.linux.org.uk Cc: linux-fsdevel@vger.kernel.org Cc: linux-api@vger.kernel.org Cc: y2038@lists.linaro.org Link: https://lkml.kernel.org/r/20180617051144.29756-2-deepa.kernel@gmail.com
Diffstat (limited to 'kernel/time/time.c')
-rw-r--r--kernel/time/time.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/kernel/time/time.c b/kernel/time/time.c
index b1225db61eb2..c0195225fdce 100644
--- a/kernel/time/time.c
+++ b/kernel/time/time.c
@@ -927,7 +927,7 @@ int compat_put_timespec64(const struct timespec64 *ts, void __user *uts)
927EXPORT_SYMBOL_GPL(compat_put_timespec64); 927EXPORT_SYMBOL_GPL(compat_put_timespec64);
928 928
929int get_itimerspec64(struct itimerspec64 *it, 929int get_itimerspec64(struct itimerspec64 *it,
930 const struct itimerspec __user *uit) 930 const struct __kernel_itimerspec __user *uit)
931{ 931{
932 int ret; 932 int ret;
933 933
@@ -942,7 +942,7 @@ int get_itimerspec64(struct itimerspec64 *it,
942EXPORT_SYMBOL_GPL(get_itimerspec64); 942EXPORT_SYMBOL_GPL(get_itimerspec64);
943 943
944int put_itimerspec64(const struct itimerspec64 *it, 944int put_itimerspec64(const struct itimerspec64 *it,
945 struct itimerspec __user *uit) 945 struct __kernel_itimerspec __user *uit)
946{ 946{
947 int ret; 947 int ret;
948 948