tpm: fix unsigned/signed mismatch errors related to __calc_tpm2_event_size
authorGregory Price <gourry@gourry.net>
Fri, 13 Sep 2024 23:19:53 +0000 (19:19 -0400)
committerArd Biesheuvel <ardb@kernel.org>
Tue, 15 Oct 2024 18:27:29 +0000 (20:27 +0200)
commita066397e8ed1036e8b959050ab6e830ee90d9f58
treeb04c8fb1030b4478688e302815729d265d3b55a9
parentc33c28f9f6e017702374e1ab907dfa5a63db5301
tpm: fix unsigned/signed mismatch errors related to __calc_tpm2_event_size

__calc_tpm2_event_size returns 0 or a positive length, but return values
are often interpreted as ints.  Convert everything over to u32 to avoid
signed/unsigned logic errors.

Signed-off-by: Gregory Price <gourry@gourry.net>
Signed-off-by: Ard Biesheuvel <ardb@kernel.org>
drivers/firmware/efi/libstub/tpm.c
drivers/firmware/efi/tpm.c
include/linux/tpm_eventlog.h