* [PATCH] tpm: tis_i2c: Fix sanity check interrupt enable mask
@ 2022-08-17 20:03 Eddie James
2022-08-26 4:03 ` Jarkko Sakkinen
2022-11-14 3:16 ` Joel Stanley
0 siblings, 2 replies; 5+ messages in thread
From: Eddie James @ 2022-08-17 20:03 UTC (permalink / raw)
To: linux-integrity
Cc: linux-kernel, Alexander.Steffen, jgg, jarkko, peterhuewe, joel,
Eddie James
The sanity check mask for TPM_INT_ENABLE register was off by 8 bits,
resulting in failure to probe if the TPM_INT_ENABLE register was a
valid value.
Fixes: bbc23a07b072 ("tpm: Add tpm_tis_i2c backend for tpm_tis_core")
Signed-off-by: Eddie James <eajames@linux.ibm.com>
---
drivers/char/tpm/tpm_tis_i2c.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/char/tpm/tpm_tis_i2c.c b/drivers/char/tpm/tpm_tis_i2c.c
index 0692510dfcab..635a69dfcbbd 100644
--- a/drivers/char/tpm/tpm_tis_i2c.c
+++ b/drivers/char/tpm/tpm_tis_i2c.c
@@ -49,7 +49,7 @@
/* Masks with bits that must be read zero */
#define TPM_ACCESS_READ_ZERO 0x48
-#define TPM_INT_ENABLE_ZERO 0x7FFFFF6
+#define TPM_INT_ENABLE_ZERO 0x7FFFFF60
#define TPM_STS_READ_ZERO 0x23
#define TPM_INTF_CAPABILITY_ZERO 0x0FFFF000
#define TPM_I2C_INTERFACE_CAPABILITY_ZERO 0x80000000
--
2.31.1
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH] tpm: tis_i2c: Fix sanity check interrupt enable mask
2022-08-17 20:03 [PATCH] tpm: tis_i2c: Fix sanity check interrupt enable mask Eddie James
@ 2022-08-26 4:03 ` Jarkko Sakkinen
2022-08-26 4:10 ` Jarkko Sakkinen
2022-11-14 3:16 ` Joel Stanley
1 sibling, 1 reply; 5+ messages in thread
From: Jarkko Sakkinen @ 2022-08-26 4:03 UTC (permalink / raw)
To: Eddie James
Cc: linux-integrity, linux-kernel, Alexander.Steffen, jgg, peterhuewe, joel
On Wed, Aug 17, 2022 at 03:03:33PM -0500, Eddie James wrote:
> The sanity check mask for TPM_INT_ENABLE register was off by 8 bits,
> resulting in failure to probe if the TPM_INT_ENABLE register was a
> valid value.
>
> Fixes: bbc23a07b072 ("tpm: Add tpm_tis_i2c backend for tpm_tis_core")
> Signed-off-by: Eddie James <eajames@linux.ibm.com>
> ---
> drivers/char/tpm/tpm_tis_i2c.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/char/tpm/tpm_tis_i2c.c b/drivers/char/tpm/tpm_tis_i2c.c
> index 0692510dfcab..635a69dfcbbd 100644
> --- a/drivers/char/tpm/tpm_tis_i2c.c
> +++ b/drivers/char/tpm/tpm_tis_i2c.c
> @@ -49,7 +49,7 @@
>
> /* Masks with bits that must be read zero */
> #define TPM_ACCESS_READ_ZERO 0x48
> -#define TPM_INT_ENABLE_ZERO 0x7FFFFF6
> +#define TPM_INT_ENABLE_ZERO 0x7FFFFF60
> #define TPM_STS_READ_ZERO 0x23
> #define TPM_INTF_CAPABILITY_ZERO 0x0FFFF000
> #define TPM_I2C_INTERFACE_CAPABILITY_ZERO 0x80000000
> --
> 2.31.1
>
Reviewed-by: Jarkko Sakkinen <jarkko@kernel.org>
Thank you.
BR, Jarkko
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] tpm: tis_i2c: Fix sanity check interrupt enable mask
2022-08-26 4:03 ` Jarkko Sakkinen
@ 2022-08-26 4:10 ` Jarkko Sakkinen
0 siblings, 0 replies; 5+ messages in thread
From: Jarkko Sakkinen @ 2022-08-26 4:10 UTC (permalink / raw)
To: Eddie James
Cc: linux-integrity, linux-kernel, Alexander.Steffen, jgg, peterhuewe, joel
On Fri, Aug 26, 2022 at 07:04:00AM +0300, Jarkko Sakkinen wrote:
> On Wed, Aug 17, 2022 at 03:03:33PM -0500, Eddie James wrote:
> > The sanity check mask for TPM_INT_ENABLE register was off by 8 bits,
> > resulting in failure to probe if the TPM_INT_ENABLE register was a
> > valid value.
> >
> > Fixes: bbc23a07b072 ("tpm: Add tpm_tis_i2c backend for tpm_tis_core")
> > Signed-off-by: Eddie James <eajames@linux.ibm.com>
> > ---
> > drivers/char/tpm/tpm_tis_i2c.c | 2 +-
> > 1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/drivers/char/tpm/tpm_tis_i2c.c b/drivers/char/tpm/tpm_tis_i2c.c
> > index 0692510dfcab..635a69dfcbbd 100644
> > --- a/drivers/char/tpm/tpm_tis_i2c.c
> > +++ b/drivers/char/tpm/tpm_tis_i2c.c
> > @@ -49,7 +49,7 @@
> >
> > /* Masks with bits that must be read zero */
> > #define TPM_ACCESS_READ_ZERO 0x48
> > -#define TPM_INT_ENABLE_ZERO 0x7FFFFF6
> > +#define TPM_INT_ENABLE_ZERO 0x7FFFFF60
> > #define TPM_STS_READ_ZERO 0x23
> > #define TPM_INTF_CAPABILITY_ZERO 0x0FFFF000
> > #define TPM_I2C_INTERFACE_CAPABILITY_ZERO 0x80000000
> > --
> > 2.31.1
> >
>
> Reviewed-by: Jarkko Sakkinen <jarkko@kernel.org>
>
> Thank you.
I used "6.3 Handling of Multi-Byte Registers" I2C specification
to check this. I do not posses I2C chip.
https://trustedcomputinggroup.org/wp-content/uploads/TCG-TPM-I2C-Interface-Specification-v1.00.pdf
BR, Jarkko
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] tpm: tis_i2c: Fix sanity check interrupt enable mask
2022-08-17 20:03 [PATCH] tpm: tis_i2c: Fix sanity check interrupt enable mask Eddie James
2022-08-26 4:03 ` Jarkko Sakkinen
@ 2022-11-14 3:16 ` Joel Stanley
2022-11-26 0:14 ` Jarkko Sakkinen
1 sibling, 1 reply; 5+ messages in thread
From: Joel Stanley @ 2022-11-14 3:16 UTC (permalink / raw)
To: Eddie James
Cc: linux-integrity, linux-kernel, Alexander.Steffen, jgg, jarkko,
peterhuewe
On Wed, 17 Aug 2022 at 20:03, Eddie James <eajames@linux.ibm.com> wrote:
>
> The sanity check mask for TPM_INT_ENABLE register was off by 8 bits,
> resulting in failure to probe if the TPM_INT_ENABLE register was a
> valid value.
>
> Fixes: bbc23a07b072 ("tpm: Add tpm_tis_i2c backend for tpm_tis_core")
> Signed-off-by: Eddie James <eajames@linux.ibm.com>
Tested-by: Joel Stanley <joel@jms.id.au>
Fixes: bbc23a07b072 ("tpm: Add tpm_tis_i2c backend for tpm_tis_core")
Jarkko, do you plan on sending this as a fix?
> ---
> drivers/char/tpm/tpm_tis_i2c.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/char/tpm/tpm_tis_i2c.c b/drivers/char/tpm/tpm_tis_i2c.c
> index 0692510dfcab..635a69dfcbbd 100644
> --- a/drivers/char/tpm/tpm_tis_i2c.c
> +++ b/drivers/char/tpm/tpm_tis_i2c.c
> @@ -49,7 +49,7 @@
>
> /* Masks with bits that must be read zero */
> #define TPM_ACCESS_READ_ZERO 0x48
> -#define TPM_INT_ENABLE_ZERO 0x7FFFFF6
> +#define TPM_INT_ENABLE_ZERO 0x7FFFFF60
> #define TPM_STS_READ_ZERO 0x23
> #define TPM_INTF_CAPABILITY_ZERO 0x0FFFF000
> #define TPM_I2C_INTERFACE_CAPABILITY_ZERO 0x80000000
> --
> 2.31.1
>
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] tpm: tis_i2c: Fix sanity check interrupt enable mask
2022-11-14 3:16 ` Joel Stanley
@ 2022-11-26 0:14 ` Jarkko Sakkinen
0 siblings, 0 replies; 5+ messages in thread
From: Jarkko Sakkinen @ 2022-11-26 0:14 UTC (permalink / raw)
To: Joel Stanley
Cc: Eddie James, linux-integrity, linux-kernel, Alexander.Steffen,
jgg, peterhuewe
On Mon, Nov 14, 2022 at 03:16:00AM +0000, Joel Stanley wrote:
> On Wed, 17 Aug 2022 at 20:03, Eddie James <eajames@linux.ibm.com> wrote:
> >
> > The sanity check mask for TPM_INT_ENABLE register was off by 8 bits,
> > resulting in failure to probe if the TPM_INT_ENABLE register was a
> > valid value.
> >
> > Fixes: bbc23a07b072 ("tpm: Add tpm_tis_i2c backend for tpm_tis_core")
> > Signed-off-by: Eddie James <eajames@linux.ibm.com>
>
> Tested-by: Joel Stanley <joel@jms.id.au>
> Fixes: bbc23a07b072 ("tpm: Add tpm_tis_i2c backend for tpm_tis_core")
>
> Jarkko, do you plan on sending this as a fix?
Thanks for reminding! I picked it.
BR, Jarkko
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2022-11-26 0:14 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-08-17 20:03 [PATCH] tpm: tis_i2c: Fix sanity check interrupt enable mask Eddie James
2022-08-26 4:03 ` Jarkko Sakkinen
2022-08-26 4:10 ` Jarkko Sakkinen
2022-11-14 3:16 ` Joel Stanley
2022-11-26 0:14 ` Jarkko Sakkinen
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).