kernel-fxtec-pro1x/drivers/char/tpm
Peter Huewe 07b133e606 char/tpm: simplify duration calculation and eliminate smatch warning.
This patch changes the semantics of the duration calculation for an
ordinal, by masking out the higher bits of a tpm command, which specify
whether it's an TPM_PROTECTED_COMMAND, TPM_UNPROTECTED_COMMAND,
TPM_CONNECTION_COMMAND, TPM_CONNECTION_COMMAND, TPM_VENDOR_COMMAND.
(See TPM Main Spec Part 2 Section 17 for details).

For all TPM_PROTECTED and TPM_CONNECTION commands the results are
unchanged.
The TPM_UNPROTECTED commands are TSS commands and thus irrelevant as
they are not sent to the tpm.
For vendor commands the semantics change for ordinals 10 and 11 but
they were probably wrong anyway.

For everything else which has the ordinal set to 10 or 11 the semantics
change as it now uses TPM_UNDEFINED instead of TPM_SHORT which was
probably wrong anyway (but irrelevant as not defined by the standard).

This patch also gets rid of the (false positive) smatch warning:
 drivers/char/tpm/tpm.c:360 tpm_calc_ordinal_duration() error: buffer
 overflow 'tpm_protected_ordinal_duration' 12 <= 243

Signed-off-by: Peter Huewe <peterhuewe@gmx.de>
Signed-off-by: Kent Yoder <key@linux.vnet.ibm.com>
2013-02-05 09:38:22 -06:00
..
Kconfig drivers/char/tpm: Add new device driver to support IBM vTPM 2012-08-22 16:21:45 -05:00
Makefile driver: add PPI support in tpm driver 2012-08-22 16:23:42 -05:00
tpm.c char/tpm: simplify duration calculation and eliminate smatch warning. 2013-02-05 09:38:22 -06:00
tpm.h driver/char/tpm: fix regression causesd by ppi 2012-10-10 09:50:56 -05:00
tpm_acpi.c tpm: fix tpm_acpi sparse warning on different address spaces 2012-09-12 13:18:31 +10:00
tpm_atmel.c tpm_atmel: Use struct dev_pm_ops for power management 2012-07-10 21:37:02 +02:00
tpm_atmel.h
tpm_eventlog.c tpm: modularize event log collection 2012-08-22 11:11:25 -05:00
tpm_eventlog.h drivers/char/tpm: Add securityfs support for event log 2012-08-22 16:22:47 -05:00
tpm_i2c_infineon.c Char/Misc driver merge for 3.8-rc1 2012-12-11 13:56:38 -08:00
tpm_ibmvtpm.c Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jmorris/linux-security 2012-12-16 15:40:50 -08:00
tpm_ibmvtpm.h drivers/char/tpm: remove tasklet and cleanup 2012-11-01 15:23:14 -05:00
tpm_infineon.c Char/Misc driver merge for 3.8-rc1 2012-12-11 13:56:38 -08:00
tpm_nsc.c tpm_nsc: Use struct dev_pm_ops for power management 2012-07-10 21:37:18 +02:00
tpm_of.c drivers/char/tpm: Add securityfs support for event log 2012-08-22 16:22:47 -05:00
tpm_ppi.c driver/char/tpm: fix regression causesd by ppi 2012-10-10 09:50:56 -05:00
tpm_tis.c Char/Misc driver merge for 3.8-rc1 2012-12-11 13:56:38 -08:00