[Y2038] [PATCH v4 01/10] compat: Make compat helpers independent of CONFIG_COMPAT

2018-03-12 Thread Deepa Dinamani
Many of the compat time syscalls are also repurposed as 32 bit native syscalls to provide backward compatibility while adding new y2038 safe sycalls. Enabling the helpers makes this possible. Signed-off-by: Arnd Bergmann Signed-off-by: Deepa Dinamani ---

[Y2038] [PATCH v4 04/10] arch: introduce CONFIG_64BIT_TIME

2018-03-12 Thread Deepa Dinamani
There are a total of 53 system calls (aside from ioctl) that pass a time_t or derived data structure as an argument, and in order to extend time_t to 64-bit, we have to replace them with new system calls and keep providing backwards compatibility. To avoid adding completely new and untested code

[Y2038] [PATCH v4 05/10] arch: Introduce CONFIG_COMPAT_32BIT_TIME

2018-03-12 Thread Deepa Dinamani
Compat functions are now used to support 32 bit time_t in compat mode on 64 bit architectures and in native mode on 32 bit architectures. Introduce COMPAT_32BIT_TIME to conditionally compile these functions. Note that turning off 32 bit time_t support requires more changes on architecture side.

[Y2038] [PATCH v4 06/10] posix-clocks: Make compat syscalls depend on CONFIG_COMPAT_32BIT_TIME

2018-03-12 Thread Deepa Dinamani
clock_gettime, clock_settime, clock_getres and clock_nanosleep compat syscalls are also repurposed to provide backward compatibility to support 32 bit time_t on 32 bit systems. Note that nanosleep compat syscall will also be treated the same way as the above syscalls as it shares common handler

[Y2038] [PATCH v4 08/10] fix get_timespec64() for y2038 safe compat interfaces

2018-03-12 Thread Deepa Dinamani
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

[Y2038] [PATCH v4 03/10] compat: enable compat_get/put_timespec64 always

2018-03-12 Thread Deepa Dinamani
These functions are used in the repurposed compat syscalls to provide backward compatibility for using 32 bit time_t on 32 bit systems. Signed-off-by: Deepa Dinamani --- include/linux/compat.h | 2 -- include/linux/compat_time.h | 4 kernel/compat.c

[Y2038] [PATCH v4 07/10] include: Add new y2038 safe __kernel_timespec

2018-03-12 Thread Deepa Dinamani
The new struct __kernel_timespec is similar to current internal kernel struct timespec64 on 64 bit architecture. The compat structure however is similar to below on little endian systems (padding and tv_nsec are switched for big endian systems): typedef s32compat_long_t; typedef s64

[Y2038] [PATCH v4 09/10] change time types to new y2038 safe __kernel_* types

2018-03-12 Thread Deepa Dinamani
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-...@vger.kernel.org Signed-off-by: Deepa Dinamani

[Y2038] [PATCH v4 10/10] nanosleep: change time types to safe __kernel_* types

2018-03-12 Thread Deepa Dinamani
Change over clock_nanosleep syscalls to use y2038 safe __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. Note that nanosleep syscall is deprecated and does not have a plan for making it

Re: [Y2038] [PATCH v3 02/10] include: Move compat_timespec/ timeval to compat_time.h

2018-03-12 Thread Deepa Dinamani
I posted the updated series. I fixed up the order of include files where I could find some order. There have been other commits that used scripts to do such replacements and have already stomped on the order. For example: commit 7c0f6ba682b9c7632072ffbedf8d328c8f3c42ba Author: Linus Torvalds