tpm: move TPM 1.2 code of tpm_pcr_extend() to tpm1_pcr_extend()
authorRoberto Sassu <roberto.sassu@huawei.com>
Thu, 4 May 2017 11:16:47 +0000 (13:16 +0200)
committerJarkko Sakkinen <jarkko.sakkinen@linux.intel.com>
Tue, 13 Jun 2017 19:02:08 +0000 (22:02 +0300)
commit175d5b2a570cc0f79a23dbaf86e35e660f6f544f
treeb3d13862f6901546e88075d1fcfad5a35add2c80
parenta69faebf4d3e98c6a7a656c26b09bc532edfed08
tpm: move TPM 1.2 code of tpm_pcr_extend() to tpm1_pcr_extend()

In preparation of the modifications to tpm_pcr_extend(), which will
allow callers to supply a digest for each PCR bank of a TPM 2.0,
the TPM 1.2 specific code has been moved to tpm1_pcr_extend().

tpm1_pcr_extend() uses tpm_buf_init() to prepare the command buffer,
which offers protection against buffer overflow. It is called by
tpm_pcr_extend() and tpm_pm_suspend().

Signed-off-by: Roberto Sassu <roberto.sassu@huawei.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/tpm-interface.c