coreboot-kgpe-d16/payloads
Julius Werner 3faa2c802e libpayload: usbhid: Zero-initialize all parts of usbhid instance struct
The USBHID driver zero-initializes some but not all of the fields in its
usbhid_inst_t structure. This is a problem because under some
circumstances, some of the uninitialized fields may be read and lead to
incorrect behavior. Some (broken) USB keyboards keep sending reports
that contain all zeroes even when they have no new keys... these usually
get silently ignored, but if the usbhid_inst_t structure is in an
inconsistent state where 'previous' is zeroed out but 'lastkeypress'
is non-zero because it wasn't properly initialized, these reports will
be interpreted as keyrepeats of the bogus 'lastkeypress'. This patch
changes the code to just xzalloc() the whole structure so we won't have
to worry about initialization issues anymore.

Change-Id: Ic987de2daaceaad2ae401a1e12b1bee397f802ee
Signed-off-by: Julius Werner <jwerner@chromium.org>
Reviewed-on: https://review.coreboot.org/23766
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
Reviewed-by: Patrick Georgi <pgeorgi@google.com>
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
2018-02-16 00:08:26 +00:00
..
bayou payloads: change coreboot to lowercase 2017-06-07 12:08:55 +02:00
coreinfo payloads/coreinfo: Free buffer before returning 2017-09-11 16:23:52 +00:00
external tianocore: fix Makefile to build a custom revision or branch 2018-02-15 18:30:23 +00:00
libpayload libpayload: usbhid: Zero-initialize all parts of usbhid instance struct 2018-02-16 00:08:26 +00:00
nvramcui payloads/nvramcui/payload.sh: Fix shellcheck warnings 2018-01-24 23:01:35 +00:00
Kconfig payloads: Add an option to compress secondary payloads 2018-02-10 23:57:06 +00:00
Makefile.inc payloads: Add an option to compress secondary payloads 2018-02-10 23:57:06 +00:00