<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/linux.git/drivers/char/tpm, branch linux-4.20.y</title>
<subtitle>Linux kernel stable tree (mirror)</subtitle>
<id>https://git.radix-linux.su/kernel/linux.git/atom?h=linux-4.20.y</id>
<link rel='self' href='https://git.radix-linux.su/kernel/linux.git/atom?h=linux-4.20.y'/>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/'/>
<updated>2019-01-09T16:46:05+00:00</updated>
<entry>
<title>tpm: tpm_i2c_nuvoton: use correct command duration for TPM 2.x</title>
<updated>2019-01-09T16:46:05+00:00</updated>
<author>
<name>Tomas Winkler</name>
<email>tomas.winkler@intel.com</email>
</author>
<published>2018-10-19T18:22:47+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=366c2ab4bbb56c66b448bf53bc3fb166cbdf4ef2'/>
<id>urn:sha1:366c2ab4bbb56c66b448bf53bc3fb166cbdf4ef2</id>
<content type='text'>
commit 2ba5780ce30549cf57929b01d8cba6fe656e31c5 upstream.

tpm_i2c_nuvoton calculated commands duration using TPM 1.x
values via tpm_calc_ordinal_duration() also for TPM 2.x chips.
Call tpm2_calc_ordinal_duration() for retrieving ordinal
duration for TPM 2.X chips.

Cc: stable@vger.kernel.org
Cc: Nayna Jain &lt;nayna@linux.vnet.ibm.com&gt;
Signed-off-by: Tomas Winkler &lt;tomas.winkler@intel.com&gt;
Reviewed-by: Nayna Jain &lt;nayna@linux.ibm.com&gt;
Tested-by: Nayna Jain &lt;nayna@linux.ibm.com&gt; (For TPM 2.0)
Reviewed-by: Jarkko Sakkinen &lt;jarkko.sakkinen@linux.intel.com&gt;
Signed-off-by: Jarkko Sakkinen &lt;jarkko.sakkinen@linux.intel.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>tpm: tpm_try_transmit() refactor error flow.</title>
<updated>2019-01-09T16:46:05+00:00</updated>
<author>
<name>Tomas Winkler</name>
<email>tomas.winkler@intel.com</email>
</author>
<published>2018-10-16T13:37:16+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=13545b0748dc230c0bdf1abe2dd1dbdbd3e8120b'/>
<id>urn:sha1:13545b0748dc230c0bdf1abe2dd1dbdbd3e8120b</id>
<content type='text'>
commit 01f54664a4db0d612de0ece8e0022f21f9374e9b upstream.

First, rename out_no_locality to out_locality for bailing out on
both tpm_cmd_ready() and tpm_request_locality() failure.
Second, ignore the return value of go_to_idle() as  it may override
the return value of the actual tpm operation, the go_to_idle() error
will be caught on any consequent command.
Last, fix the wrong 'goto out', that jumped back instead of forward.

Cc: stable@vger.kernel.org
Fixes: 627448e85c76 ("tpm: separate cmd_ready/go_idle from runtime_pm")
Signed-off-by: Tomas Winkler &lt;tomas.winkler@intel.com&gt;
Reviewed-by: Jarkko Sakkinen &lt;jarkko.sakkinen@linux.intel.com&gt;
Tested-by: Jarkko Sakkinen &lt;jarkko.sakkinen@linux.intel.com&gt;
Signed-off-by: Jarkko Sakkinen &lt;jarkko.sakkinen@linux.intel.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>tpm: Restore functionality to xen vtpm driver.</title>
<updated>2018-10-05T10:47:34+00:00</updated>
<author>
<name>Dr. Greg Wettstein</name>
<email>greg@wind.enjellic.com</email>
</author>
<published>2018-09-17T22:53:33+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=e487a0f52301293152a6f8c4e217f2a11dd808e3'/>
<id>urn:sha1:e487a0f52301293152a6f8c4e217f2a11dd808e3</id>
<content type='text'>
Functionality of the xen-tpmfront driver was lost secondary to
the introduction of xenbus multi-page support in commit ccc9d90a9a8b
("xenbus_client: Extend interface to support multi-page ring").

In this commit pointer to location of where the shared page address
is stored was being passed to the xenbus_grant_ring() function rather
then the address of the shared page itself. This resulted in a situation
where the driver would attach to the vtpm-stubdom but any attempt
to send a command to the stub domain would timeout.

A diagnostic finding for this regression is the following error
message being generated when the xen-tpmfront driver probes for a
device:

&lt;3&gt;vtpm vtpm-0: tpm_transmit: tpm_send: error -62

&lt;3&gt;vtpm vtpm-0: A TPM error (-62) occurred attempting to determine
the timeouts

This fix is relevant to all kernels from 4.1 forward which is the
release in which multi-page xenbus support was introduced.

Daniel De Graaf formulated the fix by code inspection after the
regression point was located.

Fixes: ccc9d90a9a8b ("xenbus_client: Extend interface to support multi-page ring")
Signed-off-by: Dr. Greg Wettstein &lt;greg@enjellic.com&gt;

[boris: Updated commit message, added Fixes tag]
Signed-off-by: Boris Ostrovsky &lt;boris.ostrovsky@oracle.com&gt;
Cc: stable@vger.kernel.org # v4.1+
Reviewed-by: Jarkko Sakkinen &lt;jarkko.sakkinen@linux.intel.com&gt;
Signed-off-by: Jarkko Sakkinen &lt;jarkko.sakkinen@linux.intel.com&gt;
</content>
</entry>
<entry>
<title>tpm: add support for nonblocking operation</title>
<updated>2018-10-05T10:47:33+00:00</updated>
<author>
<name>Tadeusz Struk</name>
<email>tadeusz.struk@intel.com</email>
</author>
<published>2018-09-10T17:18:33+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=9e1b74a63f7760b525295161fc608b19b8ee19c4'/>
<id>urn:sha1:9e1b74a63f7760b525295161fc608b19b8ee19c4</id>
<content type='text'>
Currently the TPM driver only supports blocking calls, which doesn't allow
asynchronous IO operations to the TPM hardware.
This patch changes it and adds support for nonblocking write and a new poll
function to enable applications, which want to take advantage of this.

Tested-by: Philip Tricca &lt;philip.b.tricca@intel.com&gt;
Signed-off-by: Tadeusz Struk &lt;tadeusz.struk@intel.com&gt;
Reviewed-by: Jarkko Sakkinen &lt;jarkko.sakkinen@linux.intel.com&gt;
Signed-off--by: Jarkko Sakkinen &lt;jarkko.sakkinen@linux.intel.com&gt;
</content>
</entry>
<entry>
<title>tpm: add ptr to the tpm_space struct to file_priv</title>
<updated>2018-10-05T10:47:33+00:00</updated>
<author>
<name>Tadeusz Struk</name>
<email>tadeusz.struk@intel.com</email>
</author>
<published>2018-09-10T17:18:28+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=c3d477a725ef6b3d17609d5dafc644cccc070cb9'/>
<id>urn:sha1:c3d477a725ef6b3d17609d5dafc644cccc070cb9</id>
<content type='text'>
Add a ptr to struct tpm_space to the file_priv and consolidate
of the write operations for the two interfaces.

Signed-off-by: Tadeusz Struk &lt;tadeusz.struk@intel.com&gt;
Tested-by: Philip Tricca &lt;philip.b.tricca@intel.com&gt;
Reviewed-by: Jarkko Sakkinen &lt;jarkko.sakkinen@linux.intel.com&gt;
Signed-off--by: Jarkko Sakkinen &lt;jarkko.sakkinen@linux.intel.com&gt;
</content>
</entry>
<entry>
<title>tpm: Make SECURITYFS a weak dependency</title>
<updated>2018-10-05T10:47:33+00:00</updated>
<author>
<name>Peter Huewe</name>
<email>peterhuewe@gmx.de</email>
</author>
<published>2018-09-03T19:51:51+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=2f7d8dbb11287cbe9da6380ca14ed5d38c9ed91f'/>
<id>urn:sha1:2f7d8dbb11287cbe9da6380ca14ed5d38c9ed91f</id>
<content type='text'>
While having SECURITYFS enabled for the tpm subsystem is beneficial in
most cases, it is not strictly necessary to have it enabled at all.
Especially on platforms without any boot firmware integration of the TPM
(e.g. raspberry pi) it does not add any value for the tpm subsystem,
as there is no eventlog present.

By turning it from 'select' to 'imply' it still gets selected per
default, but enables users who want to save some kb of ram by turning
SECURITYFS off.

Signed-off-by: Peter Huewe &lt;peterhuewe@gmx.de&gt;
Reviewed-by: Jarkko Sakkinen &lt;jarkko.sakkinen@linux.intel.com&gt;
Signed-off-by: Jarkko Sakkinen &lt;jarkko.sakkinen@linux.intel.com&gt;
</content>
</entry>
<entry>
<title>tpm: suppress transmit cmd error logs when TPM 1.2 is disabled/deactivated</title>
<updated>2018-10-05T10:47:33+00:00</updated>
<author>
<name>Javier Martinez Canillas</name>
<email>javierm@redhat.com</email>
</author>
<published>2018-08-30T14:40:05+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=0d6d0d62d9505a9816716aa484ebd0b04c795063'/>
<id>urn:sha1:0d6d0d62d9505a9816716aa484ebd0b04c795063</id>
<content type='text'>
For TPM 1.2 chips the system setup utility allows to set the TPM device in
one of the following states:

  * Active: Security chip is functional
  * Inactive: Security chip is visible, but is not functional
  * Disabled: Security chip is hidden and is not functional

When choosing the "Inactive" state, the TPM 1.2 device is enumerated and
registered, but sending TPM commands fail with either TPM_DEACTIVATED or
TPM_DISABLED depending if the firmware deactivated or disabled the TPM.

Since these TPM 1.2 error codes don't have special treatment, inactivating
the TPM leads to a very noisy kernel log buffer that shows messages like
the following:

  tpm_tis 00:05: 1.2 TPM (device-id 0x0, rev-id 78)
  tpm tpm0: A TPM error (6) occurred attempting to read a pcr value
  tpm tpm0: TPM is disabled/deactivated (0x6)
  tpm tpm0: A TPM error (6) occurred attempting get random
  tpm tpm0: A TPM error (6) occurred attempting to read a pcr value
  ima: No TPM chip found, activating TPM-bypass! (rc=6)
  tpm tpm0: A TPM error (6) occurred attempting get random
  tpm tpm0: A TPM error (6) occurred attempting get random
  tpm tpm0: A TPM error (6) occurred attempting get random
  tpm tpm0: A TPM error (6) occurred attempting get random

Let's just suppress error log messages for the TPM_{DEACTIVATED,DISABLED}
return codes, since this is expected when the TPM 1.2 is set to Inactive.

In that case the kernel log is cleaner and less confusing for users, i.e:

  tpm_tis 00:05: 1.2 TPM (device-id 0x0, rev-id 78)
  tpm tpm0: TPM is disabled/deactivated (0x6)
  ima: No TPM chip found, activating TPM-bypass! (rc=6)

Reported-by: Hans de Goede &lt;hdegoede@redhat.com&gt;
Signed-off-by: Javier Martinez Canillas &lt;javierm@redhat.com&gt;
Reviewed-by: Jarkko Sakkinen &lt;jarkko.sakkinen@linux.intel.com&gt;
Signed-off-by: Jarkko Sakkinen &lt;jarkko.sakkinen@linux.intel.com&gt;
</content>
</entry>
<entry>
<title>tpm: fix response size validation in tpm_get_random()</title>
<updated>2018-10-05T10:47:33+00:00</updated>
<author>
<name>Jarkko Sakkinen</name>
<email>jarkko.sakkinen@linux.intel.com</email>
</author>
<published>2018-09-03T01:01:26+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=84b59f6487d82d3ab4247a099aba66d4d17e8b08'/>
<id>urn:sha1:84b59f6487d82d3ab4247a099aba66d4d17e8b08</id>
<content type='text'>
When checking whether the response is large enough to be able to contain
the received random bytes in tpm_get_random() and tpm2_get_random(),
they fail to take account the header size, which should be added to the
minimum size. This commit fixes this issue.

Cc: stable@vger.kernel.org
Fixes: c659af78eb7b ("tpm: Check size of response before accessing data")
Signed-off-by: Jarkko Sakkinen &lt;jarkko.sakkinen@linux.intel.com&gt;
</content>
</entry>
<entry>
<title>tpm: replace TPM_TRANSMIT_RAW with TPM_TRANSMIT_NESTED</title>
<updated>2018-07-28T14:03:11+00:00</updated>
<author>
<name>Jarkko Sakkinen</name>
<email>jarkko.sakkinen@linux.intel.com</email>
</author>
<published>2018-06-29T12:24:50+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=58bac8cc3010ccb845572a3512fc16c9aaa5e50e'/>
<id>urn:sha1:58bac8cc3010ccb845572a3512fc16c9aaa5e50e</id>
<content type='text'>
As TPM_TRANSMIT_RAW always requires also not to take locks for obvious
reasons (deadlock), this commit renames the flag as TPM_TRANSMIT_NESTED
and prevents taking tpm_mutex when the flag is given to tpm_transmit().

Suggested-by: Tomas Winkler &lt;tomas.winkler@intel.com&gt;
Signed-off-by: Jarkko Sakkinen &lt;jarkko.sakkinen@linux.intel.com&gt;
</content>
</entry>
<entry>
<title>tpm: Convert tpm_find_get_ops() to use tpm_default_chip()</title>
<updated>2018-07-28T14:03:11+00:00</updated>
<author>
<name>Stefan Berger</name>
<email>stefanb@linux.vnet.ibm.com</email>
</author>
<published>2018-06-26T19:09:31+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=eccc9bb844838b6b7a9691b31747416c4c34a83f'/>
<id>urn:sha1:eccc9bb844838b6b7a9691b31747416c4c34a83f</id>
<content type='text'>
Convert tpm_find_get_ops() to use tpm_default_chip() in case no chip
is passed in.

Signed-off-by: Stefan Berger &lt;stefanb@linux.vnet.ibm.com&gt;
Reviewed-by: Jarkko Sakkinen &lt;jarkko.sakkinen@linux.intel.com&gt;
Tested-by: Jarkko Sakkinen &lt;jarkko.sakkinen@linux.intel.com&gt;
Signed-off-by: Jarkko Sakkinen &lt;jarkko.sakkinen@linux.intel.com&gt;
</content>
</entry>
</feed>
