diff options
author | Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com> | 2017-05-07 20:50:02 +0300 |
---|---|---|
committer | Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com> | 2017-06-13 22:02:08 +0300 |
commit | 124bdcf4a697f9672d1150de60c5ea489bcad201 (patch) | |
tree | eb47aa20575a6a603bc5f80394178e990e5c23cc /drivers/char/tpm/st33zp24 | |
parent | d8c3eab5cb92f37ca8576fc641fa4bfd8a0c8b00 (diff) | |
download | linux-124bdcf4a697f9672d1150de60c5ea489bcad201.tar.gz |
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>
Diffstat (limited to 'drivers/char/tpm/st33zp24')
0 files changed, 0 insertions, 0 deletions