Searched hist:"124 bdcf4a697f9672d1150de60c5ea489bcad201" (Results 1 – 2 of 2) sorted by relevance
/openbmc/linux/drivers/char/tpm/ |
H A D | tpm-interface.c | diff 124bdcf4a697f9672d1150de60c5ea489bcad201 Sun May 07 12:50:02 CDT 2017 Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com> 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>
|
H A D | tpm.h | diff 124bdcf4a697f9672d1150de60c5ea489bcad201 Sun May 07 12:50:02 CDT 2017 Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com> 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>
|