From: Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com>
To: Sasha Levin <sashal@kernel.org>
Cc: Doug Anderson <dianders@chromium.org>,
LKML <linux-kernel@vger.kernel.org>,
"# 4.0+" <stable@vger.kernel.org>,
Vadim Sukhomlinov <sukhomlinov@google.com>,
linux-integrity@vger.kernel.org, Jason Gunthorpe <jgg@ziepe.ca>
Subject: Re: [PATCH AUTOSEL 4.19 126/167] tpm: Fix TPM 1.2 Shutdown sequence to prevent future TPM operations
Date: Sun, 15 Sep 2019 16:19:24 +0100 [thread overview]
Message-ID: <20190915151924.GA30709@linux.intel.com> (raw)
In-Reply-To: <20190909162808.ggcnrtvbvor7deqy@linux.intel.com>
On Mon, Sep 09, 2019 at 05:28:08PM +0100, Jarkko Sakkinen wrote:
> On Sat, Sep 07, 2019 at 06:04:48PM -0400, Sasha Levin wrote:
> > On Sat, Sep 07, 2019 at 09:55:18PM +0300, Jarkko Sakkinen wrote:
> > > On Tue, 2019-09-03 at 15:43 -0400, Sasha Levin wrote:
> > > > Right. I gave a go at backporting a few patches and this happens to be
> > > > one of them. It will be a while before it goes in a stable tree
> > > > (probably way after after LPC).
> > >
> > > It *semantically* depends on
> > >
> > > db4d8cb9c9f2 ("tpm: use tpm_try_get_ops() in tpm-sysfs.c.")
> > >
> > > I.e. can cause crashes without the above patch. As a code change your
> > > patch is fine but it needs the above patch backported to work in stable
> > > manner.
> > >
> > > So... either I can backport that one (because ultimately I have
> > > responsibility to do that as the maintainer) but if you want to finish
> > > this one that is what you need to backport in addition and then it
> > > should be fine.
> >
> > If you're ok with the backport of this commit, I can just add
> > db4d8cb9c9f2 on top.
>
> Sure, I've already gave my promise to do that :-)
I ended up with:
db4d8cb9c9f2 tpm: Fix TPM 1.2 Shutdown sequence to prevent future TPM operations
2677ca98ae37 tpm: use tpm_try_get_ops() in tpm-sysfs.c.
da379f3c1db0 tpm: migrate pubek_show to struct tpm_buf
Since some time has passed I'l just restate that the reason for
backporting 2677ca98ae37 was that tpm_class_shutdown() could pull carpet
under the TPM 1.2 code. tpm_try_get_ops() makes sure that read lock is
taken and chip->ops is not NULL if it successfully returns.
Still need to test the patches with TPM 1.2 hardware before I can send
them.
/Jarkko
next prev parent reply other threads:[~2019-09-15 15:19 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20190903162519.7136-1-sashal@kernel.org>
2019-09-03 16:23 ` [PATCH AUTOSEL 4.19 062/167] tpm: Fix some name collisions with drivers/char/tpm.h Sasha Levin
2019-09-03 16:24 ` [PATCH AUTOSEL 4.19 126/167] tpm: Fix TPM 1.2 Shutdown sequence to prevent future TPM operations Sasha Levin
2019-09-03 16:39 ` Doug Anderson
2019-09-03 16:53 ` Jerry Snitselaar
2019-09-03 19:43 ` Sasha Levin
2019-09-07 18:55 ` Jarkko Sakkinen
2019-09-07 22:04 ` Sasha Levin
2019-09-09 16:28 ` Jarkko Sakkinen
2019-09-11 7:56 ` Sasha Levin
2019-09-15 15:19 ` Jarkko Sakkinen [this message]
2019-09-07 16:55 ` Jarkko Sakkinen
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20190915151924.GA30709@linux.intel.com \
--to=jarkko.sakkinen@linux.intel.com \
--cc=dianders@chromium.org \
--cc=jgg@ziepe.ca \
--cc=linux-integrity@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=sashal@kernel.org \
--cc=stable@vger.kernel.org \
--cc=sukhomlinov@google.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).