LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
From: "Marc-André Lureau" <marcandre.lureau@redhat.com>
To: Stefan Berger <stefanb@linux.ibm.com>
Cc: jarkko@kernel.org, linux-integrity@vger.kernel.org,
	peterhuewe@gmx.de,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH 2/2] selftests: tpm2: Reset the dictionary attack lock
Date: Tue, 23 Nov 2021 12:13:52 +0400	[thread overview]
Message-ID: <CAMxuvaxB=dpz-1J1RJ6Phaan8=a0QXcu7jYiwUOE85NN5v7xTw@mail.gmail.com> (raw)
In-Reply-To: <20211122191752.1308953-3-stefanb@linux.ibm.com>

On Mon, Nov 22, 2021 at 11:18 PM Stefan Berger <stefanb@linux.ibm.com> wrote:
>
> Reset the dictionary attack lock to avoid the following types of test
> failures after running the test 2 times:
>
> ======================================================================
> ERROR: test_unseal_with_wrong_policy (tpm2_tests.SmokeTest)
> ----------------------------------------------------------------------
> Traceback (most recent call last):
>   File "/root/linux-ima-namespaces/tools/testing/selftests/tpm2/tpm2_tests.py", line 105, in test_unseal_with_wrong_policy
>     blob = self.client.seal(self.root_key, data, auth, policy_dig)
>   File "/root/linux-ima-namespaces/tools/testing/selftests/tpm2/tpm2.py", line 620, in seal
>     rsp = self.send_cmd(cmd)
>   File "/root/linux-ima-namespaces/tools/testing/selftests/tpm2/tpm2.py", line 397, in send_cmd
>     raise ProtocolError(cc, rc)
> tpm2.ProtocolError: TPM_RC_LOCKOUT: cc=0x00000153, rc=0x00000921
>
> Signed-off-by: Stefan Berger <stefanb@linux.ibm.com>

Tested-by: Marc-André Lureau <marcandre.lureau@redhat.com>


> ---
>  tools/testing/selftests/tpm2/tpm2_tests.py | 1 +
>  1 file changed, 1 insertion(+)
>
> diff --git a/tools/testing/selftests/tpm2/tpm2_tests.py b/tools/testing/selftests/tpm2/tpm2_tests.py
> index a569c8d0db08..109ffd736c73 100644
> --- a/tools/testing/selftests/tpm2/tpm2_tests.py
> +++ b/tools/testing/selftests/tpm2/tpm2_tests.py
> @@ -100,6 +100,7 @@ class SmokeTest(unittest.TestCase):
>              policy_dig = self.client.get_policy_digest(handle)
>          finally:
>              self.client.flush_context(handle)
> +            self.client.reset_da_lock()
>
>          blob = self.client.seal(self.root_key, data, auth, policy_dig)
>
> --
> 2.31.1
>


      reply	other threads:[~2021-11-23  8:14 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-11-22 19:17 [PATCH 0/2] selftests: tpm2: Probe for available PCR bank Stefan Berger
2021-11-22 19:17 ` [PATCH 1/2] selftests: tpm: " Stefan Berger
2021-11-23  8:13   ` Marc-André Lureau
2021-11-24  7:28   ` Jarkko Sakkinen
2021-11-22 19:17 ` [PATCH 2/2] selftests: tpm2: Reset the dictionary attack lock Stefan Berger
2021-11-23  8:13   ` Marc-André Lureau [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAMxuvaxB=dpz-1J1RJ6Phaan8=a0QXcu7jYiwUOE85NN5v7xTw@mail.gmail.com' \
    --to=marcandre.lureau@redhat.com \
    --cc=jarkko@kernel.org \
    --cc=linux-integrity@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=peterhuewe@gmx.de \
    --cc=stefanb@linux.ibm.com \
    --subject='Re: [PATCH 2/2] selftests: tpm2: Reset the dictionary attack lock' \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).