<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux-stable.git/drivers/char/tpm, branch v4.8</title>
<subtitle>Linux kernel stable tree</subtitle>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/'/>
<entry>
<title>tpm: invalid self test error message</title>
<updated>2016-09-02T22:27:37+00:00</updated>
<author>
<name>Jarkko Sakkinen</name>
<email>jarkko.sakkinen@linux.intel.com</email>
</author>
<published>2016-09-01T23:36:58+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=4a29b3484f857ff350f203a2d9bf3b428c9e0bf2'/>
<id>4a29b3484f857ff350f203a2d9bf3b428c9e0bf2</id>
<content type='text'>
The driver emits invalid self test error message even though the init
succeeds.

Signed-off-by: Jarkko Sakkinen &lt;jarkko.sakkinen@linux.intel.com&gt;
Fixes: cae8b441fc20 ("tpm: Factor out common startup code")
Reviewed-by: James Morris &lt;james.l.morris@oracle.com&gt;
Signed-off-by: James Morris &lt;james.l.morris@oracle.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The driver emits invalid self test error message even though the init
succeeds.

Signed-off-by: Jarkko Sakkinen &lt;jarkko.sakkinen@linux.intel.com&gt;
Fixes: cae8b441fc20 ("tpm: Factor out common startup code")
Reviewed-by: James Morris &lt;james.l.morris@oracle.com&gt;
Signed-off-by: James Morris &lt;james.l.morris@oracle.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>tpm: Add TPM 2.0 support to the Nuvoton i2c driver (NPCT6xx family)</title>
<updated>2016-07-19T14:43:38+00:00</updated>
<author>
<name>Jason Gunthorpe</name>
<email>jgunthorpe@obsidianresearch.com</email>
</author>
<published>2016-07-12T17:41:50+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=82cc1a49b6358394938e759dc4c22b2be773bbad'/>
<id>82cc1a49b6358394938e759dc4c22b2be773bbad</id>
<content type='text'>
The command flow is exactly the same, the core simply needs to be
told to enable TPM2 mode when the compatible string indicates a
TPM2.

Signed-off-by: Andrew Azmansky &lt;andrew.zamansky@nuvoton.com&gt;
Tested-by: Andrew Zamansky &lt;andrew.zamansky@nuvoton.com&gt;
Signed-off-by: Jason Gunthorpe &lt;jgunthorpe@obsidianresearch.com&gt;
Acked-by: Rob Herring &lt;robh@kernel.org&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>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The command flow is exactly the same, the core simply needs to be
told to enable TPM2 mode when the compatible string indicates a
TPM2.

Signed-off-by: Andrew Azmansky &lt;andrew.zamansky@nuvoton.com&gt;
Tested-by: Andrew Zamansky &lt;andrew.zamansky@nuvoton.com&gt;
Signed-off-by: Jason Gunthorpe &lt;jgunthorpe@obsidianresearch.com&gt;
Acked-by: Rob Herring &lt;robh@kernel.org&gt;
Reviewed-by: Jarkko Sakkinen &lt;jarkko.sakkinen@linux.intel.com&gt;
Signed-off-by: Jarkko Sakkinen &lt;jarkko.sakkinen@linux.intel.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>tpm: Factor out common startup code</title>
<updated>2016-07-19T14:43:38+00:00</updated>
<author>
<name>Jason Gunthorpe</name>
<email>jgunthorpe@obsidianresearch.com</email>
</author>
<published>2016-07-12T17:41:49+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=cae8b441fc20812d7260dc3b45e05ee98fcfff1b'/>
<id>cae8b441fc20812d7260dc3b45e05ee98fcfff1b</id>
<content type='text'>
The TCG standard startup sequence (get timeouts, tpm startup, etc) for
TPM and TPM2 chips is being open coded in many drivers, move it into
the core code.

tpm_tis and tpm_crb are used as the basis for the core code
implementation and the easy drivers are converted. In the process
several small drivers bugs relating to error handling this flow
are fixed.

For now the flag TPM_OPS_AUTO_STARTUP is optional to allow a staged
driver roll out, but ultimately all drivers should use this flow and
the flag removed. Some drivers still do not implement the startup
sequence at all and will need to be tested with it enabled.

Signed-off-by: Jason Gunthorpe &lt;jgunthorpe@obsidianresearch.com&gt;
Tested-by: Andrew Zamansky &lt;andrew.zamansky@nuvoton.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>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The TCG standard startup sequence (get timeouts, tpm startup, etc) for
TPM and TPM2 chips is being open coded in many drivers, move it into
the core code.

tpm_tis and tpm_crb are used as the basis for the core code
implementation and the easy drivers are converted. In the process
several small drivers bugs relating to error handling this flow
are fixed.

For now the flag TPM_OPS_AUTO_STARTUP is optional to allow a staged
driver roll out, but ultimately all drivers should use this flow and
the flag removed. Some drivers still do not implement the startup
sequence at all and will need to be tested with it enabled.

Signed-off-by: Jason Gunthorpe &lt;jgunthorpe@obsidianresearch.com&gt;
Tested-by: Andrew Zamansky &lt;andrew.zamansky@nuvoton.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;
</pre>
</div>
</content>
</entry>
<entry>
<title>tpm: use devm_add_action_or_reset</title>
<updated>2016-07-19T14:43:38+00:00</updated>
<author>
<name>Sudip Mukherjee</name>
<email>sudipm.mukherjee@gmail.com</email>
</author>
<published>2016-06-12T14:05:29+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=2b88cd96eb85d2f07873e6050e531df45d8a0cc8'/>
<id>2b88cd96eb85d2f07873e6050e531df45d8a0cc8</id>
<content type='text'>
If devm_add_action() fails we are explicitly calling put_device() to
free the resources allocated. Lets use the helper
devm_add_action_or_reset() and return directly in case of error, as we
know that the cleanup function has been already called by the helper if
there was any error.

Signed-off-by: Sudip Mukherjee &lt;sudip.mukherjee@codethink.co.uk&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>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
If devm_add_action() fails we are explicitly calling put_device() to
free the resources allocated. Lets use the helper
devm_add_action_or_reset() and return directly in case of error, as we
know that the cleanup function has been already called by the helper if
there was any error.

Signed-off-by: Sudip Mukherjee &lt;sudip.mukherjee@codethink.co.uk&gt;
Reviewed-by: Jarkko Sakkinen &lt;jarkko.sakkinen@linux.intel.com&gt;
Signed-off-by: Jarkko Sakkinen &lt;jarkko.sakkinen@linux.intel.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>tpm2_i2c_nuvoton: add irq validity check</title>
<updated>2016-07-19T14:43:38+00:00</updated>
<author>
<name>Andrew Zamansky</name>
<email>andrew.zamansky@nuvoton.com</email>
</author>
<published>2016-06-29T09:58:49+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=fa7539b27f4a9d0bfaede2f7547c2322ac68f1f2'/>
<id>fa7539b27f4a9d0bfaede2f7547c2322ac68f1f2</id>
<content type='text'>
In 570a3609 IRQ path is incorrectly always exercised while it should be
exercised only when there is an IRQ number allocated. This commit
reverts the old behavior.

[jarkko.sakkinen@linux.intel.com: updated description]

Fixes: 570a36097f3 ("tpm: drop 'irq' from struct tpm_vendor_specific")
Signed-off-by: Andrew Zamansky &lt;andrew.zamansky@nuvoton.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>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
In 570a3609 IRQ path is incorrectly always exercised while it should be
exercised only when there is an IRQ number allocated. This commit
reverts the old behavior.

[jarkko.sakkinen@linux.intel.com: updated description]

Fixes: 570a36097f3 ("tpm: drop 'irq' from struct tpm_vendor_specific")
Signed-off-by: Andrew Zamansky &lt;andrew.zamansky@nuvoton.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;
</pre>
</div>
</content>
</entry>
<entry>
<title>tpm: read burstcount from TPM_STS in one 32-bit transaction</title>
<updated>2016-07-19T14:43:38+00:00</updated>
<author>
<name>Andrey Pronin</name>
<email>apronin@chromium.org</email>
</author>
<published>2016-06-30T17:25:43+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=9754d45e997000ad4021bc4606cc266bb38d876f'/>
<id>9754d45e997000ad4021bc4606cc266bb38d876f</id>
<content type='text'>
Some chips incorrectly support partial reads from TPM_STS register
at non-zero offsets. Read the entire 32-bits register instead of
making two 8-bit reads to support such devices and reduce the number
of bus transactions when obtaining the burstcount from TPM_STS.

Fixes: 27084efee0c3 ("tpm: driver for next generation TPM chips")
Signed-off-by: Andrey Pronin &lt;apronin@chromium.org&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>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Some chips incorrectly support partial reads from TPM_STS register
at non-zero offsets. Read the entire 32-bits register instead of
making two 8-bit reads to support such devices and reduce the number
of bus transactions when obtaining the burstcount from TPM_STS.

Fixes: 27084efee0c3 ("tpm: driver for next generation TPM chips")
Signed-off-by: Andrey Pronin &lt;apronin@chromium.org&gt;
Reviewed-by: Jarkko Sakkinen &lt;jarkko.sakkinen@linux.intel.com&gt;
Signed-off-by: Jarkko Sakkinen &lt;jarkko.sakkinen@linux.intel.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>tpm: fix byte-order for the value read by tpm2_get_tpm_pt</title>
<updated>2016-07-19T14:43:38+00:00</updated>
<author>
<name>apronin@chromium.org</name>
<email>apronin@chromium.org</email>
</author>
<published>2016-07-15T01:07:18+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=1b0612b04090e416828c0dd5ed197b0913d834a0'/>
<id>1b0612b04090e416828c0dd5ed197b0913d834a0</id>
<content type='text'>
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;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
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;
</pre>
</div>
</content>
</entry>
<entry>
<title>tpm_tis_core: convert max timeouts from msec to jiffies</title>
<updated>2016-07-19T14:43:38+00:00</updated>
<author>
<name>apronin@chromium.org</name>
<email>apronin@chromium.org</email>
</author>
<published>2016-07-15T00:29:40+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=79b591c091b31291fecd9551db0a67fdc5901d50'/>
<id>79b591c091b31291fecd9551db0a67fdc5901d50</id>
<content type='text'>
tpm_tis_core was missing conversion from msec when assigning max
timeouts from constants.

Fixes: aec04cbdf723 ("tpm: TPM 2.0 FIFO Interface")
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;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
tpm_tis_core was missing conversion from msec when assigning max
timeouts from constants.

Fixes: aec04cbdf723 ("tpm: TPM 2.0 FIFO Interface")
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;
</pre>
</div>
</content>
</entry>
<entry>
<title>tpm_crb: fix address space of the return pointer in crb_map_res()</title>
<updated>2016-06-25T14:28:57+00:00</updated>
<author>
<name>Jarkko Sakkinen</name>
<email>jarkko.sakkinen@linux.intel.com</email>
</author>
<published>2016-06-17T14:39:29+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=f786b752098216fedb73ba2905c8cce12358534a'/>
<id>f786b752098216fedb73ba2905c8cce12358534a</id>
<content type='text'>
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 *

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;
Tested-by: Stefan Berger &lt;stefanb@linux.vnet.ibm.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
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 *

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;
Tested-by: Stefan Berger &lt;stefanb@linux.vnet.ibm.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>tpm_vtpm_proxy: fix address space of a user pointer in vtpmx_fops_ioctl()</title>
<updated>2016-06-25T14:28:57+00:00</updated>
<author>
<name>Jarkko Sakkinen</name>
<email>jarkko.sakkinen@linux.intel.com</email>
</author>
<published>2016-06-17T14:39:28+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=9da7e787e18471f890b6d3e2859417388595798a'/>
<id>9da7e787e18471f890b6d3e2859417388595798a</id>
<content type='text'>
When running make C=2 M=drivers/char/tpm/

  CC [M]  drivers/char/tpm//tpm_crb.o
  CHECK   drivers/char/tpm//tpm_vtpm_proxy.c
drivers/char/tpm//tpm_vtpm_proxy.c:552:32: warning: incorrect type in assignment (different address spaces)
drivers/char/tpm//tpm_vtpm_proxy.c:552:32:    expected struct vtpm_proxy_new_dev *vtpm_new_dev_p
drivers/char/tpm//tpm_vtpm_proxy.c:552:32:    got void [noderef] &lt;asn:1&gt;*argp
drivers/char/tpm//tpm_vtpm_proxy.c:553:51: warning: incorrect type in argument 2 (different address spaces)
drivers/char/tpm//tpm_vtpm_proxy.c:553:51:    expected void const [noderef] &lt;asn:1&gt;*from
drivers/char/tpm//tpm_vtpm_proxy.c:553:51:    got struct vtpm_proxy_new_dev *vtpm_new_dev_p
drivers/char/tpm//tpm_vtpm_proxy.c:559:34: warning: incorrect type in argument 1 (different address spaces)
drivers/char/tpm//tpm_vtpm_proxy.c:559:34:    expected void [noderef] &lt;asn:1&gt;*to
drivers/char/tpm//tpm_vtpm_proxy.c:559:34:    got struct vtpm_proxy_new_dev *vtpm_new_dev_p

The __user annotation was missing from the corresponding variable.

Fixes: 794c38e01358 ("tpm: Proxy driver for supporting multiple emulated TPMs")
Signed-off-by: Jarkko Sakkinen &lt;jarkko.sakkinen@linux.intel.com&gt;
Tested-by: Stefan Berger &lt;stefanb@linux.vnet.ibm.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
When running make C=2 M=drivers/char/tpm/

  CC [M]  drivers/char/tpm//tpm_crb.o
  CHECK   drivers/char/tpm//tpm_vtpm_proxy.c
drivers/char/tpm//tpm_vtpm_proxy.c:552:32: warning: incorrect type in assignment (different address spaces)
drivers/char/tpm//tpm_vtpm_proxy.c:552:32:    expected struct vtpm_proxy_new_dev *vtpm_new_dev_p
drivers/char/tpm//tpm_vtpm_proxy.c:552:32:    got void [noderef] &lt;asn:1&gt;*argp
drivers/char/tpm//tpm_vtpm_proxy.c:553:51: warning: incorrect type in argument 2 (different address spaces)
drivers/char/tpm//tpm_vtpm_proxy.c:553:51:    expected void const [noderef] &lt;asn:1&gt;*from
drivers/char/tpm//tpm_vtpm_proxy.c:553:51:    got struct vtpm_proxy_new_dev *vtpm_new_dev_p
drivers/char/tpm//tpm_vtpm_proxy.c:559:34: warning: incorrect type in argument 1 (different address spaces)
drivers/char/tpm//tpm_vtpm_proxy.c:559:34:    expected void [noderef] &lt;asn:1&gt;*to
drivers/char/tpm//tpm_vtpm_proxy.c:559:34:    got struct vtpm_proxy_new_dev *vtpm_new_dev_p

The __user annotation was missing from the corresponding variable.

Fixes: 794c38e01358 ("tpm: Proxy driver for supporting multiple emulated TPMs")
Signed-off-by: Jarkko Sakkinen &lt;jarkko.sakkinen@linux.intel.com&gt;
Tested-by: Stefan Berger &lt;stefanb@linux.vnet.ibm.com&gt;
</pre>
</div>
</content>
</entry>
</feed>
