diff options
author | Stefan Berger <stefanb@linux.vnet.ibm.com> | 2018-06-26 21:09:32 +0200 |
---|---|---|
committer | Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com> | 2018-07-28 16:03:11 +0200 |
commit | 5c2a640aff73914e11ac0db310b32d3b7a1b87ad (patch) | |
tree | 26ab375331cfdd09aabc85709bd3c23c7afa04d3 /security/integrity/ima/ima_queue.c | |
parent | tpm: replace TPM_TRANSMIT_RAW with TPM_TRANSMIT_NESTED (diff) | |
download | linux-5c2a640aff73914e11ac0db310b32d3b7a1b87ad.tar.xz linux-5c2a640aff73914e11ac0db310b32d3b7a1b87ad.zip |
ima: Use tpm_default_chip() and call TPM functions with a tpm_chip
Rather than accessing the TPM functions by passing a NULL pointer for
the tpm_chip, which causes a lookup for a suitable chip every time, get a
hold of a tpm_chip and access the TPM functions using it.
Signed-off-by: Stefan Berger <stefanb@linux.vnet.ibm.com>
Signed-off-by: Mimi Zohar <zohar@linux.vnet.ibm.com>
Reviewed-by: Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com>
Signed-off-by: Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com>
Diffstat (limited to 'security/integrity/ima/ima_queue.c')
-rw-r--r-- | security/integrity/ima/ima_queue.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/security/integrity/ima/ima_queue.c b/security/integrity/ima/ima_queue.c index 418f35e38015..c6303fa19a49 100644 --- a/security/integrity/ima/ima_queue.c +++ b/security/integrity/ima/ima_queue.c @@ -145,7 +145,7 @@ static int ima_pcr_extend(const u8 *hash, int pcr) if (!ima_used_chip) return result; - result = tpm_pcr_extend(NULL, pcr, hash); + result = tpm_pcr_extend(ima_tpm_chip, pcr, hash); if (result != 0) pr_err("Error Communicating to TPM chip, result: %d\n", result); return result; |