linux/drivers/char/tpm
jmlatten@linux.vnet.ibm.com f49920b9a2 tpm/ibmvtpm: Additional LE support for tpm_ibmvtpm_send
commit 62dfd912ab upstream.

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>
Reviewed-by: Ashley Lai <ashley@ahsleylai.com>
Signed-off-by: Peter Huewe <peterhuewe@gmx.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
History 2015-03-26 15:06:54 +01:00
..
Kconfig tpm: use tabs instead of whitespaces in Kconfig 2013-10-22 19:43:12 +02:00
Makefile tpm: Move sysfs functions from tpm-interface to tpm-sysfs 2014-01-06 14:37:24 +01:00
tpm-dev.c tpm: Make tpm-dev allocate a per-file structure 2014-01-06 14:37:25 +01:00
tpm-interface.c TPM: Add new TPMs to the tail of the list to prevent inadvertent change of dev 2015-03-06 14:43:29 -08:00
tpm-sysfs.c tpm/tpm-sysfs: active_show() can be static 2014-01-06 14:37:25 +01:00
tpm.h tpm: Make tpm-dev allocate a per-file structure 2014-01-06 14:37:25 +01:00
tpm_acpi.c ACPI: Clean up inclusions of ACPI header files 2013-12-07 01:03:14 +01:00
tpm_atmel.c tpm: Create a tpm_class_ops structure and use it in the drivers 2014-01-06 14:37:25 +01:00
tpm_atmel.h tpmdd maintainers 2007-08-22 19:52:44 -07:00
tpm_eventlog.c tpm: Merge the tpm-bios module with tpm.o 2013-10-22 19:43:01 +02:00
tpm_eventlog.h drivers/char/tpm: Add securityfs support for event log 2012-08-22 16:22:47 -05:00
tpm_i2c_atmel.c char: tpm: Add missing error check for devm_kzalloc 2015-03-06 14:43:29 -08:00
tpm_i2c_infineon.c tpm: Create a tpm_class_ops structure and use it in the drivers 2014-01-06 14:37:25 +01:00
tpm_i2c_nuvoton.c char: tpm: Add missing error check for devm_kzalloc 2015-03-06 14:43:29 -08:00
tpm_i2c_stm_st33.c tpm/tpm_i2c_stm_st33: Fix potential bug in tpm_stm_i2c_send 2015-03-06 14:43:29 -08:00
tpm_i2c_stm_st33.h tpm_i2c_stm_st33: fix oops when i2c client is unavailable 2013-02-05 09:38:24 -06:00
tpm_ibmvtpm.c tpm/ibmvtpm: Additional LE support for tpm_ibmvtpm_send 2015-03-26 15:06:54 +01:00
tpm_ibmvtpm.h tpm/ibmvtpm: Additional LE support for tpm_ibmvtpm_send 2015-03-26 15:06:54 +01:00
tpm_infineon.c tpm: Create a tpm_class_ops structure and use it in the drivers 2014-01-06 14:37:25 +01:00
tpm_nsc.c tpm: Create a tpm_class_ops structure and use it in the drivers 2014-01-06 14:37:25 +01:00
tpm_of.c drivers/char/tpm: Add securityfs support for event log 2012-08-22 16:22:47 -05:00
tpm_ppi.c ACPI / TPM: Fix resume regression on Chromebooks 2014-06-07 10:28:27 -07:00
tpm_tis.c tpm_tis: verify interrupt during init 2015-03-06 14:43:28 -08:00
xen-tpmfront.c Features: 2014-01-22 22:00:18 -08:00