From: Tomas Winkler <tomas.winkler@intel.com>
To: Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com>,
Jason Gunthorpe <jgg@ziepe.ca>
Cc: Alexander Usyskin <alexander.usyskin@intel.com>,
linux-integrity@vger.kernel.org,
linux-security-module@vger.kernel.org,
linux-kernel@vger.kernel.org,
Tomas Winkler <tomas.winkler@intel.com>
Subject: [PATCH 6/6] tpm: tpm-interface: drop unused tpm_input_header headers.
Date: Mon, 5 Mar 2018 22:20:17 +0200 [thread overview]
Message-ID: <20180305202017.24008-7-tomas.winkler@intel.com> (raw)
In-Reply-To: <20180305202017.24008-1-tomas.winkler@intel.com>
PRC extend and get capability were reimplemented using
tpm_buf_ interface and the dangling tpm_input_headers can be dropped.
together with now unused constants.
Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
---
drivers/char/tpm/tpm-interface.c | 16 +---------------
1 file changed, 1 insertion(+), 15 deletions(-)
diff --git a/drivers/char/tpm/tpm-interface.c b/drivers/char/tpm/tpm-interface.c
index 7f6968b750c8..ebf52b48d727 100644
--- a/drivers/char/tpm/tpm-interface.c
+++ b/drivers/char/tpm/tpm-interface.c
@@ -355,16 +355,7 @@ int tpm_startup(struct tpm_chip *chip)
}
#define TPM_DIGEST_SIZE 20
-#define TPM_RET_CODE_IDX 6
-#define TPM_INTERNAL_RESULT_SIZE 200
#define TPM_ORD_GET_CAP 101
-#define TPM_ORD_GET_RANDOM 70
-
-static const struct tpm_input_header tpm_getcap_header = {
- .tag = cpu_to_be16(TPM_TAG_RQU_COMMAND),
- .length = cpu_to_be32(22),
- .ordinal = cpu_to_be32(TPM_ORD_GET_CAP)
-};
ssize_t tpm_getcap(struct tpm_chip *chip, u32 subcap_id, cap_t *cap,
const char *desc, size_t min_cap_length)
@@ -517,12 +508,6 @@ EXPORT_SYMBOL_GPL(tpm_pcr_read);
#define TPM_ORD_PCR_EXTEND 20
#define EXTEND_PCR_RESULT_SIZE 34
#define EXTEND_PCR_RESULT_BODY_SIZE 20
-static const struct tpm_input_header pcrextend_header = {
- .tag = cpu_to_be16(TPM_TAG_RQU_COMMAND),
- .length = cpu_to_be32(34),
- .ordinal = cpu_to_be32(TPM_ORD_PCR_EXTEND)
-};
-
static int tpm1_pcr_extend(struct tpm_chip *chip, int pcr_idx, const u8 *hash,
char *log_msg)
{
@@ -782,6 +767,7 @@ int tpm_pm_resume(struct device *dev)
EXPORT_SYMBOL_GPL(tpm_pm_resume);
#define TPM_GETRANDOM_RESULT_SIZE 18
+#define TPM_ORD_GET_RANDOM 70
static const struct tpm_input_header tpm_getrandom_header = {
.tag = cpu_to_be16(TPM_TAG_RQU_COMMAND),
.length = cpu_to_be32(14),
--
2.14.3
prev parent reply other threads:[~2018-03-05 20:24 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-03-05 20:20 [PATCH 0/6] tpm: timeouts revamp Tomas Winkler
2018-03-05 20:20 ` [PATCH 1/6] tpm: sort objects in the Makefile Tomas Winkler
2018-03-05 21:12 ` Jason Gunthorpe
2018-03-05 21:21 ` Winkler, Tomas
2018-03-05 22:08 ` Jason Gunthorpe
2018-03-05 23:11 ` Winkler, Tomas
2018-03-05 20:20 ` [PATCH 2/6] tpm: factor out tpm 1.2 duration calculation to tpm1-cmd.c Tomas Winkler
2018-03-06 11:19 ` Jarkko Sakkinen
2018-03-06 11:21 ` Winkler, Tomas
2018-03-06 13:55 ` Jarkko Sakkinen
2018-03-05 20:20 ` [PATCH 3/6] tpm2: add longer timeouts for creation commands Tomas Winkler
2018-03-05 20:20 ` [PATCH 4/6] tpm2: add new tpm2 commands according to TCG 1.36 Tomas Winkler
2018-03-05 20:20 ` [PATCH 5/6] tmp: factor out tpm_get_timeouts Tomas Winkler
2018-03-05 20:20 ` Tomas Winkler [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20180305202017.24008-7-tomas.winkler@intel.com \
--to=tomas.winkler@intel.com \
--cc=alexander.usyskin@intel.com \
--cc=jarkko.sakkinen@linux.intel.com \
--cc=jgg@ziepe.ca \
--cc=linux-integrity@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-security-module@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Powered by JetHome