]> git.baikalelectronics.ru Git - kernel.git/commit
tpm: use tpm_buf functions in tpm2_pcr_read()
authorRoberto Sassu <roberto.sassu@huawei.com>
Fri, 23 Jun 2017 13:41:56 +0000 (15:41 +0200)
committerJames Morris <james.l.morris@oracle.com>
Thu, 6 Jul 2017 23:49:25 +0000 (09:49 +1000)
commit91f7f3d773a469deeab3808d422363138295346e
tree2b5b0c6a781347de25915fc178a034429070f81f
parentbc397085ca975d685c7a0b3a2984932eea4f6af0
tpm: use tpm_buf functions in tpm2_pcr_read()

tpm2_pcr_read() now builds the PCR read command buffer with tpm_buf
functions. This solution is preferred to using a tpm2_cmd structure,
as tpm_buf functions provide protection against buffer overflow.

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>
Signed-off-by: James Morris <james.l.morris@oracle.com>
drivers/char/tpm/tpm2-cmd.c