Commit a2b095e0 authored by Linus Torvalds's avatar Linus Torvalds
Browse files

Merge tag 'tpmdd-next-v5.12-rc1-v2' of...

Merge tag 'tpmdd-next-v5.12-rc1-v2' of git://git.kernel.org/pub/scm/linux/kernel/git/jarkko/linux-tpmdd

Pull tpm updates from Jarkko Sakkinen:
 "New features:

   - Cr50 I2C TPM driver

   - sysfs exports of PCR registers in TPM 2.0 chips

  Bug fixes:

   - bug fixes for tpm_tis driver, which had a racy wait for hardware
     state change to be ready to send a command to the TPM chip. The bug
     has existed already since 2006, but has only made itself known in
     recent past. This is the same as the "last time" :-)

   - Otherwise there's bunch of fixes for not as alarming regressions. I
     think the list is about the same as last time, except I added fixes
     for some disjoint bugs in trusted keys that I found some time ago"

* tag 'tpmdd-next-v5.12-rc1-v2' of git://git.kernel.org/pub/scm/linux/kernel/git/jarkko/linux-tpmdd:
  KEYS: trusted: Reserve TPM for seal and unseal operations
  KEYS: trusted: Fix migratable=1 failing
  KEYS: trusted: Fix incorrect handling of tpm_get_random()
  tpm/ppi: Constify static struct attribute_group
  ABI: add sysfs description for tpm exports of PCR registers
  tpm: add sysfs exports for all banks of PCR registers
  keys: Update comment for restrict_link_by_key_or_keyring_chain
  tpm: Remove tpm_dev_wq_lock
  char: tpm: add i2c driver for cr50
  tpm: Fix fall-through warnings for Clang
  tpm_tis: Clean up locality release
  tpm_tis: Fix check_locality for correct locality acquisition
parents 177626c6 8c657a05
Loading
Loading
Loading
Loading
+14 −0
Original line number Diff line number Diff line
@@ -194,3 +194,17 @@ Description: The "tpm_version_major" property shows the TCG spec major version
		Example output::

		  2

What:		/sys/class/tpm/tpmX/pcr-H/N
Date:		March 2021
KernelVersion:	5.12
Contact:	linux-integrity@vger.kernel.org
Description:	produces output in compact hex representation for PCR
		number N from hash bank H.  N is the numeric value of
		the PCR number and H is the crypto string
		representation of the hash

		Example output::

		  cat /sys/class/tpm/tpm0/pcr-sha256/7
		  2ED93F199692DC6788EFA6A1FE74514AB9760B2A6CEEAEF6C808C13E4ABB0D42
+4 −3
Original line number Diff line number Diff line
@@ -244,9 +244,10 @@ int restrict_link_by_key_or_keyring(struct key *dest_keyring,
 * @payload: The payload of the new key.
 * @trusted: A key or ring of keys that can be used to vouch for the new cert.
 *
 * Check the new certificate only against the key or keys passed in the data
 * parameter. If one of those is the signing key and validates the new
 * certificate, then mark the new certificate as being ok to link.
 * Check the new certificate against the key or keys passed in the data
 * parameter and against the keys already linked to the destination keyring. If
 * one of those is the signing key and validates the new certificate, then mark
 * the new certificate as being ok to link.
 *
 * Returns 0 if the new certificate was accepted, -ENOKEY if we
 * couldn't find a matching parent certificate in the trusted list,
+10 −0
Original line number Diff line number Diff line
@@ -86,6 +86,16 @@ config TCG_TIS_SYNQUACER
	  To compile this driver as a module, choose  M here;
	  the module will be called tpm_tis_synquacer.

config TCG_TIS_I2C_CR50
	tristate "TPM Interface Specification 2.0 Interface (I2C - CR50)"
	depends on I2C
	select TCG_CR50
	help
	  This is a driver for the Google cr50 I2C TPM interface which is a
	  custom microcontroller and requires a custom i2c protocol interface
	  to handle the limitations of the hardware.  To compile this driver
	  as a module, choose M here; the module will be called tcg_tis_i2c_cr50.

config TCG_TIS_I2C_ATMEL
	tristate "TPM Interface Specification 1.2 Interface (I2C - Atmel)"
	depends on I2C
+2 −0
Original line number Diff line number Diff line
@@ -27,6 +27,8 @@ obj-$(CONFIG_TCG_TIS_SPI) += tpm_tis_spi.o
tpm_tis_spi-y := tpm_tis_spi_main.o
tpm_tis_spi-$(CONFIG_TCG_TIS_SPI_CR50) += tpm_tis_spi_cr50.o

obj-$(CONFIG_TCG_TIS_I2C_CR50) += tpm_tis_i2c_cr50.o

obj-$(CONFIG_TCG_TIS_I2C_ATMEL) += tpm_i2c_atmel.o
obj-$(CONFIG_TCG_TIS_I2C_INFINEON) += tpm_i2c_infineon.o
obj-$(CONFIG_TCG_TIS_I2C_NUVOTON) += tpm_i2c_nuvoton.o
+1 −0
Original line number Diff line number Diff line
@@ -210,6 +210,7 @@ static int get_event_name(char *dest, struct tcpa_event *event,
		default:
			break;
		}
		break;
	default:
		break;
	}
Loading