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

2018-01-15 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

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

2018-01-15 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 v3 06/10] posix-clocks: Make compat syscalls depend on CONFIG_COMPAT_32BIT_TIME

2018-01-15 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 v3 07/10] include: Add new y2038 safe __kernel_timespec

2018-01-15 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 v3 02/10] include: Move compat_timespec/ timeval to compat_time.h

2018-01-15 Thread Deepa Dinamani
All the current architecture specific defines for these are the same. Refactor these common defines to a common header file. The new common linux/compat_time.h is also useful as it will eventually be used to hold all the defines that are needed for compat time types that support non y2038 safe

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

2018-01-15 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 v3 04/10] arch: introduce CONFIG_64BIT_TIME

2018-01-15 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 v3 03/10] compat: enable compat_get/put_timespec64 always

2018-01-15 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 v3 01/10] compat: Make compat helpers independent of CONFIG_COMPAT

2018-01-15 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 v3 00/10] posix_clocks: Prepare syscalls for 64 bit time_t conversion

2018-01-15 Thread Deepa Dinamani
The series is a preparation series for individual architectures to use 64 bit time_t syscalls in compat and 32 bit emulation modes. This is a follow up to the series Arnd Bergmann posted: https://sourceware.org/ml/libc-alpha/2015-05/msg00070.html [1] Big picture is as per the lwn article:

[Y2038] [PATCH evemu] evemu: Update struct input_event

2018-01-15 Thread Deepa Dinamani
The struct input_event is not y2038 safe. Update the struct according to the kernel patch: https://lkml.org/lkml/2018/1/6/324 Signed-off-by: Deepa Dinamani --- src/evemu.c | 35 +++ 1 file changed, 23 insertions(+), 12 deletions(-) diff

[Y2038] [PATCH] Update struct input_event

2018-01-15 Thread Deepa Dinamani
The struct input_event is not y2038 safe. Update the struct according to the kernel patch: https://lkml.org/lkml/2018/1/6/324 Signed-off-by: Deepa Dinamani --- src/core.c| 3 ++- test/mtdev-test.c | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff

[Y2038] [PATCH libevdev] Update struct input_event

2018-01-15 Thread Deepa Dinamani
The struct input_event is not y2038 safe. Update the struct according to the kernel patch: https://lkml.org/lkml/2018/1/6/324 Signed-off-by: Deepa Dinamani --- include/linux/input.h | 13 - libevdev/libevdev.c | 6 -- test/test-libevdev-init.c

[Y2038] [PATCH] Update struct input_event

2018-01-15 Thread Deepa Dinamani
The struct input_event is not y2038 safe. Update the struct according to the kernel patch: https://lkml.org/lkml/2018/1/6/324 Signed-off-by: Deepa Dinamani --- include/linux/input.h | 14 +- src/evdev-mt-touchpad.c | 11 +-- src/evdev-tablet.c

[Y2038] [PATCH] Update struct input_event

2018-01-15 Thread Deepa Dinamani
The struct input_event is not y2038 safe. Update the struct according to the kernel patch: https://lkml.org/lkml/2018/1/6/324 Signed-off-by: Deepa Dinamani --- include/linux/input.h | 14 +- src/evdev-mt-touchpad.c | 11 +-- src/evdev-tablet.c