Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 165531
b: refs/heads/master
c: 0afd905
h: refs/heads/master
i:
  165529: 1c82c79
  165527: 18c60dd
v: v3
  • Loading branch information
Jason Gunthorpe authored and James Morris committed Sep 23, 2009
1 parent d59dfc0 commit 870209b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 764db03fee50f7a3de91de80ef4a943f0d720801
refs/heads/master: 0afd9056f1b43c9fcbfdf933b263d72023d382fe
5 changes: 2 additions & 3 deletions trunk/drivers/char/tpm/tpm.c
Original file line number Diff line number Diff line change
Expand Up @@ -742,7 +742,7 @@ EXPORT_SYMBOL_GPL(tpm_pcr_read);
* the module usage count.
*/
#define TPM_ORD_PCR_EXTEND cpu_to_be32(20)
#define EXTEND_PCR_SIZE 34
#define EXTEND_PCR_RESULT_SIZE 34
static struct tpm_input_header pcrextend_header = {
.tag = TPM_TAG_RQU_COMMAND,
.length = cpu_to_be32(34),
Expand All @@ -760,10 +760,9 @@ int tpm_pcr_extend(u32 chip_num, int pcr_idx, const u8 *hash)
return -ENODEV;

cmd.header.in = pcrextend_header;
BUILD_BUG_ON(be32_to_cpu(cmd.header.in.length) > EXTEND_PCR_SIZE);
cmd.params.pcrextend_in.pcr_idx = cpu_to_be32(pcr_idx);
memcpy(cmd.params.pcrextend_in.hash, hash, TPM_DIGEST_SIZE);
rc = transmit_cmd(chip, &cmd, cmd.header.in.length,
rc = transmit_cmd(chip, &cmd, EXTEND_PCR_RESULT_SIZE,
"attempting extend a PCR value");

module_put(chip->dev->driver->owner);
Expand Down

0 comments on commit 870209b

Please sign in to comment.