2021-01-29 00:57:15

by Jarkko Sakkinen

[permalink] [raw]
Subject: [GIT PULL] tpmdd updates for v5.12-rc1

Hi,

This contains bug fixes for tpm_tis driver, which had a racy wait for
hardware state change to be ready to send a command to the TPM chip. The
bug has existed already since 2006, but has only made itself known in
recent past.

There's also couple of new features:

1. Cr50 I2C driver.
2. Sysfs exports of PCR registers in TPM 2.0 chips.

/Jarkko

The following changes since commit 909b447dcc45db2f9bd5f495f1d16c419812e6df:

Merge tag 'net-5.11-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net (2021-01-28 15:24:43 -0800)

are available in the Git repository at:

git://git.kernel.org/pub/scm/linux/kernel/git/jarkko/linux-tpmdd.git tags/tpmdd-next-v5.12-rc1

for you to fetch changes up to 6171fb34b146ecb5ccc6864e1c34526941fe5d83:

tpm_tis: Clean up locality release (2021-01-29 02:27:15 +0200)

----------------------------------------------------------------
tpmdd updates for Linux v5.12-rc1

----------------------------------------------------------------
Andrew Zaborowski (1):
keys: Update comment for restrict_link_by_key_or_keyring_chain

Duncan Laurie (1):
char: tpm: add i2c driver for cr50

Gustavo A. R. Silva (1):
tpm: Fix fall-through warnings for Clang

James Bottomley (4):
tpm: add sysfs exports for all banks of PCR registers
ABI: add sysfs description for tpm exports of PCR registers
tpm_tis: Fix check_locality for correct locality acquisition
tpm_tis: Clean up locality release

Sebastian Andrzej Siewior (1):
tpm: Remove tpm_dev_wq_lock

Documentation/ABI/stable/sysfs-class-tpm | 14 +
crypto/asymmetric_keys/restrict.c | 7 +-
drivers/char/tpm/Kconfig | 10 +
drivers/char/tpm/Makefile | 2 +
drivers/char/tpm/eventlog/tpm1.c | 1 +
drivers/char/tpm/tpm-dev-common.c | 1 -
drivers/char/tpm/tpm-sysfs.c | 179 +++++++
drivers/char/tpm/tpm_tis_core.c | 50 +-
drivers/char/tpm/tpm_tis_i2c_cr50.c | 790 +++++++++++++++++++++++++++++++
include/linux/tpm.h | 9 +-
10 files changed, 1011 insertions(+), 52 deletions(-)
create mode 100644 drivers/char/tpm/tpm_tis_i2c_cr50.c


2021-01-29 03:42:54

by Linus Torvalds

[permalink] [raw]
Subject: Re: [GIT PULL] tpmdd updates for v5.12-rc1

On Thu, Jan 28, 2021 at 4:54 PM Jarkko Sakkinen <[email protected]> wrote:
>
> This contains bug fixes for tpm_tis driver, which had a racy wait for
> hardware state change to be ready to send a command to the TPM chip. The
> bug has existed already since 2006, but has only made itself known in
> recent past.

Hmm. Is this for the next merge window? The subject line implies that,
as does the addition of the cr50 driver.

But the commentary about fixes implies that at least part of it should
be in 5.11?

Linus

2021-01-30 17:19:27

by Jarkko Sakkinen

[permalink] [raw]
Subject: Re: [GIT PULL] tpmdd updates for v5.12-rc1

On Thu, Jan 28, 2021 at 07:38:21PM -0800, Linus Torvalds wrote:
> On Thu, Jan 28, 2021 at 4:54 PM Jarkko Sakkinen <[email protected]> wrote:
> >
> > This contains bug fixes for tpm_tis driver, which had a racy wait for
> > hardware state change to be ready to send a command to the TPM chip. The
> > bug has existed already since 2006, but has only made itself known in
> > recent past.
>
> Hmm. Is this for the next merge window? The subject line implies that,
> as does the addition of the cr50 driver.
>
> But the commentary about fixes implies that at least part of it should
> be in 5.11?

This was meant for 5.12 but the timing was *way* too early. I'll take this
one back. Just to unambiguity reasons I'll use tpmdd-next-v5.12-rc1-v2 tag
for my final v5.12 PR, once I send it.

I considered a bit, and I really think that it would make a lot of sense
to do a late 5.11 just containing the two commits from James, namely:

1. tpm_tis: Fix check_locality for correct locality acquisition
2. tpm_tis: Clean up locality release

James: Does this make sense to you?

> Linus

/Jarkko

2021-01-30 17:36:52

by James Bottomley

[permalink] [raw]
Subject: Re: [GIT PULL] tpmdd updates for v5.12-rc1

On Sat, 2021-01-30 at 19:15 +0200, Jarkko Sakkinen wrote:
> On Thu, Jan 28, 2021 at 07:38:21PM -0800, Linus Torvalds wrote:
> > On Thu, Jan 28, 2021 at 4:54 PM Jarkko Sakkinen <[email protected]>
> > wrote:
> > > This contains bug fixes for tpm_tis driver, which had a racy wait
> > > for hardware state change to be ready to send a command to the
> > > TPM chip. The bug has existed already since 2006, but has only
> > > made itself known in recent past.
> >
> > Hmm. Is this for the next merge window? The subject line implies
> > that, as does the addition of the cr50 driver.
> >
> > But the commentary about fixes implies that at least part of it
> > should be in 5.11?
>
> This was meant for 5.12 but the timing was *way* too early. I'll take
> this one back. Just to unambiguity reasons I'll use tpmdd-next-v5.12-
> rc1-v2 tag for my final v5.12 PR, once I send it.
>
> I considered a bit, and I really think that it would make a lot of
> sense to do a late 5.11 just containing the two commits from James,
> namely:
>
> 1. tpm_tis: Fix check_locality for correct locality acquisition
> 2. tpm_tis: Clean up locality release
>
> James: Does this make sense to you?

Yes, that's fine with me. It will quiet the warning we've had several
bug reports about, so it's definitely a bug fix.

James


2021-01-30 18:46:18

by Linus Torvalds

[permalink] [raw]
Subject: Re: [GIT PULL] tpmdd updates for v5.12-rc1

On Sat, Jan 30, 2021 at 9:15 AM Jarkko Sakkinen <[email protected]> wrote:
>
> This was meant for 5.12 but the timing was *way* too early. I'll take this
> one back. Just to unambiguity reasons I'll use tpmdd-next-v5.12-rc1-v2 tag
> for my final v5.12 PR, once I send it.
>
> I considered a bit, and I really think that it would make a lot of sense
> to do a late 5.11 just containing the two commits from James

Ok. I'll ignore this pull request, and will expect the "real" ones later.

Thanks,

Linus

2021-02-01 11:35:02

by Jarkko Sakkinen

[permalink] [raw]
Subject: Re: [GIT PULL] tpmdd updates for v5.12-rc1

On Sat, Jan 30, 2021 at 09:33:47AM -0800, James Bottomley wrote:
> On Sat, 2021-01-30 at 19:15 +0200, Jarkko Sakkinen wrote:
> > On Thu, Jan 28, 2021 at 07:38:21PM -0800, Linus Torvalds wrote:
> > > On Thu, Jan 28, 2021 at 4:54 PM Jarkko Sakkinen <[email protected]>
> > > wrote:
> > > > This contains bug fixes for tpm_tis driver, which had a racy wait
> > > > for hardware state change to be ready to send a command to the
> > > > TPM chip. The bug has existed already since 2006, but has only
> > > > made itself known in recent past.
> > >
> > > Hmm. Is this for the next merge window? The subject line implies
> > > that, as does the addition of the cr50 driver.
> > >
> > > But the commentary about fixes implies that at least part of it
> > > should be in 5.11?
> >
> > This was meant for 5.12 but the timing was *way* too early. I'll take
> > this one back. Just to unambiguity reasons I'll use tpmdd-next-v5.12-
> > rc1-v2 tag for my final v5.12 PR, once I send it.
> >
> > I considered a bit, and I really think that it would make a lot of
> > sense to do a late 5.11 just containing the two commits from James,
> > namely:
> >
> > 1. tpm_tis: Fix check_locality for correct locality acquisition
> > 2. tpm_tis: Clean up locality release
> >
> > James: Does this make sense to you?
>
> Yes, that's fine with me. It will quiet the warning we've had several
> bug reports about, so it's definitely a bug fix.

Thanks, this is exactly what I wanted to sanity check. I figured that
those should be enough, but unfortunately I do not have any hardware
triggering the issue in my possession.

> James

/Jarkko

2021-02-02 22:37:13

by Jarkko Sakkinen

[permalink] [raw]
Subject: Re: [GIT PULL] tpmdd updates for v5.12-rc1

On Sat, Jan 30, 2021 at 10:44:24AM -0800, Linus Torvalds wrote:
> On Sat, Jan 30, 2021 at 9:15 AM Jarkko Sakkinen <[email protected]> wrote:
> >
> > This was meant for 5.12 but the timing was *way* too early. I'll take this
> > one back. Just to unambiguity reasons I'll use tpmdd-next-v5.12-rc1-v2 tag
> > for my final v5.12 PR, once I send it.
> >
> > I considered a bit, and I really think that it would make a lot of sense
> > to do a late 5.11 just containing the two commits from James
>
> Ok. I'll ignore this pull request, and will expect the "real" ones later.

Alright, thank you.

> Thanks,
>
> Linus

/Jarkko