diff options
Diffstat (limited to 'drivers/char/tpm')
-rw-r--r-- | drivers/char/tpm/Kconfig | 30 | ||||
-rw-r--r-- | drivers/char/tpm/eventlog/tpm2.c | 12 | ||||
-rw-r--r-- | drivers/char/tpm/st33zp24/Kconfig | 6 | ||||
-rw-r--r-- | drivers/char/tpm/tpm_ftpm_tee.c | 2 |
4 files changed, 24 insertions, 26 deletions
diff --git a/drivers/char/tpm/Kconfig b/drivers/char/tpm/Kconfig index aacdeed93320..58b4c573d176 100644 --- a/drivers/char/tpm/Kconfig +++ b/drivers/char/tpm/Kconfig @@ -9,7 +9,7 @@ menuconfig TCG_TPM imply SECURITYFS select CRYPTO select CRYPTO_HASH_INFO - ---help--- + help If you have a TPM security chip in your system, which implements the Trusted Computing Group's specification, say Yes and it will be accessible from within Linux. For @@ -31,7 +31,7 @@ config HW_RANDOM_TPM bool "TPM HW Random Number Generator support" depends on TCG_TPM && HW_RANDOM && !(TCG_TPM=y && HW_RANDOM=m) default y - ---help--- + help This setting exposes the TPM's Random Number Generator as a hwrng device. This allows the kernel to collect randomness from the TPM at boot, and provides the TPM randomines in /dev/hwrng. @@ -40,7 +40,7 @@ config HW_RANDOM_TPM config TCG_TIS_CORE tristate - ---help--- + help TCG TIS TPM core driver. It implements the TPM TCG TIS logic and hooks into the TPM kernel APIs. Physical layers will register against it. @@ -48,7 +48,7 @@ config TCG_TIS tristate "TPM Interface Specification 1.2 Interface / TPM 2.0 FIFO Interface" depends on X86 || OF select TCG_TIS_CORE - ---help--- + help If you have a TPM security chip that is compliant with the TCG TIS 1.2 TPM specification (TPM1.2) or the TCG PTP FIFO specification (TPM2.0) say Yes and it will be accessible from @@ -59,7 +59,7 @@ config TCG_TIS_SPI tristate "TPM Interface Specification 1.3 Interface / TPM 2.0 FIFO Interface - (SPI)" depends on SPI select TCG_TIS_CORE - ---help--- + help If you have a TPM security chip which is connected to a regular, non-tcg SPI master (i.e. most embedded platforms) that is compliant with the TCG TIS 1.3 TPM specification (TPM1.2) or the TCG PTP FIFO @@ -77,7 +77,7 @@ config TCG_TIS_SPI_CR50 config TCG_TIS_I2C_ATMEL tristate "TPM Interface Specification 1.2 Interface (I2C - Atmel)" depends on I2C - ---help--- + help If you have an Atmel I2C TPM security chip say Yes and it will be accessible from within Linux. To compile this driver as a module, choose M here; the module will @@ -86,7 +86,7 @@ config TCG_TIS_I2C_ATMEL config TCG_TIS_I2C_INFINEON tristate "TPM Interface Specification 1.2 Interface (I2C - Infineon)" depends on I2C - ---help--- + help If you have a TPM security chip that is compliant with the TCG TIS 1.2 TPM specification and Infineon's I2C Protocol Stack Specification 0.20 say Yes and it will be accessible from within @@ -97,7 +97,7 @@ config TCG_TIS_I2C_INFINEON config TCG_TIS_I2C_NUVOTON tristate "TPM Interface Specification 1.2 Interface (I2C - Nuvoton)" depends on I2C - ---help--- + help If you have a TPM security chip with an I2C interface from Nuvoton Technology Corp. say Yes and it will be accessible from within Linux. @@ -107,7 +107,7 @@ config TCG_TIS_I2C_NUVOTON config TCG_NSC tristate "National Semiconductor TPM Interface" depends on X86 - ---help--- + help If you have a TPM security chip from National Semiconductor say Yes and it will be accessible from within Linux. To compile this driver as a module, choose M here; the module @@ -116,7 +116,7 @@ config TCG_NSC config TCG_ATMEL tristate "Atmel TPM Interface" depends on PPC64 || HAS_IOPORT_MAP - ---help--- + help If you have a TPM security chip from Atmel say Yes and it will be accessible from within Linux. To compile this driver as a module, choose M here; the module will be called tpm_atmel. @@ -124,7 +124,7 @@ config TCG_ATMEL config TCG_INFINEON tristate "Infineon Technologies TPM Interface" depends on PNP - ---help--- + help If you have a TPM security chip from Infineon Technologies (either SLD 9630 TT 1.1 or SLB 9635 TT 1.2) say Yes and it will be accessible from within Linux. @@ -136,7 +136,7 @@ config TCG_INFINEON config TCG_IBMVTPM tristate "IBM VTPM Interface" depends on PPC_PSERIES - ---help--- + help If you have IBM virtual TPM (VTPM) support say Yes and it will be accessible from within Linux. To compile this driver as a module, choose M here; the module will be called tpm_ibmvtpm. @@ -145,7 +145,7 @@ config TCG_XEN tristate "XEN TPM Interface" depends on TCG_TPM && XEN select XEN_XENBUS_FRONTEND - ---help--- + help If you want to make TPM support available to a Xen user domain, say Yes and it will be accessible from within Linux. See the manpages for xl, xl.conf, and docs/misc/vtpm.txt in @@ -156,7 +156,7 @@ config TCG_XEN config TCG_CRB tristate "TPM 2.0 CRB Interface" depends on ACPI - ---help--- + help If you have a TPM security chip that is compliant with the TCG CRB 2.0 TPM specification say Yes and it will be accessible from within Linux. To compile this driver as a module, choose @@ -165,7 +165,7 @@ config TCG_CRB config TCG_VTPM_PROXY tristate "VTPM Proxy Interface" depends on TCG_TPM - ---help--- + help This driver proxies for an emulated TPM (vTPM) running in userspace. A device /dev/vtpmx is provided that creates a device pair /dev/vtpmX and a server-side file descriptor on which the vTPM diff --git a/drivers/char/tpm/eventlog/tpm2.c b/drivers/char/tpm/eventlog/tpm2.c index e741b1157525..37a05800980c 100644 --- a/drivers/char/tpm/eventlog/tpm2.c +++ b/drivers/char/tpm/eventlog/tpm2.c @@ -51,8 +51,7 @@ static void *tpm2_bios_measurements_start(struct seq_file *m, loff_t *pos) int i; event_header = addr; - size = sizeof(struct tcg_pcr_event) - sizeof(event_header->event) - + event_header->event_size; + size = struct_size(event_header, event, event_header->event_size); if (*pos == 0) { if (addr + size < limit) { @@ -98,8 +97,8 @@ static void *tpm2_bios_measurements_next(struct seq_file *m, void *v, event_header = log->bios_event_log; if (v == SEQ_START_TOKEN) { - event_size = sizeof(struct tcg_pcr_event) - - sizeof(event_header->event) + event_header->event_size; + event_size = struct_size(event_header, event, + event_header->event_size); marker = event_header; } else { event = v; @@ -136,9 +135,8 @@ static int tpm2_binary_bios_measurements_show(struct seq_file *m, void *v) size_t size; if (v == SEQ_START_TOKEN) { - size = sizeof(struct tcg_pcr_event) - - sizeof(event_header->event) + event_header->event_size; - + size = struct_size(event_header, event, + event_header->event_size); temp_ptr = event_header; if (size > 0) diff --git a/drivers/char/tpm/st33zp24/Kconfig b/drivers/char/tpm/st33zp24/Kconfig index e582145076dc..601c2ae5bfcb 100644 --- a/drivers/char/tpm/st33zp24/Kconfig +++ b/drivers/char/tpm/st33zp24/Kconfig @@ -1,7 +1,7 @@ # SPDX-License-Identifier: GPL-2.0-only config TCG_TIS_ST33ZP24 tristate - ---help--- + help STMicroelectronics ST33ZP24 core driver. It implements the core TPM1.2 logic and hooks into the TPM kernel APIs. Physical layers will register against it. @@ -13,7 +13,7 @@ config TCG_TIS_ST33ZP24_I2C tristate "STMicroelectronics TPM Interface Specification 1.2 Interface (I2C)" depends on I2C select TCG_TIS_ST33ZP24 - ---help--- + help This module adds support for the STMicroelectronics TPM security chip ST33ZP24 with i2c interface. To compile this driver as a module, choose M here; the module will be @@ -23,7 +23,7 @@ config TCG_TIS_ST33ZP24_SPI tristate "STMicroelectronics TPM Interface Specification 1.2 Interface (SPI)" depends on SPI select TCG_TIS_ST33ZP24 - ---help--- + help This module adds support for the STMicroelectronics TPM security chip ST33ZP24 with spi interface. To compile this driver as a module, choose M here; the module will be diff --git a/drivers/char/tpm/tpm_ftpm_tee.c b/drivers/char/tpm/tpm_ftpm_tee.c index 28da638360d8..2ccdf8ac6994 100644 --- a/drivers/char/tpm/tpm_ftpm_tee.c +++ b/drivers/char/tpm/tpm_ftpm_tee.c @@ -240,7 +240,7 @@ static int ftpm_tee_probe(struct device *dev) /* Open a session with fTPM TA */ memset(&sess_arg, 0, sizeof(sess_arg)); - memcpy(sess_arg.uuid, ftpm_ta_uuid.b, TEE_IOCTL_UUID_LEN); + export_uuid(sess_arg.uuid, &ftpm_ta_uuid); sess_arg.clnt_login = TEE_IOCTL_LOGIN_PUBLIC; sess_arg.num_params = 0; |