coreboot-kgpe-d16/payloads/libpayload/drivers
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
..
serial
storage libpayload/storage: Add Sunrise Point AHCI PCI id 2017-09-02 15:33:50 +00:00
timer libpayload: allow x86 devices to provide non-tsc implementation 2018-01-26 00:23:28 +00:00
udc payloads: Add whitespace around '<<' 2017-06-28 00:23:18 +00:00
usb libpayload: usbhid: Zero-initialize all parts of usbhid instance struct 2018-02-16 00:08:26 +00:00
video libpayload: Use a static copy of `font_glyph_filled()` 2017-08-10 12:07:13 +00:00
Makefile.inc libpayload: video: Introduce helpers for font access 2017-08-03 20:34:59 +00:00
cbmem_console.c Rename __attribute__((packed)) --> __packed 2017-07-13 19:45:59 +00:00
hid.c
keyboard.c
mouse_cursor.c libpayload: Add mouse cursor driver 2017-06-28 00:56:53 +00:00
nvram.c
options.c
pci.c
speaker.c