New issue
Advanced search Search tips

Issue 658502 link

Starred by 2 users

Issue metadata

Status: Fixed
Owner:
Closed: Oct 2016
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 2
Type: Bug



Sign in to add a comment

Apply tpm fixes from upstream

Project Member Reported by groeck@chromium.org, Oct 22 2016

Issue description

The following tpm bugs have been fixed upstream. Apply to chromeos-4.4.

b7d7b2847107 tpm: invalid self test error message
d4816edfe706 tpm: fix a race condition in tpm2_unseal_trusted()
72fd50e14e46 tpm_crb: fix crb_req_canceled behavior

 
Project Member

Comment 1 by bugdroid1@chromium.org, Oct 25 2016

Labels: merge-merged-chromeos-4.4
The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/third_party/kernel/+/f84db13a6319dd0f6a8500c24ee082344e4fb73c

commit f84db13a6319dd0f6a8500c24ee082344e4fb73c
Author: Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com>
Date: Fri Sep 02 19:34:17 2016

UPSTREAM: tpm_crb: fix crb_req_canceled behavior

The req_canceled() callback is used by tpm_transmit() periodically to
check whether the request has been canceled while it is receiving a
response from the TPM.

The TPM_CRB_CTRL_CANCEL register was cleared already in the crb_cancel
callback, which has two consequences:

* Cancel might not happen.
* req_canceled() always returns zero.

A better place to clear the register is when starting to send a new
command. The behavior of TPM_CRB_CTRL_CANCEL is described in the
section 5.5.3.6 of the PTP specification.

CC: stable@vger.kernel.org
Fixes: 30fc8d138e91 ("tpm: TPM 2.0 CRB Interface")
Signed-off-by: Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com>
(cherry picked from commit 72fd50e14e46dc0edf360631bdece87c2f066a97)

BUG= chromium:658502 
TEST=kernel_TPMPing

Change-Id: Ia8d79516edd953c14b556dafb5296cb112f26ee1
Signed-off-by: Guenter Roeck <groeck@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/402188
Reviewed-by: Andrey Pronin <apronin@chromium.org>

[modify] https://crrev.com/f84db13a6319dd0f6a8500c24ee082344e4fb73c/drivers/char/tpm/tpm_crb.c

Project Member

Comment 2 by bugdroid1@chromium.org, Oct 25 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/third_party/kernel/+/1908b475748fcb4c05b9d66fc7d44c3a0268146b

commit 1908b475748fcb4c05b9d66fc7d44c3a0268146b
Author: Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com>
Date: Tue Aug 16 19:00:38 2016

BACKPORT: tpm: fix a race condition in tpm2_unseal_trusted()

Unseal and load operations should be done as an atomic operation. This
commit introduces unlocked tpm_transmit() so that tpm2_unseal_trusted()
can do the locking by itself.

Fixes: 0fe5480303a1 ("keys, trusted: seal/unseal with TPM 2.0 chips")
Cc: stable@vger.kernel.org
Signed-off-by: Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com>
Reviewed-by: Jason Gunthorpe <jgunthorpe@obsidianresearch.com>
(cherry picked from commit d4816edfe706497a8525480c1685ceb9871bc118)

Conflicts:
	drivers/char/tpm/tpm-interface.c

BUG= chromium:658502 
TEST=kernel_TPMPing

Change-Id: I1b47ae4c0f58d461c6c54c6334c3dc7e801d85e6
Signed-off-by: Guenter Roeck <groeck@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/402189
Reviewed-by: Andrey Pronin <apronin@chromium.org>

[modify] https://crrev.com/1908b475748fcb4c05b9d66fc7d44c3a0268146b/drivers/char/tpm/tpm-sysfs.c
[modify] https://crrev.com/1908b475748fcb4c05b9d66fc7d44c3a0268146b/drivers/char/tpm/tpm.h
[modify] https://crrev.com/1908b475748fcb4c05b9d66fc7d44c3a0268146b/drivers/char/tpm/tpm2-cmd.c
[modify] https://crrev.com/1908b475748fcb4c05b9d66fc7d44c3a0268146b/drivers/char/tpm/tpm-dev.c
[modify] https://crrev.com/1908b475748fcb4c05b9d66fc7d44c3a0268146b/drivers/char/tpm/tpm-interface.c

Project Member

Comment 3 by bugdroid1@chromium.org, Oct 26 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/third_party/kernel/+/7a7eecd4209dfec68c7d3a574adee479b0b3c041

commit 7a7eecd4209dfec68c7d3a574adee479b0b3c041
Author: Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com>
Date: Thu Sep 01 23:36:58 2016

UPSTREAM: tpm: invalid self test error message

The driver emits invalid self test error message even though the init
succeeds.

Signed-off-by: Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com>
Fixes: cae8b441fc20 ("tpm: Factor out common startup code")
Reviewed-by: James Morris <james.l.morris@oracle.com>
(cherry picked from commit b7d7b28471072fc23e7b573aef89c14438092223)

BUG= chromium:658502 
TEST=Ensure that self test error message is gone with tpm2 devices.

Change-Id: Ifb62f6b176396fbbb3485760e4131586f8298dbb
Signed-off-by: Guenter Roeck <groeck@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/402190
Reviewed-by: Andrey Pronin <apronin@chromium.org>

[modify] https://crrev.com/7a7eecd4209dfec68c7d3a574adee479b0b3c041/drivers/char/tpm/tpm2-cmd.c

Comment 4 by groeck@chromium.org, Oct 26 2016

Status: Fixed (was: Started)

Sign in to add a comment