<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel.git/drivers/char/tpm, branch linux-4.0.y</title>
<subtitle>Hosts the 0x221E linux distro kernel.
</subtitle>
<id>https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-4.0.y</id>
<link rel='self' href='https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-4.0.y'/>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/'/>
<updated>2015-05-06T20:03:51Z</updated>
<entry>
<title>tpm: fix: sanitized code paths in tpm_chip_register()</title>
<updated>2015-05-06T20:03:51Z</updated>
<author>
<name>Jarkko Sakkinen</name>
</author>
<published>2015-03-18T06:17:14Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=85c75cd8131b5aa9fe4efc6400ae1d0631497720'/>
<id>urn:sha1:85c75cd8131b5aa9fe4efc6400ae1d0631497720</id>
<content type='text'>
commit 34d47b6322087665be33ca3aa81775b143a4d7ac upstream.

I started to work with PPI interface so that it would be available
under character device sysfs directory and realized that chip
registeration was still too messy.

In TPM 1.x in some rare scenarios (errors that almost never occur)
wrong order in deinitialization steps was taken in teardown. I
reproduced these scenarios by manually inserting error codes in the
place of the corresponding function calls.

The key problem is that the teardown is messy with two separate code
paths (this was inherited when moving code from tpm-interface.c).

Moved TPM 1.x specific register/unregister functionality to own helper
functions and added single code path for teardown in tpm_chip_register().
Now the code paths have been fixed and it should be easier to review
later on this part of the code.

Fixes: 7a1d7e6dd76a ("tpm: TPM 2.0 baseline support")
Signed-off-by: Jarkko Sakkinen &lt;jarkko.sakkinen@linux.intel.com&gt;
Tested-by: Scot Doyle &lt;lkml14@scotdoyle.com&gt;
Reviewed-by: Peter Huewe &lt;peterhuewe@gmx.de&gt;
Signed-off-by: Peter Huewe &lt;peterhuewe@gmx.de&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>tpm: fix call order in tpm-chip.c</title>
<updated>2015-03-06T21:35:49Z</updated>
<author>
<name>Jarkko Sakkinen</name>
</author>
<published>2015-03-01T21:55:47Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=19913b6db3aa417d855318c9cf5b40fbc1f28e52'/>
<id>urn:sha1:19913b6db3aa417d855318c9cf5b40fbc1f28e52</id>
<content type='text'>
- tpm_dev_add_device(): cdev_add() must be done before uevent is
  propagated in order to avoid races.
- tpm_chip_register(): tpm_dev_add_device() must be done as the
  last step before exposing device to the user space in order to
  avoid races.

In addition clarified description in tpm_chip_register().

Fixes: 313d21eeab92 ("tpm: device class for tpm")
Fixes: afb5abc262e9 ("tpm: two-phase chip management functions")

Signed-off-by: Jarkko Sakkinen &lt;jarkko.sakkinen@linux.intel.com&gt;
Reviewed-by: Peter Huewe &lt;peterhuewe@gmx.de&gt;
Signed-off-by: Peter Huewe &lt;peterhuewe@gmx.de&gt;
</content>
</entry>
<entry>
<title>tpm/ibmvtpm: Additional LE support for tpm_ibmvtpm_send</title>
<updated>2015-03-06T21:35:48Z</updated>
<author>
<name>jmlatten@linux.vnet.ibm.com</name>
</author>
<published>2015-02-21T00:11:24Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=62dfd912ab3b5405b6fe72d0135c37e9648071f1'/>
<id>urn:sha1:62dfd912ab3b5405b6fe72d0135c37e9648071f1</id>
<content type='text'>
Problem: When IMA and VTPM are both enabled in kernel config,
kernel hangs during bootup on LE OS.

Why?: IMA calls tpm_pcr_read() which results in tpm_ibmvtpm_send
and tpm_ibmtpm_recv getting called. A trace showed that
tpm_ibmtpm_recv was hanging.

Resolution: tpm_ibmtpm_recv was hanging because tpm_ibmvtpm_send
was sending CRQ message that probably did not make much sense
to phype because of Endianness. The fix below sends correctly
converted CRQ for LE. This was not caught before because it
seems IMA is not enabled by default in kernel config and
IMA exercises this particular code path in vtpm.

Tested with IMA and VTPM enabled in kernel config and VTPM
enabled on both a BE OS and a LE OS ppc64 lpar. This exercised
CRQ and TPM command code paths in vtpm.
Patch is against Peter's tpmdd tree on github which included
Vicky's previous vtpm le patches.

Signed-off-by: Joy Latten &lt;jmlatten@linux.vnet.ibm.com&gt;
Cc: &lt;stable@vger.kernel.org&gt; # eb71f8a5e33f: "Added Little Endian support to vtpm module"
Cc: &lt;stable@vger.kernel.org&gt;
Reviewed-by: Ashley Lai &lt;ashley@ahsleylai.com&gt;
Signed-off-by: Peter Huewe &lt;peterhuewe@gmx.de&gt;
</content>
</entry>
<entry>
<title>Added Little Endian support to vtpm module</title>
<updated>2015-02-15T16:36:05Z</updated>
<author>
<name>honclo</name>
</author>
<published>2015-02-13T02:02:24Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=eb71f8a5e33fa1066fb92f0111ab366a341e1f6c'/>
<id>urn:sha1:eb71f8a5e33fa1066fb92f0111ab366a341e1f6c</id>
<content type='text'>
The tpm_ibmvtpm module is affected by an unaligned access problem.
ibmvtpm_crq_get_version failed with rc=-4 during boot when vTPM is
enabled in Power partition, which supports both little endian and
big endian modes.

We added little endian support to fix this problem:
1) added cpu_to_be64 calls to ensure BE data is sent from an LE OS.
2) added be16_to_cpu and be32_to_cpu calls to make sure data received
   is in LE format on a LE OS.

Signed-off-by: Hon Ching(Vicky) Lo &lt;honclo@linux.vnet.ibm.com&gt;
Signed-off-by: Joy Latten &lt;jmlatten@linux.vnet.ibm.com&gt;
Cc: &lt;stable@vger.kernel.org&gt;
[phuewe: manually applied the patch :( ]
Reviewed-by: Ashley Lai &lt;ashley@ahsleylai.com&gt;
Signed-off-by: Peter Huewe &lt;peterhuewe@gmx.de&gt;
</content>
</entry>
<entry>
<title>tpm, tpm_tis: fix TPM 2.0 probing</title>
<updated>2015-02-15T15:59:15Z</updated>
<author>
<name>Jarkko Sakkinen</name>
</author>
<published>2015-02-04T14:21:09Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=4d5f2051cd24adc19a645e920344e05afe8d69b9'/>
<id>urn:sha1:4d5f2051cd24adc19a645e920344e05afe8d69b9</id>
<content type='text'>
If during transmission system error was returned, the logic was to
incorrectly deduce that chip is a TPM 1.x chip. This patch fixes this
issue. Also, this patch changes probing so that message tag is used as the
measure for TPM 2.x, which should be much more stable. A separate function
called tpm2_probe() is encapsulated because it can be used with any
chipset.

Fixes: aec04cbdf723 ("tpm: TPM 2.0 FIFO Interface")
Signed-off-by: Jarkko Sakkinen &lt;jarkko.sakkinen@linux.intel.com&gt;
Reviewed-by: Stefan Berger &lt;stefanb@linux.vnet.ibm.com&gt;
Reviewed-by: Peter Huewe &lt;peterhuewe@gmx.de&gt;
Signed-off-by: Peter Huewe &lt;peterhuewe@gmx.de&gt;
</content>
</entry>
<entry>
<title>tpm: fix suspend/resume paths for TPM 2.0</title>
<updated>2015-02-15T15:56:49Z</updated>
<author>
<name>Jarkko Sakkinen</name>
</author>
<published>2015-01-29T05:43:47Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=74d6b3ceaa17d111220c3f09f50f901bf955d7c8'/>
<id>urn:sha1:74d6b3ceaa17d111220c3f09f50f901bf955d7c8</id>
<content type='text'>
Fixed suspend/resume paths for TPM 2.0 and consolidated all the
associated code to the tpm_pm_suspend() and tpm_pm_resume()
functions. Resume path should be handled by the firmware, i.e.
Startup(CLEAR) for hibernate and Startup(STATE) for suspend.

There might be some non-PC embedded devices in the future where
Startup() is not the handled by the FW but fixing the code for
those IMHO should be postponed until there is hardware available
to test the fixes although extra Startup in the driver code is
essentially a NOP.

Added Shutdown(CLEAR) to the remove paths of TIS and CRB drivers.
Changed tpm2_shutdown() to a void function because there isn't
much you can do except print an error message if this fails with
a system error.

Fixes: aec04cbdf723 ("tpm: TPM 2.0 FIFO Interface")
Fixes: 30fc8d138e91 ("tpm: TPM 2.0 CRB Interface")
[phuewe: both did send TPM_Shutdown on resume which 'disables' the TPM
and did not send TPM2_Shutdown on teardown which leads some TPM2.0 to
believe there was an attack (no TPM2_Shutdown = no orderly shutdown =
attack)]

Reported-by: Peter Hüwe &lt;PeterHuewe@gmx.de&gt;
Signed-off-by: Jarkko Sakkinen &lt;jarkko.sakkinen@linux.intel.com&gt;
Tested-by: Scot Doyle &lt;lkml14@scotdoyle.com&gt;
Reviewed-by: Peter Huewe &lt;peterhuewe@gmx.de&gt;
Signed-off-by: Peter Huewe &lt;peterhuewe@gmx.de&gt;
</content>
</entry>
<entry>
<title>tpm/tpm_tis: Add missing ifdef CONFIG_ACPI for pnp_acpi_device</title>
<updated>2015-01-22T02:37:33Z</updated>
<author>
<name>Peter Huewe</name>
</author>
<published>2015-01-21T23:42:50Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=961be7ef6963806cb978ccd6acf6bf84b0c63346'/>
<id>urn:sha1:961be7ef6963806cb978ccd6acf6bf84b0c63346</id>
<content type='text'>
This fixes a build failure if CONFIG_PNP is set but CONFIG_ACPI is not:
drivers/char/tpm/tpm_tis.c: In function ?tpm_tis_pnp_init?:
drivers/char/tpm/tpm_tis.c:912:45: error: invalid type argument of
?-&gt;? (have ?int?)
   acpi_dev_handle = pnp_acpi_device(pnp_dev)-&gt;handle;

If CONFIG_PNPACPI is not set pnp_acpi_device is defined as 0 and thus
accesing the handle is not possible.

Fixes: 0dc553652102 ("tpm: fix raciness of PPI interface lookup")
Reported-by: Jim Davis &lt;jim.epost@gmail.com&gt;
Signed-off-by: Peter Huewe &lt;peterhuewe@gmx.de&gt;
Signed-off-by: James Morris &lt;james.l.morris@oracle.com&gt;
</content>
</entry>
<entry>
<title>tpm: fix format string error in tpm-chip.c</title>
<updated>2015-01-20T20:28:36Z</updated>
<author>
<name>Jarkko Sakkinen</name>
</author>
<published>2015-01-20T10:03:35Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=743410a03bbf110da8942a715cf1358344ecc281'/>
<id>urn:sha1:743410a03bbf110da8942a715cf1358344ecc281</id>
<content type='text'>
dev_set_name() takes three arguments where the second argument is
a format string. This patch fixes the call accordingly in tpm-chip.c

Reported-by: kbuild test robot &lt;fengguang.wu@intel.com&gt;
Fixes: 313d21eeab92 ("tpm: device class for tpm")
Signed-off-by: Jarkko Sakkinen &lt;jarkko.sakkinen@linux.intel.com&gt;
Signed-off-by: Peter Huewe &lt;peterhuewe@gmx.de&gt;
</content>
</entry>
<entry>
<title>char/tpm/tpm_crb: fix build error</title>
<updated>2015-01-19T19:46:50Z</updated>
<author>
<name>Jarkko Sakkinen</name>
</author>
<published>2015-01-19T08:43:40Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=914309995ed5c6c737df4135ac5ba2b67cff194d'/>
<id>urn:sha1:914309995ed5c6c737df4135ac5ba2b67cff194d</id>
<content type='text'>
SIMPLE_DEV_PM_OPS() was inside #ifdef CONFIG_PM_SLEEP.

Fixes: 30fc8d1 ("tpm: TPM 2.0 CRB Interface")
Signed-off-by: Jarkko Sakkinen &lt;jarkko.sakkinen@linux.intel.com&gt;
Signed-off-by: Peter Huewe &lt;peterhuewe@gmx.de&gt;
</content>
</entry>
<entry>
<title>char/tpm: fixed white spaces coding style issues</title>
<updated>2015-01-18T13:26:49Z</updated>
<author>
<name>Bruno E O Meneguele</name>
</author>
<published>2015-01-17T16:03:30Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=3b09825dd8758a59c1a70e18df5bc8d04f8e5ced'/>
<id>urn:sha1:3b09825dd8758a59c1a70e18df5bc8d04f8e5ced</id>
<content type='text'>
Fixed some coding style issues reported by checkpatch.

Signed-off-by: Bruno E O Meneguele &lt;bmeneguele@gmail.com&gt;
[phuewe: ported to latest code]
Signed-off-by: Peter Huewe &lt;peterhuewe@gmx.de&gt;
</content>
</entry>
</feed>
