[GIT PULL] tpmdd updates for Linux 4.8
From: Jarkko Sakkinen
Date: Sun Jun 26 2016 - 02:15:00 EST
James,
This patch set contains two new major features:
* Multi-instance TPM proxy driver
* Rework of sharing common TIS code with different physical interfaces.
In addition, there are a vast number of small fixes and cleanups.
/Jarkko
Multi-instance TPM proxy driver
===============================
Using an ioctl on the provided /dev/vtpmx, a client-side vTPM device and
a server side file descriptor is created. The file descriptor must be
passed to a TPM emulator. The device driver will initialize the emulated
TPM using TPM 1.2 or TPM 2 startup commands and it will read the command
durations from the device in case of a TPM 1.2. The choice of emulated
TPM device (1.2 or 2) must be provided with a flag in the ioctl.
Rework of sharing common TIS code with different physical interfaces
====================================================================
There is a new common tpm_tis_core module that contains the core TIS
interface and a callback API for sharing the behavior between different
physical layers like LPC, SPI and I2C. For the 4.8 release adaptations
for standard TCG MMIO and SPI have been provided.
The following changes since commit 26703c636c1f3272b39bd0f6d04d2e970984f1b6:
um/ptrace: run seccomp after ptrace (2016-06-14 10:54:47 -0700)
are available in the git repository at:
git://git.infradead.org/users/jjs/linux-tpmdd.git tags/tpmdd-next-20160626
for you to fetch changes up to f786b752098216fedb73ba2905c8cce12358534a:
tpm_crb: fix address space of the return pointer in crb_map_res() (2016-06-25 17:28:57 +0300)
----------------------------------------------------------------
tpmdd updates for Linux 4.8
----------------------------------------------------------------
Arnd Bergmann (2):
tpm: fix tpm_bios_log_setup stub prototype
tpm: select ANON_INODES for proxy driver
Christophe Ricard (40):
tpm/st33zp24/spi: Remove nbr_dummy_bytes variable usage
tpm/st33zp24/spi: Use functions name with st33zp24_spi_ prefix
tpm/st33zp24/spi: Remove useless use of memcpy.
tpm/st33zp24/spi: Remove field spi_xfer from st33zp24_spi_phy structure
tpm/st33zp24: Remove unneeded CONFIG_OF switches
tpm/st33zp24: Auto-select core module
tpm/st33zp24/spi: Improve st33zp24_spi_evaluate_latency
tpm/st33zp24: Extend Copyright headers
tpm/st33zp24: Add support for acpi probing for i2c device.
tpm: st33zp24: Add support for acpi probing for spi device.
tpm/st33zp24/i2c: Change xxx_request_resources header
tpm/st33zp24/spi: Change xxx_request_resources header
tpm/st33zp24/spi: Remove nbr_dummy_bytes variable usage
tpm/st33zp24/spi: Use functions name with st33zp24_spi_ prefix
tpm/st33zp24/spi: Remove useless use of memcpy.
tpm/st33zp24/spi: Remove field spi_xfer from st33zp24_spi_phy structure
tpm/st33zp24: Remove unneeded CONFIG_OF switches
tpm/st33zp24/spi: Improve st33zp24_spi_evaluate_latency
tpm/st33zp24: Extend Copyright headers
tpm/st33zp24: Add support for acpi probing for i2c device.
tpm: st33zp24: Add support for acpi probing for spi device.
tpm/st33zp24/i2c: Change xxx_request_resources header
tpm/st33zp24/spi: Change xxx_request_resources header
tpm/st33zp24/i2c: Drop two useless checks in ACPI probe path
tpm/st33zp24/spi: Drop two useless checks in ACPI probe path
tpm/st33zp24: Remove unneeded tpm_reg in get_burstcount
tpm: drop list from struct tpm_vendor_specific
tpm: drop 'iobase' from struct tpm_vendor_specific
tpm: drop 'irq' from struct tpm_vendor_specific
tpm: drop 'read_queue' from struct tpm_vendor_specific
tpm: drop 'locality' from struct tpm_vendor_specific
tpm: Move tpm_vendor_specific data related with PTP specification to tpm_chip
tpm: Remove useless priv field in struct tpm_vendor_specific
tpm: Add include guards in tpm.h
tpm: tpm_tis: Share common data between phys
tpm_tis: Introduce intermediate layer for TPM access
devicetree: Add infineon to vendor-prefix.txt
devicetree: Add Trusted Computing Group to vendor-prefix.txt
tpm/tpm_tis: Split tpm_tis driver into a core and TCG TIS compliant phy
tpm/tpm_tis_spi: Add support for spi phy
Jarkko Sakkinen (12):
tpm: cleanup tpm_tis_remove()
tpm: fix crash in tpm_tis deinitialization
tpm_crb: drop struct resource res from struct crb_priv
tpm_crb: fix mapping of the buffers
tpm: check for TPM_CHIP_FLAG_TPM2 before calling tpm2_shutdown()
tpm: drop int_queue from tpm_vendor_specific
tpm: drop tpm_atmel specific fields from tpm_vendor_specific
tpm: drop manufacturer_id from struct tpm_vendor_specific
tpm: drop 'base' from struct tpm_vendor_specific
tpm: drop the field 'time_expired' from struct tpm_chip
tpm_vtpm_proxy: fix address space of a user pointer in vtpmx_fops_ioctl()
tpm_crb: fix address space of the return pointer in crb_map_res()
Jason Gunthorpe (6):
tpm: Get rid of chip->pdev
tpm: Get rid of devname
tpm: Provide strong locking for device removal
tpm: Split out the devm stuff from tpmm_chip_alloc
tpm: Remove all uses of drvdata from the TPM Core
tpm: Fix IRQ unwind ordering in TIS
Stefan Berger (6):
tpm: Get rid of module locking
tpm: Replace device number bitmap with IDR
tpm: Introduce TPM_CHIP_FLAG_VIRTUAL
tpm: Proxy driver for supporting multiple emulated TPMs
tpm: Add documentation for the tpm_vtpm_proxy device driver
tpm: Fix suspend regression
Stephen Rothwell (1):
tpm: fix for typo in tpm/tpm_ibmvtpm.c
.../bindings/security/tpm/tpm_tis_spi.txt | 24 +
.../devicetree/bindings/vendor-prefixes.txt | 2 +
Documentation/ioctl/ioctl-number.txt | 1 +
Documentation/tpm/tpm_vtpm_proxy.txt | 71 ++
drivers/char/tpm/Kconfig | 30 +
drivers/char/tpm/Makefile | 3 +
drivers/char/tpm/st33zp24/Kconfig | 11 +-
drivers/char/tpm/st33zp24/i2c.c | 70 +-
drivers/char/tpm/st33zp24/spi.c | 184 +++--
drivers/char/tpm/st33zp24/st33zp24.c | 125 ++-
drivers/char/tpm/st33zp24/st33zp24.h | 14 +-
drivers/char/tpm/tpm-chip.c | 284 +++++--
drivers/char/tpm/tpm-dev.c | 15 +-
drivers/char/tpm/tpm-interface.c | 105 +--
drivers/char/tpm/tpm-sysfs.c | 78 +-
drivers/char/tpm/tpm.h | 78 +-
drivers/char/tpm/tpm2-cmd.c | 11 +-
drivers/char/tpm/tpm_atmel.c | 63 +-
drivers/char/tpm/tpm_atmel.h | 16 +-
drivers/char/tpm/tpm_crb.c | 75 +-
drivers/char/tpm/tpm_eventlog.c | 2 +-
drivers/char/tpm/tpm_eventlog.h | 4 +-
drivers/char/tpm/tpm_i2c_atmel.c | 39 +-
drivers/char/tpm/tpm_i2c_infineon.c | 55 +-
drivers/char/tpm/tpm_i2c_nuvoton.c | 98 +--
drivers/char/tpm/tpm_ibmvtpm.c | 38 +-
drivers/char/tpm/tpm_infineon.c | 22 +-
drivers/char/tpm/tpm_nsc.c | 84 +-
drivers/char/tpm/tpm_tis.c | 829 ++------------------
drivers/char/tpm/tpm_tis_core.c | 862 +++++++++++++++++++++
drivers/char/tpm/tpm_tis_core.h | 156 ++++
drivers/char/tpm/tpm_tis_spi.c | 272 +++++++
drivers/char/tpm/tpm_vtpm_proxy.c | 644 +++++++++++++++
drivers/char/tpm/xen-tpmfront.c | 36 +-
include/linux/platform_data/st33zp24.h | 2 +-
include/uapi/linux/Kbuild | 1 +
include/uapi/linux/vtpm_proxy.h | 36 +
37 files changed, 3030 insertions(+), 1410 deletions(-)
create mode 100644 Documentation/devicetree/bindings/security/tpm/tpm_tis_spi.txt
create mode 100644 Documentation/tpm/tpm_vtpm_proxy.txt
create mode 100644 drivers/char/tpm/tpm_tis_core.c
create mode 100644 drivers/char/tpm/tpm_tis_core.h
create mode 100644 drivers/char/tpm/tpm_tis_spi.c
create mode 100644 drivers/char/tpm/tpm_vtpm_proxy.c
create mode 100644 include/uapi/linux/vtpm_proxy.h