<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel.git/drivers/char/tpm, branch linux-4.7.y</title>
<subtitle>Hosts the 0x221E linux distro kernel.
</subtitle>
<id>https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-4.7.y</id>
<link rel='self' href='https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-4.7.y'/>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/'/>
<updated>2016-10-16T15:50:39Z</updated>
<entry>
<title>tpm_crb: fix crb_req_canceled behavior</title>
<updated>2016-10-16T15:50:39Z</updated>
<author>
<name>Jarkko Sakkinen</name>
</author>
<published>2016-09-02T19:34:17Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=257ab687d2679621118ac1468434322d7d44e546'/>
<id>urn:sha1:257ab687d2679621118ac1468434322d7d44e546</id>
<content type='text'>
commit 72fd50e14e46dc0edf360631bdece87c2f066a97 upstream.

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.

Fixes: 30fc8d138e91 ("tpm: TPM 2.0 CRB Interface")
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: fix a race condition in tpm2_unseal_trusted()</title>
<updated>2016-10-16T15:50:39Z</updated>
<author>
<name>Jarkko Sakkinen</name>
</author>
<published>2016-08-16T19:00:38Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=b7bab5ad129477c430f3c138fd597e14916961a6'/>
<id>urn:sha1:b7bab5ad129477c430f3c138fd597e14916961a6</id>
<content type='text'>
commit d4816edfe706497a8525480c1685ceb9871bc118 upstream.

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")
Signed-off-by: Jarkko Sakkinen &lt;jarkko.sakkinen@linux.intel.com&gt;
Reviewed-by: Jason Gunthorpe &lt;jgunthorpe@obsidianresearch.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>tpm_crb: fix mapping of the buffers</title>
<updated>2016-10-07T13:21:27Z</updated>
<author>
<name>Jarkko Sakkinen</name>
</author>
<published>2016-04-19T09:54:18Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=8e20d9300ac8d29bd5ce8f9e6f635af2c696bab8'/>
<id>urn:sha1:8e20d9300ac8d29bd5ce8f9e6f635af2c696bab8</id>
<content type='text'>
commit 422eac3f7deae34dbaffd08e03e27f37a5394a56 upstream.

On my Lenovo x250 the following situation occurs:

[18697.813871] tpm_crb MSFT0101:00: can't request region for resource
[mem 0xacdff080-0xacdfffff]

The mapping of the control area overlaps the mapping of the command
buffer. The control area is mapped over page, which is not right. It
should mapped over sizeof(struct crb_control_area).

Fixing this issue unmasks another issue. Command and response buffers
can overlap and they do interleave on this machine. According to the PTP
specification the overlapping means that they are mapped to the same
buffer.

The commit has been also on a Haswell NUC where things worked before
applying this fix so that the both code paths for response buffer
initialization are tested.

Cc: stable@vger.kernel.org
Fixes: 1bd047be37d9 ("tpm_crb: Use devm_ioremap_resource")
Signed-off-by: Jarkko Sakkinen &lt;jarkko.sakkinen@linux.intel.com&gt;
Reviewed-by: Jason Gunthorpe &lt;jgunthorpe@obsidianresearch.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>tpm_crb: drop struct resource res from struct crb_priv</title>
<updated>2016-10-07T13:21:27Z</updated>
<author>
<name>Jarkko Sakkinen</name>
</author>
<published>2016-03-15T19:41:40Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=5a58005763c3e66468814706eeb79999525a6cf5'/>
<id>urn:sha1:5a58005763c3e66468814706eeb79999525a6cf5</id>
<content type='text'>
commit 14ddfbf488a0223b19abf7e4634e6e676a91a12d upstream.

The iomem resource is needed only temporarily so it is better to pass
it on instead of storing it permanently. Named the variable as io_res
so that the code better documents itself.

Signed-off-by: Jarkko Sakkinen &lt;jarkko.sakkinen@linux.intel.com&gt;
Reviewed-by: Stefan Berger &lt;stefanb@linux.vnet.ibm.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>tpm: fix byte-order for the value read by tpm2_get_tpm_pt</title>
<updated>2016-10-07T13:21:21Z</updated>
<author>
<name>apronin@chromium.org</name>
</author>
<published>2016-07-15T01:07:18Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=63cab845dd0839ef680d28629b8e9e1fe75f7575'/>
<id>urn:sha1:63cab845dd0839ef680d28629b8e9e1fe75f7575</id>
<content type='text'>
commit 1b0612b04090e416828c0dd5ed197b0913d834a0 upstream.

The result must be converted from BE byte order, which is used by the
TPM2 protocol. This has not popped out because tpm2_get_tpm_pt() has
been only used for probing.

Fixes: 7a1d7e6dd76a ("tpm: TPM 2.0 baseline support")
Change-Id: I7d71cd379b1a3b7659d20a1b6008216762596590
Signed-off-by: Andrey Pronin &lt;apronin@chromium.org&gt;
Reviewed-by: Jason Gunthorpe &lt;jgunthorpe@obsidianresearch.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;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>tpm_crb: fix address space of the return pointer in crb_map_res()</title>
<updated>2016-08-20T16:10:58Z</updated>
<author>
<name>Jarkko Sakkinen</name>
</author>
<published>2016-06-17T14:39:29Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=c5cee0cabb809617c5e275666f9e0fba184a20fd'/>
<id>urn:sha1:c5cee0cabb809617c5e275666f9e0fba184a20fd</id>
<content type='text'>
commit f786b752098216fedb73ba2905c8cce12358534a upstream.

When running make C=2 M=drivers/char/tpm/

  CHECK   drivers/char/tpm//tpm_crb.c
drivers/char/tpm//tpm_crb.c:248:31: warning: incorrect type in return expression (different address spaces)
drivers/char/tpm//tpm_crb.c:248:31:    expected void [noderef] &lt;asn:2&gt;*
drivers/char/tpm//tpm_crb.c:248:31:    got void *

Fixes: 1bd047be37d9 ("tpm_crb: Use devm_ioremap_resource")
Signed-off-by: Jarkko Sakkinen &lt;jarkko.sakkinen@linux.intel.com&gt;
Tested-by: Stefan Berger &lt;stefanb@linux.vnet.ibm.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>tpm_tis: fix build warning with tpm_tis_resume</title>
<updated>2016-02-26T09:32:07Z</updated>
<author>
<name>Jarkko Sakkinen</name>
</author>
<published>2016-02-22T14:09:12Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=2cb6d6460f1a171c71c134e0efe3a94c2206d080'/>
<id>urn:sha1:2cb6d6460f1a171c71c134e0efe3a94c2206d080</id>
<content type='text'>
drivers/char/tpm/tpm_tis.c:838: warning: ‘tpm_tis_resume’ defined but
not used

Reported-by: James Morris &lt;jmorris@namei.org&gt;
Fixes: 00194826e6be ("tpm_tis: Clean up the force=1 module parameter")
Signed-off-by: Jarkko Sakkinen &lt;jarkko.sakkinen@linux.intel.com&gt;
cc: stable@vger.kernel.org
</content>
</entry>
<entry>
<title>tpm_crb: tpm2_shutdown() must be called before tpm_chip_unregister()</title>
<updated>2016-02-20T07:59:33Z</updated>
<author>
<name>Jarkko Sakkinen</name>
</author>
<published>2016-02-18T20:11:29Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=99cda8cb4639de81cde785b5bab9bc52e916e594'/>
<id>urn:sha1:99cda8cb4639de81cde785b5bab9bc52e916e594</id>
<content type='text'>
Wrong call order.

Reported-by: Jason Gunthorpe &lt;jgunthorpe@obsidianresearch.com&gt;
Fixes: 74d6b3ceaa17
Signed-off-by: Jarkko Sakkinen &lt;jarkko.sakkinen@linux.intel.com&gt;
cc: stable@vger.kernel.org
</content>
</entry>
<entry>
<title>tpm_crb/tis: fix: use dev_name() for /proc/iomem</title>
<updated>2016-02-20T07:59:33Z</updated>
<author>
<name>Jarkko Sakkinen</name>
</author>
<published>2016-02-17T00:10:52Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=30f9c8c9e2ea37473a51354e9e492580a40661ce'/>
<id>urn:sha1:30f9c8c9e2ea37473a51354e9e492580a40661ce</id>
<content type='text'>
In all cases use dev_name() for the mapped resources. This is both
for sake of consistency and also with some platforms resource name
given by ACPI object seems to return garbage.

Signed-off-by: Jarkko Sakkinen &lt;jarkko.sakkinen@linux.intel.com&gt;
Fixes: 1bd047be37d9 ("tpm_crb: Use devm_ioremap_resource")
</content>
</entry>
<entry>
<title>tpm_eventlog.c: fix binary_bios_measurements</title>
<updated>2016-02-20T07:59:32Z</updated>
<author>
<name>Harald Hoyer</name>
</author>
<published>2016-02-06T14:44:42Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=186d124f07da193a8f47e491af85cb695d415f2f'/>
<id>urn:sha1:186d124f07da193a8f47e491af85cb695d415f2f</id>
<content type='text'>
The commit 0cc698af36ff ("vTPM: support little endian guests") copied
the event, but without the event data, did an endian conversion on the
size and tried to output the event data from the copied version, which
has only have one byte of the data, resulting in garbage event data.

[jarkko.sakkinen@linux.intel.com: fixed minor coding style issues and
 renamed the local variable tempPtr as temp_ptr now that there is an
 excuse to do this.]

Signed-off-by: Harald Hoyer &lt;harald@redhat.com&gt;
Fixes: 0cc698af36ff ("vTPM: support little endian guests")
Reviewed-by: Jarkko Sakkinen &lt;jarkko.sakkinen@linux.intel.com&gt;
cc: stable@vger.kernel.org
</content>
</entry>
</feed>
