commit | 124bdcf4a697f9672d1150de60c5ea489bcad201 | [log] [tgz] |
---|---|---|
author | Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com> | Sun May 07 20:50:02 2017 +0300 |
committer | Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com> | Tue Jun 13 22:02:08 2017 +0300 |
tree | eb47aa20575a6a603bc5f80394178e990e5c23cc | |
parent | d8c3eab5cb92f37ca8576fc641fa4bfd8a0c8b00 [diff] |
tpm: fix byte order related arithmetic inconsistency in tpm_getcap() You should not do arithmetic with __be32 or __le32 types because sometimes it results incorrect results. Calculations must be done only with integers that are in in the CPU byte order. This commit migrates tpm_getcap() to struct tpm_buf in order to sort out these issues. Signed-off-by: Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com> Reviewed-by: Jason Gunthorpe <jgunthorpe@obsidianresearch.com>