linux_dsm_epyc7002/drivers/input
Deepa Dinamani 152194fe9c Input: extend usable life of event timestamps to 2106 on 32 bit systems
The input events use struct timeval to store event time, unfortunately
this structure is not y2038 safe and is being replaced in kernel with
y2038 safe structures.

Because of ABI concerns we can not change the size or the layout of
structure input_event, so we opt to re-interpreting the 'seconds' part
of timestamp as an unsigned value, effectively doubling the range of
values, to year 2106.

Newer glibc that has support for 32 bit applications to use 64 bit
time_t supplies __USE_TIME_BITS64 define [1], that we can use to present
the userspace with updated input_event layout. The updated layout will
cause the compile time breakage, alerting applications and distributions
maintainers to the issue. Existing 32 binaries will continue working
without any changes until 2038.

Ultimately userspace applications should switch to using monotonic or
boot time clocks, as realtime clock is not very well suited for input
event timestamps as it can go backwards (see a80b83b7b8 "Input: evdev -
add CLOCK_BOOTTIME support" by by John Stultz). With monotonic clock the
practical range of reported times will always fit into the pair of 32
bit values, as we do not expect any system to stay up for a hundred
years without a single reboot.

[1] https://sourceware.org/glibc/wiki/Y2038ProofnessDesign

Suggested-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Deepa Dinamani <deepa.kernel@gmail.com>
Acked-by: Peter Hutterer <peter.hutterer@who-t.net>
Patchwork-Id: 10148083
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2018-01-09 16:40:30 -08:00
..
gameport License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
joystick Input: gamecon - mark expected switch fall-throughs 2017-11-10 10:29:55 -08:00
keyboard Linux 4.14-rc8 2017-11-07 18:11:56 -08:00
misc Input: extend usable life of event timestamps to 2106 on 32 bit systems 2018-01-09 16:40:30 -08:00
mouse Input: cyapa - remove duplicated macro definitions 2018-01-08 17:42:00 -08:00
rmi4 Input: synaptic_rmi4 - remove duplicate include in F34 2018-01-05 09:29:09 -08:00
serio Input: hp_sdc - convert to ktime_get() 2018-01-01 21:39:12 -08:00
tablet License cleanup: add SPDX license identifiers to some files 2017-11-02 10:04:46 -07:00
touchscreen Input: silead - add support for capactive home button found on some x86 tablets 2018-01-09 16:38:06 -08:00
apm-power.c
evbug.c
evdev.c Input: extend usable life of event timestamps to 2106 on 32 bit systems 2018-01-09 16:40:30 -08:00
ff-core.c
ff-memless.c
input-compat.c Input: extend usable life of event timestamps to 2106 on 32 bit systems 2018-01-09 16:40:30 -08:00
input-compat.h Input: extend usable life of event timestamps to 2106 on 32 bit systems 2018-01-09 16:40:30 -08:00
input-leds.c
input-mt.c
input-polldev.c
input.c Input: convert autorepeat timer to use timer_setup() 2017-11-03 12:45:23 -07:00
joydev.c
Kconfig
Makefile License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
matrix-keymap.c
mousedev.c
sparse-keymap.c Input: sparse-keymap - send sync event for KE_SW/KE_VSW 2017-11-03 12:47:48 -07:00