summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorJames Morris <james.morris@microsoft.com>2018-12-17 11:31:58 -0800
committerJames Morris <james.morris@microsoft.com>2018-12-17 11:31:58 -0800
commit0db51ef26e87845d1748c363702585e2f0a06266 (patch)
tree0af0ee72e875d4d15ca62cba7d491ce6bdfbf086 /include
parent8bd8ea195f6d135a8d85201116314eb5237ad7e7 (diff)
parent9488585b21bef0df1217e510c7134905d1d376a7 (diff)
downloadlinux-stable-0db51ef26e87845d1748c363702585e2f0a06266.tar.gz
linux-stable-0db51ef26e87845d1748c363702585e2f0a06266.tar.bz2
linux-stable-0db51ef26e87845d1748c363702585e2f0a06266.zip
Merge tag 'tpmdd-next-20181217' of git://git.infradead.org/users/jjs/linux-tpmdd into next-tpm
tpmdd updates for Linux v4.21 From Jarkko: v4.21 updates: * Support for partial reads of /dev/tpm0. * Clean up for TPM 1.x code: move the commands to tpm1-cmd.c and make everything to use the same data structure for building TPM commands i.e. struct tpm_buf.
Diffstat (limited to 'include')
-rw-r--r--include/linux/tpm.h11
1 files changed, 7 insertions, 4 deletions
diff --git a/include/linux/tpm.h b/include/linux/tpm.h
index 4609b94142d4..b49a55cf775f 100644
--- a/include/linux/tpm.h
+++ b/include/linux/tpm.h
@@ -53,8 +53,8 @@ struct tpm_class_ops {
#if defined(CONFIG_TCG_TPM) || defined(CONFIG_TCG_TPM_MODULE)
extern int tpm_is_tpm2(struct tpm_chip *chip);
-extern int tpm_pcr_read(struct tpm_chip *chip, int pcr_idx, u8 *res_buf);
-extern int tpm_pcr_extend(struct tpm_chip *chip, int pcr_idx, const u8 *hash);
+extern int tpm_pcr_read(struct tpm_chip *chip, u32 pcr_idx, u8 *res_buf);
+extern int tpm_pcr_extend(struct tpm_chip *chip, u32 pcr_idx, const u8 *hash);
extern int tpm_send(struct tpm_chip *chip, void *cmd, size_t buflen);
extern int tpm_get_random(struct tpm_chip *chip, u8 *data, size_t max);
extern int tpm_seal_trusted(struct tpm_chip *chip,
@@ -69,15 +69,18 @@ static inline int tpm_is_tpm2(struct tpm_chip *chip)
{
return -ENODEV;
}
-static inline int tpm_pcr_read(struct tpm_chip *chip, int pcr_idx, u8 *res_buf)
+
+static inline int tpm_pcr_read(struct tpm_chip *chip, u32 pcr_idx, u8 *res_buf)
{
return -ENODEV;
}
-static inline int tpm_pcr_extend(struct tpm_chip *chip, int pcr_idx,
+
+static inline int tpm_pcr_extend(struct tpm_chip *chip, u32 pcr_idx,
const u8 *hash)
{
return -ENODEV;
}
+
static inline int tpm_send(struct tpm_chip *chip, void *cmd, size_t buflen)
{
return -ENODEV;