]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
Added Little Endian support to vtpm module
authorhonclo <honclo@imap.linux.ibm.com>
Fri, 13 Feb 2015 02:02:24 +0000 (21:02 -0500)
committerJiri Slaby <jslaby@suse.cz>
Sun, 1 Mar 2015 22:34:19 +0000 (23:34 +0100)
commitbcb8bcd16bc2c3654c7b1c4cd2641d8d04a6e752
tree4387c5066ef30d7b375daace7888f1d20aca8704
parent575bc4a16cd2250b4f195bb90791425e102f6249
Added Little Endian support to vtpm module

commit eb71f8a5e33fa1066fb92f0111ab366a341e1f6c upstream.

The tpm_ibmvtpm module is affected by an unaligned access problem.
ibmvtpm_crq_get_version failed with rc=-4 during boot when vTPM is
enabled in Power partition, which supports both little endian and
big endian modes.

We added little endian support to fix this problem:
1) added cpu_to_be64 calls to ensure BE data is sent from an LE OS.
2) added be16_to_cpu and be32_to_cpu calls to make sure data received
   is in LE format on a LE OS.

Signed-off-by: Hon Ching(Vicky) Lo <honclo@linux.vnet.ibm.com>
Signed-off-by: Joy Latten <jmlatten@linux.vnet.ibm.com>
[phuewe: manually applied the patch :( ]
Reviewed-by: Ashley Lai <ashley@ahsleylai.com>
Signed-off-by: Peter Huewe <peterhuewe@gmx.de>
Signed-off-by: Jiri Slaby <jslaby@suse.cz>
drivers/char/tpm/tpm_ibmvtpm.c