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

2021-02-02 Thread Jarkko Sakkinen
On Sat, Jan 30, 2021 at 10:44:24AM -0800, Linus Torvalds wrote:
> On Sat, Jan 30, 2021 at 9:15 AM Jarkko Sakkinen  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


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

2021-02-01 Thread Jarkko Sakkinen
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 
> > > 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


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

2021-01-30 Thread Linus Torvalds
On Sat, Jan 30, 2021 at 9:15 AM Jarkko Sakkinen  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


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

2021-01-30 Thread James Bottomley
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 
> > 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




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

2021-01-30 Thread Jarkko Sakkinen
On Thu, Jan 28, 2021 at 07:38:21PM -0800, Linus Torvalds wrote:
> On Thu, Jan 28, 2021 at 4:54 PM Jarkko Sakkinen  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


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

2021-01-28 Thread Linus Torvalds
On Thu, Jan 28, 2021 at 4:54 PM Jarkko Sakkinen  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


[GIT PULL] tpmdd updates for v5.12-rc1

2021-01-28 Thread Jarkko Sakkinen
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