Input: input_event - fix struct padding on sparc64
authorArnd Bergmann <arnd@arndb.de>
Fri, 13 Dec 2019 22:06:58 +0000 (14:06 -0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 14 Jan 2020 19:08:24 +0000 (20:08 +0100)
commit854ac5dee5be03a280faf1a4f7907b4e9a4b3be1
treeea8d8e8633f9d593c58a04f23fb994a1967a80da
parent39f711b69799c49e0e385494b9b8c0787f51293f
Input: input_event - fix struct padding on sparc64

commit f729a1b0f8df7091cea3729fc0e414f5326e1163 upstream.

Going through all uses of timeval, I noticed that we screwed up
input_event in the previous attempts to fix it:

The time fields now match between kernel and user space, but all following
fields are in the wrong place.

Add the required padding that is implied by the glibc timeval definition
to fix the layout, and use a struct initializer to avoid leaking kernel
stack data.

Fixes: 141e5dcaa735 ("Input: input_event - fix the CONFIG_SPARC64 mixup")
Fixes: 2e746942ebac ("Input: input_event - provide override for sparc64")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Link: https://lore.kernel.org/r/20191213204936.3643476-2-arnd@arndb.de
Cc: stable@vger.kernel.org
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/input/evdev.c
drivers/input/misc/uinput.c
include/uapi/linux/input.h