<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux-dev/tools/testing/selftests/tpm2, branch linus/master</title>
<subtitle>Linux kernel development work - see feature branches</subtitle>
<id>https://git.zx2c4.com/linux-dev/atom/tools/testing/selftests/tpm2?h=linus%2Fmaster</id>
<link rel='self' href='https://git.zx2c4.com/linux-dev/atom/tools/testing/selftests/tpm2?h=linus%2Fmaster'/>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/'/>
<updated>2022-03-08T08:33:17Z</updated>
<entry>
<title>selftests: tpm: add async space test with noneexisting handle</title>
<updated>2022-03-08T08:33:17Z</updated>
<author>
<name>Tadeusz Struk</name>
<email>tstruk@gmail.com</email>
</author>
<published>2022-01-16T01:26:27Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=8335adb8f9d3ea783422d22883a327427c1dbee8'/>
<id>urn:sha1:8335adb8f9d3ea783422d22883a327427c1dbee8</id>
<content type='text'>
Add a test for /dev/tpmrm0 in async mode that checks if
the code handles invalid handles correctly.

Cc: Jarkko Sakkinen &lt;jarkko@kernel.org&gt;
Cc: Shuah Khan &lt;shuah@kernel.org&gt;
Cc: &lt;linux-integrity@vger.kernel.org&gt;
Cc: &lt;linux-kselftest@vger.kernel.org&gt;
Cc: &lt;linux-kernel@vger.kernel.org&gt;
Tested-by: Jarkko Sakkinen&lt;jarkko@kernel.org&gt;
Signed-off-by: Tadeusz Struk &lt;tstruk@gmail.com&gt;
Reviewed-by: Jarkko Sakkinen &lt;jarkko@kernel.org&gt;
Signed-off-by: Jarkko Sakkinen &lt;jarkko@kernel.org&gt;
</content>
</entry>
<entry>
<title>selftests: tpm2: Determine available PCR bank</title>
<updated>2022-03-08T08:33:17Z</updated>
<author>
<name>Stefan Berger</name>
<email>stefanb@linux.ibm.com</email>
</author>
<published>2021-11-28T04:10:51Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=0d060f230fa06c32d91e67978a3088be9635848e'/>
<id>urn:sha1:0d060f230fa06c32d91e67978a3088be9635848e</id>
<content type='text'>
Determine an available PCR bank to be used by a test case by querying the
capability TPM2_GET_CAP. The TPM2 returns TPML_PCR_SELECTIONS that
contains an array of TPMS_PCR_SELECTIONs indicating available PCR banks
and the bitmasks that show which PCRs are enabled in each bank. Collect
the data in a dictionary. From the dictionary determine the PCR bank that
has the PCRs enabled that the test needs. This avoids test failures with
TPM2's that either to not have a SHA-1 bank or whose SHA-1 bank is
disabled.

Signed-off-by: Stefan Berger &lt;stefanb@linux.ibm.com&gt;
Tested-by: Jarkko Sakkinen &lt;jarkko@kernel.org&gt;
Reviewed-by: Jarkko Sakkinen &lt;jarkko@kernel.org&gt;
Signed-off-by: Jarkko Sakkinen &lt;jarkko@kernel.org&gt;
</content>
</entry>
<entry>
<title>selftests: tpm: upgrade TPM2 tests from Python 2 to Python 3</title>
<updated>2020-07-06T20:20:35Z</updated>
<author>
<name>Pengfei Xu</name>
<email>pengfei.xu@intel.com</email>
</author>
<published>2020-06-26T03:40:52Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=0b78c9e8c19b57bf2081cd432841c7fe3f800633'/>
<id>urn:sha1:0b78c9e8c19b57bf2081cd432841c7fe3f800633</id>
<content type='text'>
Python 2 is no longer supported by the Python upstream project, so
upgrade TPM2 tests to Python 3.

Fixed minor merge conflicts
Shuah Khan &lt;skhan@linuxfoundation.org&gt;

Signed-off-by: Pengfei Xu &lt;pengfei.xu@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: Shuah Khan &lt;skhan@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>selftests: tpm: Use /bin/sh instead of /bin/bash</title>
<updated>2020-06-29T20:19:38Z</updated>
<author>
<name>Jarkko Sakkinen</name>
<email>jarkko.sakkinen@linux.intel.com</email>
</author>
<published>2020-06-22T21:20:22Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=377ff83083c953dd58c5a030b3c9b5b85d8cc727'/>
<id>urn:sha1:377ff83083c953dd58c5a030b3c9b5b85d8cc727</id>
<content type='text'>
It's better to use /bin/sh instead of /bin/bash in order to run the tests
in the BusyBox shell.

Fixes: 6ea3dfe1e073 ("selftests: add TPM 2.0 tests")
Cc: stable@vger.kernel.org
Cc: linux-integrity@vger.kernel.org
Cc: linux-kselftest@vger.kernel.org
Signed-off-by: Jarkko Sakkinen &lt;jarkko.sakkinen@linux.intel.com&gt;
Signed-off-by: Shuah Khan &lt;skhan@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>selftests: tpm: Use 'test -e' instead of 'test -f'</title>
<updated>2020-06-29T20:19:23Z</updated>
<author>
<name>Jarkko Sakkinen</name>
<email>jarkko.sakkinen@linux.intel.com</email>
</author>
<published>2020-06-22T21:20:21Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=88a16840f462f96d3a1808aff1d6479f87a02147'/>
<id>urn:sha1:88a16840f462f96d3a1808aff1d6479f87a02147</id>
<content type='text'>
'test -f' is suitable only for *regular* files. Use 'test -e' instead.

Cc: Nikita Sobolev &lt;Nikita.Sobolev@synopsys.com&gt;
Cc: linux-integrity@vger.kernel.org
Cc: linux-kselftest@vger.kernel.org
Fixes: 5627f9cffee7 ("Kernel selftests: Add check if TPM devices are supported")
Signed-off-by: Jarkko Sakkinen &lt;jarkko.sakkinen@linux.intel.com&gt;
Signed-off-by: Shuah Khan &lt;skhan@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>Revert "tpm: selftest: cleanup after unseal with wrong auth/policy test"</title>
<updated>2020-06-29T20:18:15Z</updated>
<author>
<name>Jarkko Sakkinen</name>
<email>jarkko.sakkinen@linux.intel.com</email>
</author>
<published>2020-06-22T21:20:20Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=5be206eaac9a68992fc3b06fb5dd5634e323de86'/>
<id>urn:sha1:5be206eaac9a68992fc3b06fb5dd5634e323de86</id>
<content type='text'>
The reverted commit illegitly uses tpm2-tools. External dependencies are
absolutely forbidden from these tests. There is also the problem that
clearing is not necessarily wanted behavior if the test/target computer is
not used only solely for testing.

Fixes: a9920d3bad40 ("tpm: selftest: cleanup after unseal with wrong auth/policy test")
Cc: Tadeusz Struk &lt;tadeusz.struk@intel.com&gt;
Cc: stable@vger.kernel.org
Cc: linux-integrity@vger.kernel.org
Cc: linux-kselftest@vger.kernel.org
Signed-off-by: Jarkko Sakkinen &lt;jarkko.sakkinen@linux.intel.com&gt;
Signed-off-by: Shuah Khan &lt;skhan@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>Kernel selftests: Add check if TPM devices are supported</title>
<updated>2020-05-22T19:19:57Z</updated>
<author>
<name>Nikita Sobolev</name>
<email>Nikita.Sobolev@synopsys.com</email>
</author>
<published>2020-05-21T14:43:44Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=5627f9cffee73dca9762135b6a8c7ab7213f31e2'/>
<id>urn:sha1:5627f9cffee73dca9762135b6a8c7ab7213f31e2</id>
<content type='text'>
TPM2 tests set uses /dev/tpm0 and /dev/tpmrm0 without check if they
are available. In case, when these devices are not available test
fails, but expected behaviour is skipped test.

Signed-off-by: Nikita Sobolev &lt;Nikita.Sobolev@synopsys.com&gt;
Reviewed-by: Jarkko Sakkinen &lt;jarkko.sakkinen@linux.intel.com&gt;
Reviewed-by: Petr Vorel &lt;petr.vorel@gmail.com&gt;
Signed-off-by: Shuah Khan &lt;skhan@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>Revert "Kernel selftests: tpm2: check for tpm support"</title>
<updated>2020-04-14T16:08:24Z</updated>
<author>
<name>Jarkko Sakkinen</name>
<email>jarkko.sakkinen@linux.intel.com</email>
</author>
<published>2020-04-12T14:23:07Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=aaa2d92efe1f972567f1691b423ab8dc606ab3a9'/>
<id>urn:sha1:aaa2d92efe1f972567f1691b423ab8dc606ab3a9</id>
<content type='text'>
This reverts commit b32694cd0724d4ceca2c62cc7c3d3a8d1ffa11fc.

The original comment was neither reviewed nor tested. Thus, this the
*only* possible action to take.

Cc: Nikita Sobolev &lt;Nikita.Sobolev@synopsys.com&gt;
Signed-off-by: Jarkko Sakkinen &lt;jarkko.sakkinen@linux.intel.com&gt;
Signed-off-by: Shuah Khan &lt;skhan@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>Kernel selftests: tpm2: check for tpm support</title>
<updated>2020-02-11T01:00:40Z</updated>
<author>
<name>Nikita Sobolev</name>
<email>Nikita.Sobolev@synopsys.com</email>
</author>
<published>2020-01-31T15:25:23Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=b32694cd0724d4ceca2c62cc7c3d3a8d1ffa11fc'/>
<id>urn:sha1:b32694cd0724d4ceca2c62cc7c3d3a8d1ffa11fc</id>
<content type='text'>
tpm2 tests set fails if there is no /dev/tpm0 and /dev/tpmrm0
supported. Check if these files exist before run and mark test as
skipped in case of absence.

Signed-off-by: Nikita Sobolev &lt;Nikita.Sobolev@synopsys.com&gt;
Signed-off-by: Shuah Khan &lt;skhan@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>tpm: selftest: cleanup after unseal with wrong auth/policy test</title>
<updated>2019-12-17T10:20:15Z</updated>
<author>
<name>Tadeusz Struk</name>
<email>tadeusz.struk@intel.com</email>
</author>
<published>2019-12-12T17:48:59Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=a9920d3bad40201ee8ab1da36bee4674f7e50d69'/>
<id>urn:sha1:a9920d3bad40201ee8ab1da36bee4674f7e50d69</id>
<content type='text'>
Unseal with wrong auth or wrong policy test affects DA lockout
and eventually causes the tests to fail with:
"ProtocolError: TPM_RC_LOCKOUT: rc=0x00000921"
when the tests run multiple times.
Send tpm clear command after the test to reset the DA counters.

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>
</feed>
