diff mbox series

tpm/tpm_tis: Disable interrupts for Lenovo Thinkpad E14 Gen 2 and 13s-IML

Message ID 20230807140125.18486-1-tiwai@suse.de (mailing list archive)
State New, archived
Headers show
Series tpm/tpm_tis: Disable interrupts for Lenovo Thinkpad E14 Gen 2 and 13s-IML | expand

Commit Message

Takashi Iwai Aug. 7, 2023, 2:01 p.m. UTC
Like other Lenovo laptops, Thinkpad E14 Gen 2 and Thinkpad 13s-IML
also require to disable the tpm_tis interrupts for avoiding a boot
hang.

Fixes: e644b2f498d2 ("tpm, tpm_tis: Enable interrupt test")
Cc: <stable@vger.kernel.org> # v6.4+
Link: https://bugzilla.suse.com/show_bug.cgi?id=1213779
Signed-off-by: Takashi Iwai <tiwai@suse.de>

---
 drivers/char/tpm/tpm_tis.c | 16 ++++++++++++++++
 1 file changed, 16 insertions(+)

Comments

Jarkko Sakkinen Aug. 7, 2023, 7:14 p.m. UTC | #1
On Mon Aug 7, 2023 at 2:01 PM UTC, Takashi Iwai wrote:
> Like other Lenovo laptops, Thinkpad E14 Gen 2 and Thinkpad 13s-IML
> also require to disable the tpm_tis interrupts for avoiding a boot
> hang.
>
> Fixes: e644b2f498d2 ("tpm, tpm_tis: Enable interrupt test")
> Cc: <stable@vger.kernel.org> # v6.4+
> Link: https://bugzilla.suse.com/show_bug.cgi?id=1213779
> Signed-off-by: Takashi Iwai <tiwai@suse.de>
>
> ---
>  drivers/char/tpm/tpm_tis.c | 16 ++++++++++++++++
>  1 file changed, 16 insertions(+)
>
> diff --git a/drivers/char/tpm/tpm_tis.c b/drivers/char/tpm/tpm_tis.c
> index a98773ac2e55..0633823dc515 100644
> --- a/drivers/char/tpm/tpm_tis.c
> +++ b/drivers/char/tpm/tpm_tis.c
> @@ -130,6 +130,22 @@ static const struct dmi_system_id tpm_tis_dmi_table[] = {
>  			DMI_MATCH(DMI_PRODUCT_NAME, "Laptop (13th Gen Intel Core)"),
>  		},
>  	},
> +	{
> +		.callback = tpm_tis_disable_irq,
> +		.ident = "ThinkPad E14 Gen 2",
> +		.matches = {
> +			DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"),
> +			DMI_MATCH(DMI_PRODUCT_VERSION, "ThinkPad E14 Gen 2"),
> +		},
> +	},
> +	{
> +		.callback = tpm_tis_disable_irq,
> +		.ident = "ThinkBook 13s-IML",
> +		.matches = {
> +			DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"),
> +			DMI_MATCH(DMI_PRODUCT_VERSION, "Lenovo ThinkBook 13s-IML"),
> +		},
> +	},
>  	{
>  		.callback = tpm_tis_disable_irq,
>  		.ident = "ThinkPad T490s",
> -- 
> 2.35.3

As almost all issues are with Lenovo, I would instead just put:

	{
		.callback = tpm_tis_disable_irq,
		.matches = {
			DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"),
		},
	},

And delete the existing entries with vendor as "LENOVO".

BR, Jarkko
Takashi Iwai Aug. 8, 2023, 6:12 a.m. UTC | #2
On Mon, 07 Aug 2023 21:14:20 +0200,
Jarkko Sakkinen wrote:
> 
> On Mon Aug 7, 2023 at 2:01 PM UTC, Takashi Iwai wrote:
> > Like other Lenovo laptops, Thinkpad E14 Gen 2 and Thinkpad 13s-IML
> > also require to disable the tpm_tis interrupts for avoiding a boot
> > hang.
> >
> > Fixes: e644b2f498d2 ("tpm, tpm_tis: Enable interrupt test")
> > Cc: <stable@vger.kernel.org> # v6.4+
> > Link: https://bugzilla.suse.com/show_bug.cgi?id=1213779
> > Signed-off-by: Takashi Iwai <tiwai@suse.de>
> >
> > ---
> >  drivers/char/tpm/tpm_tis.c | 16 ++++++++++++++++
> >  1 file changed, 16 insertions(+)
> >
> > diff --git a/drivers/char/tpm/tpm_tis.c b/drivers/char/tpm/tpm_tis.c
> > index a98773ac2e55..0633823dc515 100644
> > --- a/drivers/char/tpm/tpm_tis.c
> > +++ b/drivers/char/tpm/tpm_tis.c
> > @@ -130,6 +130,22 @@ static const struct dmi_system_id tpm_tis_dmi_table[] = {
> >  			DMI_MATCH(DMI_PRODUCT_NAME, "Laptop (13th Gen Intel Core)"),
> >  		},
> >  	},
> > +	{
> > +		.callback = tpm_tis_disable_irq,
> > +		.ident = "ThinkPad E14 Gen 2",
> > +		.matches = {
> > +			DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"),
> > +			DMI_MATCH(DMI_PRODUCT_VERSION, "ThinkPad E14 Gen 2"),
> > +		},
> > +	},
> > +	{
> > +		.callback = tpm_tis_disable_irq,
> > +		.ident = "ThinkBook 13s-IML",
> > +		.matches = {
> > +			DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"),
> > +			DMI_MATCH(DMI_PRODUCT_VERSION, "Lenovo ThinkBook 13s-IML"),
> > +		},
> > +	},
> >  	{
> >  		.callback = tpm_tis_disable_irq,
> >  		.ident = "ThinkPad T490s",
> > -- 
> > 2.35.3
> 
> As almost all issues are with Lenovo, I would instead just put:
> 
> 	{
> 		.callback = tpm_tis_disable_irq,
> 		.matches = {
> 			DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"),
> 		},
> 	},
> 
> And delete the existing entries with vendor as "LENOVO".

Yeah, that will relieve pains better, too.


thanks,

Takashi
Jarkko Sakkinen Aug. 10, 2023, 3:08 p.m. UTC | #3
On Tue Aug 8, 2023 at 9:12 AM EEST, Takashi Iwai wrote:
> On Mon, 07 Aug 2023 21:14:20 +0200,
> Jarkko Sakkinen wrote:
> > 
> > On Mon Aug 7, 2023 at 2:01 PM UTC, Takashi Iwai wrote:
> > > Like other Lenovo laptops, Thinkpad E14 Gen 2 and Thinkpad 13s-IML
> > > also require to disable the tpm_tis interrupts for avoiding a boot
> > > hang.
> > >
> > > Fixes: e644b2f498d2 ("tpm, tpm_tis: Enable interrupt test")
> > > Cc: <stable@vger.kernel.org> # v6.4+
> > > Link: https://bugzilla.suse.com/show_bug.cgi?id=1213779
> > > Signed-off-by: Takashi Iwai <tiwai@suse.de>
> > >
> > > ---
> > >  drivers/char/tpm/tpm_tis.c | 16 ++++++++++++++++
> > >  1 file changed, 16 insertions(+)
> > >
> > > diff --git a/drivers/char/tpm/tpm_tis.c b/drivers/char/tpm/tpm_tis.c
> > > index a98773ac2e55..0633823dc515 100644
> > > --- a/drivers/char/tpm/tpm_tis.c
> > > +++ b/drivers/char/tpm/tpm_tis.c
> > > @@ -130,6 +130,22 @@ static const struct dmi_system_id tpm_tis_dmi_table[] = {
> > >  			DMI_MATCH(DMI_PRODUCT_NAME, "Laptop (13th Gen Intel Core)"),
> > >  		},
> > >  	},
> > > +	{
> > > +		.callback = tpm_tis_disable_irq,
> > > +		.ident = "ThinkPad E14 Gen 2",
> > > +		.matches = {
> > > +			DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"),
> > > +			DMI_MATCH(DMI_PRODUCT_VERSION, "ThinkPad E14 Gen 2"),
> > > +		},
> > > +	},
> > > +	{
> > > +		.callback = tpm_tis_disable_irq,
> > > +		.ident = "ThinkBook 13s-IML",
> > > +		.matches = {
> > > +			DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"),
> > > +			DMI_MATCH(DMI_PRODUCT_VERSION, "Lenovo ThinkBook 13s-IML"),
> > > +		},
> > > +	},
> > >  	{
> > >  		.callback = tpm_tis_disable_irq,
> > >  		.ident = "ThinkPad T490s",
> > > -- 
> > > 2.35.3
> > 
> > As almost all issues are with Lenovo, I would instead just put:
> > 
> > 	{
> > 		.callback = tpm_tis_disable_irq,
> > 		.matches = {
> > 			DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"),
> > 		},
> > 	},
> > 
> > And delete the existing entries with vendor as "LENOVO".
>
> Yeah, that will relieve pains better, too.

Please do it if possible then :-)

BR, Jarkko
Takashi Iwai Aug. 10, 2023, 3:16 p.m. UTC | #4
On Thu, 10 Aug 2023 17:08:04 +0200,
Jarkko Sakkinen wrote:
> 
> On Tue Aug 8, 2023 at 9:12 AM EEST, Takashi Iwai wrote:
> > On Mon, 07 Aug 2023 21:14:20 +0200,
> > Jarkko Sakkinen wrote:
> > > 
> > > On Mon Aug 7, 2023 at 2:01 PM UTC, Takashi Iwai wrote:
> > > > Like other Lenovo laptops, Thinkpad E14 Gen 2 and Thinkpad 13s-IML
> > > > also require to disable the tpm_tis interrupts for avoiding a boot
> > > > hang.
> > > >
> > > > Fixes: e644b2f498d2 ("tpm, tpm_tis: Enable interrupt test")
> > > > Cc: <stable@vger.kernel.org> # v6.4+
> > > > Link: https://bugzilla.suse.com/show_bug.cgi?id=1213779
> > > > Signed-off-by: Takashi Iwai <tiwai@suse.de>
> > > >
> > > > ---
> > > >  drivers/char/tpm/tpm_tis.c | 16 ++++++++++++++++
> > > >  1 file changed, 16 insertions(+)
> > > >
> > > > diff --git a/drivers/char/tpm/tpm_tis.c b/drivers/char/tpm/tpm_tis.c
> > > > index a98773ac2e55..0633823dc515 100644
> > > > --- a/drivers/char/tpm/tpm_tis.c
> > > > +++ b/drivers/char/tpm/tpm_tis.c
> > > > @@ -130,6 +130,22 @@ static const struct dmi_system_id tpm_tis_dmi_table[] = {
> > > >  			DMI_MATCH(DMI_PRODUCT_NAME, "Laptop (13th Gen Intel Core)"),
> > > >  		},
> > > >  	},
> > > > +	{
> > > > +		.callback = tpm_tis_disable_irq,
> > > > +		.ident = "ThinkPad E14 Gen 2",
> > > > +		.matches = {
> > > > +			DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"),
> > > > +			DMI_MATCH(DMI_PRODUCT_VERSION, "ThinkPad E14 Gen 2"),
> > > > +		},
> > > > +	},
> > > > +	{
> > > > +		.callback = tpm_tis_disable_irq,
> > > > +		.ident = "ThinkBook 13s-IML",
> > > > +		.matches = {
> > > > +			DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"),
> > > > +			DMI_MATCH(DMI_PRODUCT_VERSION, "Lenovo ThinkBook 13s-IML"),
> > > > +		},
> > > > +	},
> > > >  	{
> > > >  		.callback = tpm_tis_disable_irq,
> > > >  		.ident = "ThinkPad T490s",
> > > > -- 
> > > > 2.35.3
> > > 
> > > As almost all issues are with Lenovo, I would instead just put:
> > > 
> > > 	{
> > > 		.callback = tpm_tis_disable_irq,
> > > 		.matches = {
> > > 			DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"),
> > > 		},
> > > 	},
> > > 
> > > And delete the existing entries with vendor as "LENOVO".
> >
> > Yeah, that will relieve pains better, too.
> 
> Please do it if possible then :-)

Do you mean that I should resubmit a new patch?
Honestly speaking, it'd be easier if you can do it directly.
I'm merely a sort of messenger, I don't own / test the device by
myself...

But if inevitably required, I can resubmit a patch, of course.


thanks,

Takashi
Jarkko Sakkinen Aug. 10, 2023, 5:35 p.m. UTC | #5
On Thu Aug 10, 2023 at 6:16 PM EEST, Takashi Iwai wrote:
> On Thu, 10 Aug 2023 17:08:04 +0200,
> Jarkko Sakkinen wrote:
> > 
> > On Tue Aug 8, 2023 at 9:12 AM EEST, Takashi Iwai wrote:
> > > On Mon, 07 Aug 2023 21:14:20 +0200,
> > > Jarkko Sakkinen wrote:
> > > > 
> > > > On Mon Aug 7, 2023 at 2:01 PM UTC, Takashi Iwai wrote:
> > > > > Like other Lenovo laptops, Thinkpad E14 Gen 2 and Thinkpad 13s-IML
> > > > > also require to disable the tpm_tis interrupts for avoiding a boot
> > > > > hang.
> > > > >
> > > > > Fixes: e644b2f498d2 ("tpm, tpm_tis: Enable interrupt test")
> > > > > Cc: <stable@vger.kernel.org> # v6.4+
> > > > > Link: https://bugzilla.suse.com/show_bug.cgi?id=1213779
> > > > > Signed-off-by: Takashi Iwai <tiwai@suse.de>
> > > > >
> > > > > ---
> > > > >  drivers/char/tpm/tpm_tis.c | 16 ++++++++++++++++
> > > > >  1 file changed, 16 insertions(+)
> > > > >
> > > > > diff --git a/drivers/char/tpm/tpm_tis.c b/drivers/char/tpm/tpm_tis.c
> > > > > index a98773ac2e55..0633823dc515 100644
> > > > > --- a/drivers/char/tpm/tpm_tis.c
> > > > > +++ b/drivers/char/tpm/tpm_tis.c
> > > > > @@ -130,6 +130,22 @@ static const struct dmi_system_id tpm_tis_dmi_table[] = {
> > > > >  			DMI_MATCH(DMI_PRODUCT_NAME, "Laptop (13th Gen Intel Core)"),
> > > > >  		},
> > > > >  	},
> > > > > +	{
> > > > > +		.callback = tpm_tis_disable_irq,
> > > > > +		.ident = "ThinkPad E14 Gen 2",
> > > > > +		.matches = {
> > > > > +			DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"),
> > > > > +			DMI_MATCH(DMI_PRODUCT_VERSION, "ThinkPad E14 Gen 2"),
> > > > > +		},
> > > > > +	},
> > > > > +	{
> > > > > +		.callback = tpm_tis_disable_irq,
> > > > > +		.ident = "ThinkBook 13s-IML",
> > > > > +		.matches = {
> > > > > +			DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"),
> > > > > +			DMI_MATCH(DMI_PRODUCT_VERSION, "Lenovo ThinkBook 13s-IML"),
> > > > > +		},
> > > > > +	},
> > > > >  	{
> > > > >  		.callback = tpm_tis_disable_irq,
> > > > >  		.ident = "ThinkPad T490s",
> > > > > -- 
> > > > > 2.35.3
> > > > 
> > > > As almost all issues are with Lenovo, I would instead just put:
> > > > 
> > > > 	{
> > > > 		.callback = tpm_tis_disable_irq,
> > > > 		.matches = {
> > > > 			DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"),
> > > > 		},
> > > > 	},
> > > > 
> > > > And delete the existing entries with vendor as "LENOVO".
> > >
> > > Yeah, that will relieve pains better, too.
> > 
> > Please do it if possible then :-)
>
> Do you mean that I should resubmit a new patch?
> Honestly speaking, it'd be easier if you can do it directly.
> I'm merely a sort of messenger, I don't own / test the device by
> myself...
>
> But if inevitably required, I can resubmit a patch, of course.

I'll submit a patch asap, and cc you. I put the conclusions
to the description.

BR, Jarkko
Takashi Iwai Aug. 10, 2023, 5:48 p.m. UTC | #6
On Thu, 10 Aug 2023 19:35:16 +0200,
Jarkko Sakkinen wrote:
> 
> On Thu Aug 10, 2023 at 6:16 PM EEST, Takashi Iwai wrote:
> > On Thu, 10 Aug 2023 17:08:04 +0200,
> > Jarkko Sakkinen wrote:
> > > 
> > > On Tue Aug 8, 2023 at 9:12 AM EEST, Takashi Iwai wrote:
> > > > On Mon, 07 Aug 2023 21:14:20 +0200,
> > > > Jarkko Sakkinen wrote:
> > > > > 
> > > > > On Mon Aug 7, 2023 at 2:01 PM UTC, Takashi Iwai wrote:
> > > > > > Like other Lenovo laptops, Thinkpad E14 Gen 2 and Thinkpad 13s-IML
> > > > > > also require to disable the tpm_tis interrupts for avoiding a boot
> > > > > > hang.
> > > > > >
> > > > > > Fixes: e644b2f498d2 ("tpm, tpm_tis: Enable interrupt test")
> > > > > > Cc: <stable@vger.kernel.org> # v6.4+
> > > > > > Link: https://bugzilla.suse.com/show_bug.cgi?id=1213779
> > > > > > Signed-off-by: Takashi Iwai <tiwai@suse.de>
> > > > > >
> > > > > > ---
> > > > > >  drivers/char/tpm/tpm_tis.c | 16 ++++++++++++++++
> > > > > >  1 file changed, 16 insertions(+)
> > > > > >
> > > > > > diff --git a/drivers/char/tpm/tpm_tis.c b/drivers/char/tpm/tpm_tis.c
> > > > > > index a98773ac2e55..0633823dc515 100644
> > > > > > --- a/drivers/char/tpm/tpm_tis.c
> > > > > > +++ b/drivers/char/tpm/tpm_tis.c
> > > > > > @@ -130,6 +130,22 @@ static const struct dmi_system_id tpm_tis_dmi_table[] = {
> > > > > >  			DMI_MATCH(DMI_PRODUCT_NAME, "Laptop (13th Gen Intel Core)"),
> > > > > >  		},
> > > > > >  	},
> > > > > > +	{
> > > > > > +		.callback = tpm_tis_disable_irq,
> > > > > > +		.ident = "ThinkPad E14 Gen 2",
> > > > > > +		.matches = {
> > > > > > +			DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"),
> > > > > > +			DMI_MATCH(DMI_PRODUCT_VERSION, "ThinkPad E14 Gen 2"),
> > > > > > +		},
> > > > > > +	},
> > > > > > +	{
> > > > > > +		.callback = tpm_tis_disable_irq,
> > > > > > +		.ident = "ThinkBook 13s-IML",
> > > > > > +		.matches = {
> > > > > > +			DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"),
> > > > > > +			DMI_MATCH(DMI_PRODUCT_VERSION, "Lenovo ThinkBook 13s-IML"),
> > > > > > +		},
> > > > > > +	},
> > > > > >  	{
> > > > > >  		.callback = tpm_tis_disable_irq,
> > > > > >  		.ident = "ThinkPad T490s",
> > > > > > -- 
> > > > > > 2.35.3
> > > > > 
> > > > > As almost all issues are with Lenovo, I would instead just put:
> > > > > 
> > > > > 	{
> > > > > 		.callback = tpm_tis_disable_irq,
> > > > > 		.matches = {
> > > > > 			DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"),
> > > > > 		},
> > > > > 	},
> > > > > 
> > > > > And delete the existing entries with vendor as "LENOVO".
> > > >
> > > > Yeah, that will relieve pains better, too.
> > > 
> > > Please do it if possible then :-)
> >
> > Do you mean that I should resubmit a new patch?
> > Honestly speaking, it'd be easier if you can do it directly.
> > I'm merely a sort of messenger, I don't own / test the device by
> > myself...
> >
> > But if inevitably required, I can resubmit a patch, of course.
> 
> I'll submit a patch asap, and cc you. I put the conclusions
> to the description.

Great, thanks!


Takashi
Jarkko Sakkinen Aug. 10, 2023, 6:26 p.m. UTC | #7
On Thu Aug 10, 2023 at 8:48 PM EEST, Takashi Iwai wrote:
> > I'll submit a patch asap, and cc you. I put the conclusions
> > to the description.
>
> Great, thanks!

It is out now:

https://lore.kernel.org/linux-integrity/20230810182433.518523-1-jarkko@kernel.org/T/#u

BR, Jarkko
Jarkko Sakkinen Aug. 10, 2023, 6:50 p.m. UTC | #8
On Thu Aug 10, 2023 at 9:26 PM EEST, Jarkko Sakkinen wrote:
> On Thu Aug 10, 2023 at 8:48 PM EEST, Takashi Iwai wrote:
> > > I'll submit a patch asap, and cc you. I put the conclusions
> > > to the description.
> >
> > Great, thanks!
>
> It is out now:
>
> https://lore.kernel.org/linux-integrity/20230810182433.518523-1-jarkko@kernel.org/T/#u

I put this also hanging to my -next branch (mirrored to linux-next).

BR, Jarkko
diff mbox series

Patch

diff --git a/drivers/char/tpm/tpm_tis.c b/drivers/char/tpm/tpm_tis.c
index a98773ac2e55..0633823dc515 100644
--- a/drivers/char/tpm/tpm_tis.c
+++ b/drivers/char/tpm/tpm_tis.c
@@ -130,6 +130,22 @@  static const struct dmi_system_id tpm_tis_dmi_table[] = {
 			DMI_MATCH(DMI_PRODUCT_NAME, "Laptop (13th Gen Intel Core)"),
 		},
 	},
+	{
+		.callback = tpm_tis_disable_irq,
+		.ident = "ThinkPad E14 Gen 2",
+		.matches = {
+			DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"),
+			DMI_MATCH(DMI_PRODUCT_VERSION, "ThinkPad E14 Gen 2"),
+		},
+	},
+	{
+		.callback = tpm_tis_disable_irq,
+		.ident = "ThinkBook 13s-IML",
+		.matches = {
+			DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"),
+			DMI_MATCH(DMI_PRODUCT_VERSION, "Lenovo ThinkBook 13s-IML"),
+		},
+	},
 	{
 		.callback = tpm_tis_disable_irq,
 		.ident = "ThinkPad T490s",