linux/drivers/firmware/google
Brian Norris 442f1e746e firmware: google: increment VPD key_len properly
Commit 4b708b7b1a ("firmware: google: check if size is valid when
decoding VPD data") adds length checks, but the new vpd_decode_entry()
function botched the logic -- it adds the key length twice, instead of
adding the key and value lengths separately.

On my local system, this means vpd.c's vpd_section_create_attribs() hits
an error case after the first attribute it parses, since it's no longer
looking at the correct offset. With this patch, I'm back to seeing all
the correct attributes in /sys/firmware/vpd/...

Fixes: 4b708b7b1a ("firmware: google: check if size is valid when decoding VPD data")
Cc: <stable@vger.kernel.org>
Cc: Hung-Te Lin <hungte@chromium.org>
Signed-off-by: Brian Norris <briannorris@chromium.org>
Reviewed-by: Stephen Boyd <swboyd@chromium.org>
Reviewed-by: Guenter Roeck <groeck@chromium.org>
Link: https://lore.kernel.org/r/20190930214522.240680-1-briannorris@chromium.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-10-11 08:41:34 +02:00
..
coreboot_table.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 287 2019-06-05 17:36:37 +02:00
coreboot_table.h Merge 5.2-rc4 into char-misc-next 2019-06-09 09:11:21 +02:00
framebuffer-coreboot.c Merge 5.2-rc4 into char-misc-next 2019-06-09 09:11:21 +02:00
gsmi.c treewide: Add SPDX license identifier for more missed files 2019-05-21 10:50:45 +02:00
Kconfig treewide: Add SPDX license identifier - Makefile/Kconfig 2019-05-21 10:50:46 +02:00
Makefile firmware: coreboot: Collapse platform drivers into bus core 2018-09-14 15:37:23 +02:00
memconsole-coreboot.c Merge 5.2-rc4 into char-misc-next 2019-06-09 09:11:21 +02:00
memconsole-x86-legacy.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 287 2019-06-05 17:36:37 +02:00
memconsole.c Merge 5.2-rc4 into char-misc-next 2019-06-09 09:11:21 +02:00
memconsole.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 287 2019-06-05 17:36:37 +02:00
vpd_decode.c firmware: google: increment VPD key_len properly 2019-10-11 08:41:34 +02:00
vpd_decode.h firmware: google: check if size is valid when decoding VPD data 2019-09-04 13:31:28 +02:00
vpd.c firmware: google: check if size is valid when decoding VPD data 2019-09-04 13:31:28 +02:00