aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/time.h
diff options
context:
space:
mode:
authorDeepa Dinamani <deepa.kernel@gmail.com>2018-03-13 21:03:31 -0700
committerArnd Bergmann <arnd@arndb.de>2018-04-19 13:31:39 +0200
commitea2ce8f3514e2074a1910d8d721842d7341d5c81 (patch)
tree6cd2f49fc736fa05993aaec0f6827c31aba9a617 /include/linux/time.h
parenttime: Add new y2038 safe __kernel_timespec (diff)
downloadlinux-dev-ea2ce8f3514e2074a1910d8d721842d7341d5c81.tar.xz
linux-dev-ea2ce8f3514e2074a1910d8d721842d7341d5c81.zip
time: Fix get_timespec64() for y2038 safe compat interfaces
get/put_timespec64() interfaces will eventually be used for conversions between the new y2038 safe struct __kernel_timespec and struct timespec64. The new y2038 safe syscalls have a common entry for native and compat interfaces. On compat interfaces, the high order bits of nanoseconds should be zeroed out. This is because the application code or the libc do not guarantee zeroing of these. If used without zeroing, kernel might be at risk of using timespec values incorrectly. Note that clearing of bits is dependent on CONFIG_64BIT_TIME for now. This is until COMPAT_USE_64BIT_TIME has been handled correctly. x86 will be the first architecture that will use the CONFIG_64BIT_TIME. Signed-off-by: Deepa Dinamani <deepa.kernel@gmail.com> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Diffstat (limited to 'include/linux/time.h')
-rw-r--r--include/linux/time.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/include/linux/time.h b/include/linux/time.h
index 4b62a2c0a661..aed74463592d 100644
--- a/include/linux/time.h
+++ b/include/linux/time.h
@@ -10,9 +10,9 @@
extern struct timezone sys_tz;
int get_timespec64(struct timespec64 *ts,
- const struct timespec __user *uts);
+ const struct __kernel_timespec __user *uts);
int put_timespec64(const struct timespec64 *ts,
- struct timespec __user *uts);
+ struct __kernel_timespec __user *uts);
int get_itimerspec64(struct itimerspec64 *it,
const struct itimerspec __user *uit);
int put_itimerspec64(const struct itimerspec64 *it,