tpm: Abstract crypto agile event size calculations
authorMatthew Garrett <mjg59@google.com>
Mon, 20 May 2019 20:54:58 +0000 (13:54 -0700)
committerJarkko Sakkinen <jarkko.sakkinen@linux.intel.com>
Mon, 24 Jun 2019 20:57:49 +0000 (23:57 +0300)
commit44038bc514a244fba9d0d6d698b15970185ac251
treeabdd9223fe34fbfe6f5915f8f0b2d37071a68696
parent782779b60faa2fc7ff609ac8ef938260fd792c0f
tpm: Abstract crypto agile event size calculations

We need to calculate the size of crypto agile events in multiple
locations, including in the EFI boot stub. The easiest way to do this is
to put it in a header file as an inline and leave a wrapper to ensure we
don't end up with multiple copies of it embedded in the existing code.

Signed-off-by: Matthew Garrett <mjg59@google.com>
Reviewed-by: Bartosz Szczepanek <bsz@semihalf.com>
Tested-by: Bartosz Szczepanek <bsz@semihalf.com>
Reviewed-by: Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com>
Tested-by: Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com>
Signed-off-by: Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com>
drivers/char/tpm/eventlog/tpm2.c
include/linux/tpm_eventlog.h