]> git.baikalelectronics.ru Git - kernel.git/commit
tpm/ibmvtpm: Additional LE support for tpm_ibmvtpm_send
authorjmlatten@linux.vnet.ibm.com <jmlatten@linux.vnet.ibm.com>
Sat, 21 Feb 2015 00:11:24 +0000 (18:11 -0600)
committerPeter Huewe <peterhuewe@gmx.de>
Fri, 6 Mar 2015 21:35:48 +0000 (22:35 +0100)
commitc5c8e46243815cfcec9d7928cf15853b7a5e1868
tree4af818acdcd1d88d8d1632bf7a6369d391ef4881
parent8b2ec7b0d35c5186c717bf40df59391d7e8f0e34
tpm/ibmvtpm: Additional LE support for tpm_ibmvtpm_send

Problem: When IMA and VTPM are both enabled in kernel config,
kernel hangs during bootup on LE OS.

Why?: IMA calls tpm_pcr_read() which results in tpm_ibmvtpm_send
and tpm_ibmtpm_recv getting called. A trace showed that
tpm_ibmtpm_recv was hanging.

Resolution: tpm_ibmtpm_recv was hanging because tpm_ibmvtpm_send
was sending CRQ message that probably did not make much sense
to phype because of Endianness. The fix below sends correctly
converted CRQ for LE. This was not caught before because it
seems IMA is not enabled by default in kernel config and
IMA exercises this particular code path in vtpm.

Tested with IMA and VTPM enabled in kernel config and VTPM
enabled on both a BE OS and a LE OS ppc64 lpar. This exercised
CRQ and TPM command code paths in vtpm.
Patch is against Peter's tpmdd tree on github which included
Vicky's previous vtpm le patches.

Signed-off-by: Joy Latten <jmlatten@linux.vnet.ibm.com>
Cc: <stable@vger.kernel.org> # d447531f1d85: "Added Little Endian support to vtpm module"
Cc: <stable@vger.kernel.org>
Reviewed-by: Ashley Lai <ashley@ahsleylai.com>
Signed-off-by: Peter Huewe <peterhuewe@gmx.de>
drivers/char/tpm/tpm_ibmvtpm.c
drivers/char/tpm/tpm_ibmvtpm.h