Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 124bdcf4 authored by Jarkko Sakkinen's avatar Jarkko Sakkinen
Browse files

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: default avatarJarkko Sakkinen <jarkko.sakkinen@linux.intel.com>
Reviewed-by: default avatarJason Gunthorpe <jgunthorpe@obsidianresearch.com>
parent d8c3eab5
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment