linux/drivers/char/tpm
Dr. Greg Wettstein 8cacd37f58 tpm: Restore functionality to xen vtpm driver.
commit e487a0f523 upstream.

Functionality of the xen-tpmfront driver was lost secondary to
the introduction of xenbus multi-page support in commit ccc9d90a9a
("xenbus_client: Extend interface to support multi-page ring").

In this commit pointer to location of where the shared page address
is stored was being passed to the xenbus_grant_ring() function rather
then the address of the shared page itself. This resulted in a situation
where the driver would attach to the vtpm-stubdom but any attempt
to send a command to the stub domain would timeout.

A diagnostic finding for this regression is the following error
message being generated when the xen-tpmfront driver probes for a
device:

<3>vtpm vtpm-0: tpm_transmit: tpm_send: error -62

<3>vtpm vtpm-0: A TPM error (-62) occurred attempting to determine
the timeouts

This fix is relevant to all kernels from 4.1 forward which is the
release in which multi-page xenbus support was introduced.

Daniel De Graaf formulated the fix by code inspection after the
regression point was located.

Fixes: ccc9d90a9a ("xenbus_client: Extend interface to support multi-page ring")
Signed-off-by: Dr. Greg Wettstein <greg@enjellic.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

[boris: Updated commit message, added Fixes tag]
Signed-off-by: Boris Ostrovsky <boris.ostrovsky@oracle.com>
Cc: stable@vger.kernel.org # v4.1+
Reviewed-by: Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com>
Signed-off-by: Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com>
2018-11-21 09:27:33 +01:00
..
st33zp24 tpm: st33zp24: fix potential buffer overruns caused by bit glitches on the bus 2018-03-11 16:19:44 +01:00
Kconfig tpm: Update KConfig text to include TPM2.0 FIFO chips 2015-03-18 22:43:07 +01:00
Makefile tpm/tpm_i2c_stm_st33: Split tpm_i2c_tpm_st33 in 2 layers (core + phy) 2015-03-18 22:43:06 +01:00
tpm_acpi.c ACPI: Clean up acpi_os_map/unmap_memory() to eliminate __iomem. 2014-05-27 18:13:08 +02:00
tpm_atmel.c tpm: Get rid of chip->pdev 2017-07-21 07:44:58 +02:00
tpm_atmel.h
tpm_crb.c tpm_crb: check for bad response size 2017-05-25 14:30:07 +02:00
tpm_eventlog.c tpm_eventlog.c: fix binary_bios_measurements 2016-04-12 09:08:47 -07:00
tpm_eventlog.h vTPM: support little endian guests 2015-10-19 01:09:30 +02:00
tpm_i2c_atmel.c tpm: Get rid of chip->pdev 2017-07-21 07:44:58 +02:00
tpm_i2c_infineon.c tpm_i2c_infineon: fix potential buffer overruns caused by bit glitches on the bus 2018-03-11 16:19:44 +01:00
tpm_i2c_nuvoton.c tpm_i2c_nuvoton: fix potential buffer overruns caused by bit glitches on the bus 2018-03-11 16:19:44 +01:00
tpm_ibmvtpm.c vTPM: fix memory allocation flag for rtce buffer at kernel boot 2015-10-19 01:00:49 +02:00
tpm_ibmvtpm.h tpm/ibmvtpm: Additional LE support for tpm_ibmvtpm_send 2015-03-06 22:35:48 +01:00
tpm_infineon.c tpm: Get rid of chip->pdev 2017-07-21 07:44:58 +02:00
tpm_nsc.c tpm: Get rid of chip->pdev 2017-07-21 07:44:58 +02:00
tpm_of.c TPM: Avoid reference to potentially freed memory 2015-11-09 17:52:55 +02:00
tpm_ppi.c tpm: move the PPI attributes to character device directory. 2015-10-19 01:01:20 +02:00
tpm_tis.c tpm_tis: fix potential buffer overruns caused by bit glitches on the bus 2018-03-24 10:58:39 +01:00
tpm-chip.c tpm: fix: return rc when devm_add_action() fails 2018-11-10 07:41:36 -08:00
tpm-dev.c tpm: fix race condition in tpm_common_write() 2018-08-15 17:42:04 +02:00
tpm-interface.c tpm: suppress transmit cmd error logs when TPM 1.2 is disabled/deactivated 2018-11-21 09:27:32 +01:00
tpm-sysfs.c tpm: fix a kernel memory leak in tpm-sysfs.c 2017-08-06 19:19:43 -07:00
tpm.h tpm: do not suspend/resume if power stays on 2018-06-13 16:15:27 +02:00
tpm2-cmd.c tpm: fix potential buffer overruns caused by bit glitches on the bus 2018-03-24 10:58:39 +01:00
xen-tpmfront.c tpm: Restore functionality to xen vtpm driver. 2018-11-21 09:27:33 +01:00