linux/drivers/char/tpm
Jarkko Sakkinen 422eac3f7d tpm_crb: fix mapping of the buffers
On my Lenovo x250 the following situation occurs:

[18697.813871] tpm_crb MSFT0101:00: can't request region for resource
[mem 0xacdff080-0xacdfffff]

The mapping of the control area overlaps the mapping of the command
buffer. The control area is mapped over page, which is not right. It
should mapped over sizeof(struct crb_control_area).

Fixing this issue unmasks another issue. Command and response buffers
can overlap and they do interleave on this machine. According to the PTP
specification the overlapping means that they are mapped to the same
buffer.

The commit has been also on a Haswell NUC where things worked before
applying this fix so that the both code paths for response buffer
initialization are tested.

Cc: stable@vger.kernel.org
Fixes: 1bd047be37 ("tpm_crb: Use devm_ioremap_resource")
Signed-off-by: Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com>
Reviewed-by: Jason Gunthorpe <jgunthorpe@obsidianresearch.com>
2016-06-25 17:26:35 +03:00
..
st33zp24 tpm/st33zp24: Remove unneeded tpm_reg in get_burstcount 2016-06-25 17:26:35 +03: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
tpm2-cmd.c tpm: fix crash in tpm_tis deinitialization 2016-06-25 17:26:35 +03: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 2016-06-25 17:26:35 +03:00
tpm_atmel.h tpmdd maintainers 2007-08-22 19:52:44 -07:00
tpm_crb.c tpm_crb: fix mapping of the buffers 2016-06-25 17:26:35 +03:00
tpm_eventlog.c tpm: Get rid of devname 2016-06-25 17:26:35 +03:00
tpm_eventlog.h tpm: fix tpm_bios_log_setup stub prototype 2016-06-25 17:26:35 +03:00
tpm_i2c_atmel.c tpm: Get rid of chip->pdev 2016-06-25 17:26:35 +03:00
tpm_i2c_infineon.c tpm: Get rid of chip->pdev 2016-06-25 17:26:35 +03:00
tpm_i2c_nuvoton.c tpm: Get rid of devname 2016-06-25 17:26:35 +03:00
tpm_ibmvtpm.c tpm_ibmvtpm: properly handle interrupted packet receptions 2015-12-20 15:27:12 +02:00
tpm_ibmvtpm.h tpm_ibmvtpm: properly handle interrupted packet receptions 2015-12-20 15:27:12 +02:00
tpm_infineon.c tpm: Get rid of chip->pdev 2016-06-25 17:26:35 +03:00
tpm_nsc.c tpm: Get rid of chip->pdev 2016-06-25 17:26:35 +03: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: fix crash in tpm_tis deinitialization 2016-06-25 17:26:35 +03:00
tpm-chip.c tpm: fix crash in tpm_tis deinitialization 2016-06-25 17:26:35 +03:00
tpm-dev.c tpm: Provide strong locking for device removal 2016-06-25 17:26:35 +03:00
tpm-interface.c tpm: Replace device number bitmap with IDR 2016-06-25 17:26:35 +03:00
tpm-sysfs.c tpm: Provide strong locking for device removal 2016-06-25 17:26:35 +03:00
tpm.h tpm: Replace device number bitmap with IDR 2016-06-25 17:26:35 +03:00
xen-tpmfront.c xenbus_client: Extend interface to support multi-page ring 2015-04-15 10:56:47 +01:00