]> www.infradead.org Git - users/jedix/linux-maple.git/commit
efi/libstub: smbios: Use length member instead of record struct size
authorArd Biesheuvel <ardb@kernel.org>
Tue, 28 Feb 2023 18:23:09 +0000 (19:23 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 30 Mar 2023 10:49:04 +0000 (12:49 +0200)
commit58c11bc7adaa8c6a369bf1a6baaf213c467073bd
tree9937f8f9849faa8e7bc6ad5bdcda5d6b731acea6
parente041bef1adee02999cf24f9a2e15ed452bc363fe
efi/libstub: smbios: Use length member instead of record struct size

[ Upstream commit 34343eb06afc04af9178a9883d9354dc12beede0 ]

The type 1 SMBIOS record happens to always be the same size, but there
are other record types which have been augmented over time, and so we
should really use the length field in the header to decide where the
string table starts.

Fixes: 550b33cfd4452968 ("arm64: efi: Force the use of ...")
Signed-off-by: Ard Biesheuvel <ardb@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/firmware/efi/libstub/smbios.c