summaryrefslogtreecommitdiff
path: root/include/uapi
diff options
context:
space:
mode:
authorArnd Bergmann <arnd@arndb.de>2019-12-13 14:06:58 -0800
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2020-01-14 20:07:01 +0100
commitc00eb2b2d0f4cb371146b30eb24c787cb5a60b86 (patch)
treed1894a393a4a5c9107ef738adffe58f921d4ebf3 /include/uapi
parentf5b9bfbe94a042a2e3806efa4c6e1b6ddb4292c4 (diff)
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>
Diffstat (limited to 'include/uapi')
-rw-r--r--include/uapi/linux/input.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/include/uapi/linux/input.h b/include/uapi/linux/input.h
index f056b2a00d5c..9a61c28ed3ae 100644
--- a/include/uapi/linux/input.h
+++ b/include/uapi/linux/input.h
@@ -34,6 +34,7 @@ struct input_event {
__kernel_ulong_t __sec;
#if defined(__sparc__) && defined(__arch64__)
unsigned int __usec;
+ unsigned int __pad;
#else
__kernel_ulong_t __usec;
#endif