summaryrefslogtreecommitdiffstats
path: root/drivers/char/tpm
diff options
context:
space:
mode:
authorStefan Berger2017-01-31 19:43:59 +0100
committerJarkko Sakkinen2017-02-03 21:03:14 +0100
commita118cf2a5b5a0d4541d04e8e8fcde8564803330c (patch)
treebe1c5e34aa6771b89c9b898d7e7ae90ee8cb9fea /drivers/char/tpm
parenttpm: add securityfs support for TPM 2.0 firmware event log (diff)
downloadkernel-qcow2-linux-a118cf2a5b5a0d4541d04e8e8fcde8564803330c.tar.gz
kernel-qcow2-linux-a118cf2a5b5a0d4541d04e8e8fcde8564803330c.tar.xz
kernel-qcow2-linux-a118cf2a5b5a0d4541d04e8e8fcde8564803330c.zip
tpm: fix the type of owned field in cap_t
In cap_t the size of the type bool is assumed to be one byte. This commit sorts out the issue by changing the type to u8. Fixes: c659af78eb7b ("tpm: Check size of response before accessing data") Signed-off-by: Stefan Berger <stefanb@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 'drivers/char/tpm')
-rw-r--r--drivers/char/tpm/tpm.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/char/tpm/tpm.h b/drivers/char/tpm/tpm.h
index bff37be04b46..6b4e7aaa722f 100644
--- a/drivers/char/tpm/tpm.h
+++ b/drivers/char/tpm/tpm.h
@@ -281,7 +281,7 @@ struct permanent_flags_t {
typedef union {
struct permanent_flags_t perm_flags;
struct stclear_flags_t stclear_flags;
- bool owned;
+ __u8 owned;
__be32 num_pcrs;
struct tpm_version_t tpm_version;
struct tpm_version_1_2_t tpm_version_1_2;