[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAHmME9oj5V9eWNtVPZ0HF6Kx0but-4KW-+yQnt_gyGj8w5QPbg@mail.gmail.com>
Date: Mon, 16 Jan 2023 15:03:17 +0100
From: "Jason A. Donenfeld" <Jason@...c4.com>
To: Jarkko Sakkinen <jarkko@...nel.org>
Cc: Thorsten Leemhuis <regressions@...mhuis.info>,
James Bottomley <James.Bottomley@...senpartnership.com>,
Peter Huewe <peterhuewe@....de>,
Jason Gunthorpe <jgg@...pe.ca>, Jan Dabros <jsd@...ihalf.com>,
regressions@...ts.linux.dev, LKML <linux-kernel@...r.kernel.org>,
linux-integrity@...r.kernel.org,
Dominik Brodowski <linux@...inikbrodowski.net>,
Herbert Xu <herbert@...dor.apana.org.au>,
Johannes Altmanninger <aclopte@...il.com>,
stable@...r.kernel.org,
Linus Torvalds <torvalds@...ux-foundation.org>,
Vlastimil Babka <vbabka@...e.cz>
Subject: Re: [PATCH v2] tpm: Allow system suspend to continue when TPM suspend fails
Hi Jarkko,
On Mon, Jan 16, 2023 at 9:12 AM Jarkko Sakkinen <jarkko@...nel.org> wrote:
> > diff --git a/drivers/char/tpm/tpm-interface.c b/drivers/char/tpm/tpm-interface.c
> > index d69905233aff..6df9067ef7f9 100644
> > --- a/drivers/char/tpm/tpm-interface.c
> > +++ b/drivers/char/tpm/tpm-interface.c
> > @@ -412,7 +412,10 @@ int tpm_pm_suspend(struct device *dev)
> > }
> >
> > suspended:
> > - return rc;
> > + if (rc)
> > + pr_err("Unable to suspend tpm-%d (error %d), but continuing system suspend\n",
> > + chip->dev_num, rc);
> > + return 0;
> > }
> > EXPORT_SYMBOL_GPL(tpm_pm_suspend);
> >
> > --
> > 2.39.0
> >
>
> Let me read all the threads through starting from the original report. I've
> had emails piling up because of getting sick before holiday, and holiday
> season after that.
>
> This looks sane
No, not really. I mean, it was sane under the circumstances of, "I'm
not going to spend time fixing this for real if the maintainers aren't
around," and it fixed the suspend issue. But it doesn't actually fix
any real tpm issue. The real issue, AFAICT, is there's some sort of
race between the tpm rng read command and either suspend or wakeup or
selftest. One of these is missing some locking. And then commands step
on each other and the tpm gets upset. This is probably something that
should be fixed. I assume the "Fixes: ..." tag will actually go quite
far back, with recent things only unearthing a somewhat old bug. But
just a hunch.
Jason
Powered by blists - more mailing lists