[tpm2] Re: How to remove contexts using tpm2-tools v3.1.3?

Han <keepsimple at gmail.com>
Newsgroups dev.linux.lists.tpm2
Message-ID <CAEjGaqff5xoWAPnZz7RFZzcu-yw9=uOWx160m5-GMm+hJ6+k+Q@mail.gmail.com>
On Wed, Dec 15, 2021 at 11:25 AM Roberts, William C <
william.c.roberts(a)intel.com> wrote:

> Unfortunately, no.
>
> Can you update to the latest release? The newest tools release would
> vastly enhance your experience.
>

Thanks for your reply!

I'd love to update.  My environment is:  Debian 10 (Buster)
based Raspbian,  but kernel is already updated to 5.10.  What would be the
recommended way to update "tpm2-tools" ?

I can think of the following options but don't know which one is better /
more reliable / easier :

-  git clone from github master branch and then build from source code.
- find a tarball of tpm2-tools v4.0 or newer and then install per included
instructions, if any.
- somehow upgrade OS to  newer Debian release 11  Bulleye,  which seems to
include tpm2-tools 5.0.  This has some unknowns due to my kernel might need
to update again.

Thanks
Han







>
> Could you use the python bindings:
>     pip install tpm2-pytss
> That would require tpm2-tss libraries from version 2.4.0 or newer.
> ------------------------------
> *From:* Han <keepsimple(a)gmail.com>
> *Sent:* Wednesday, December 15, 2021 12:50 PM
> *To:* tpm2(a)lists.01.org <tpm2(a)lists.01.org>
> *Subject:* [tpm2] How to remove contexts using tpm2-tools v3.1.3?
>
> Hi,
>
> I'm new to tpm2-tools and am using tpm2-tools version 3.1.3 on Raspberry
> Pi CM4. It turns out it doesn't have tpm2_flushcontext which was added in
> v4.0. Is there any other tools in tpm2-tools 3.1.3 that can remove
> contexts? My goal is to free up some memory in TPM as it returned the
> following error:
>
> $ tpm2_rc_decode 0x902
> error layer
>   hex: 0x0
>   identifier: TSS2_TPM_RC_LAYER
>   description: Error produced by the TPM
> format 0 warning code
>   hex: 0x02
>   name: TPM2_RC_OBJECT_MEMORY
>   description: out of memory for object contexts
>
> --
>
> Thanks
>
> Han
>
>
attachment.htm (text/html, 6.5 KB)
<div dir="ltr"><div dir="ltr"><br></div><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Wed, Dec 15, 2021 at 11:25 AM Roberts, William C &lt;<a href="mailto:[email protected]">[email protected]</a>&gt; wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">




<div dir="ltr">
<div style="font-family:Calibri,Arial,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
Unfortunately, no.</div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
<br>
</div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
Can you update to the latest release? The newest tools release would vastly enhance your experience.</div></div></blockquote><div><br></div><div>Thanks for your reply! </div><div><br></div><div>I&#39;d love to update.  My environment is:  Debian 10 (Buster) based Raspbian,  but kernel is already updated to 5.10.  What would be the recommended way to update &quot;tpm2-tools&quot; ?  </div><div><br></div><div>I can think of the following options but don&#39;t know which one is better / more reliable / easier :</div><div><br></div><div>-  git clone from github master branch and then build from source code.</div><div>- find a tarball of tpm2-tools v4.0 or newer and then install per included instructions, if any.</div><div>- somehow upgrade OS to  newer Debian release 11  Bulleye,  which seems to include tpm2-tools 5.0.  This has some unknowns due to my kernel might need to update again.</div><div><br></div><div>Thanks</div><div>Han</div><div><br></div><div><br></div><div><br></div><div><br></div><div><br></div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr">
<div style="font-family:Calibri,Arial,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
<br>
</div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
Could you use the python bindings:</div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
    pip install tpm2-pytss</div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
<span style="color:rgb(0,0,0);font-family:Calibri,Arial,Helvetica,sans-serif;font-size:12pt">That would require tpm2-tss libraries from version 2.4.0 or newer.</span><br>
</div>
<div id="gmail-m_-3497145641943951761appendonsend"></div>
<hr style="display:inline-block;width:98%">
<div id="gmail-m_-3497145641943951761divRplyFwdMsg" dir="ltr"><font face="Calibri, sans-serif" style="font-size:11pt" color="#000000"><b>From:</b> Han &lt;<a href="mailto:[email protected]" target="_blank">[email protected]</a>&gt;<br>
<b>Sent:</b> Wednesday, December 15, 2021 12:50 PM<br>
<b>To:</b> <a href="mailto:[email protected]" target="_blank">[email protected]</a> &lt;<a href="mailto:[email protected]" target="_blank">[email protected]</a>&gt;<br>
<b>Subject:</b> [tpm2] How to remove contexts using tpm2-tools v3.1.3?</font>
<div> </div>
</div>
<div>
<div dir="ltr">Hi,
<div><br>
</div>
<div><span style="font-family:inherit;font-size:15px;font-style:inherit;font-variant-ligatures:inherit;font-variant-caps:inherit;font-weight:inherit;color:rgb(35,38,41)">I&#39;m new to tpm2-tools and am using tpm2-tools version 3.1.3 on Raspberry Pi CM4.
 It turns out it doesn&#39;t have</span><span style="font-family:inherit;font-size:15px;font-style:inherit;font-variant-ligatures:inherit;font-variant-caps:inherit;font-weight:inherit;color:rgb(35,38,41)"> </span><span style="font-family:inherit;font-style:inherit;font-variant-ligatures:inherit;font-variant-caps:inherit;font-weight:inherit;color:rgb(35,38,41);white-space:pre-wrap;font-size:13px">tpm2_flushcontext
</span><span style="font-family:inherit;font-size:15px;font-style:inherit;font-variant-ligatures:inherit;font-variant-caps:inherit;font-weight:inherit;color:rgb(35,38,41)">which was added in v4.0. </span><span style="font-family:inherit;font-size:15px;font-style:inherit;font-variant-ligatures:inherit;font-variant-caps:inherit;font-weight:inherit;color:rgb(35,38,41)">Is
 there any other tools in tpm2-tools 3.1.3 that can remove contexts? My goal is to free up some memory in TPM as it returned the following error:</span></div>
<div style="margin:0px;padding:0px 16px 0px 0px;border:0px;font-variant-numeric:inherit;font-variant-east-asian:inherit;font-stretch:inherit;line-height:inherit;font-size:13px;vertical-align:top;box-sizing:inherit;width:auto;min-width:0px;color:rgb(35,38,41)">
<div style="margin:0px;padding:0px;border:0px;font-style:inherit;font-variant:inherit;font-weight:inherit;font-stretch:inherit;font-size:15px;vertical-align:baseline;box-sizing:inherit;width:659px">
<pre style="margin-top:0px;margin-bottom:0px;padding:12px;border:0px;font-style:inherit;font-variant:inherit;font-weight:inherit;font-stretch:inherit;line-height:1.30769;font-size:13px;vertical-align:baseline;box-sizing:inherit;width:auto;max-height:600px;overflow:auto;border-radius:5px"><code style="margin:0px;padding:0px;border:0px;font-style:inherit;font-variant:inherit;font-weight:inherit;font-stretch:inherit;line-height:inherit;vertical-align:baseline;box-sizing:inherit;background-color:transparent;white-space:inherit;border-radius:0px">$ tpm2_rc_decode 0x902
error layer
  hex: 0x0
  identifier: TSS2_TPM_RC_LAYER
  description: Error produced by the TPM
format 0 warning code
  hex: 0x02
  name: TPM2_RC_OBJECT_MEMORY
  description: out of memory for object contexts</code></pre>
<pre style="margin-top:0px;margin-bottom:0px;padding:12px;border:0px;font-style:inherit;font-variant:inherit;font-weight:inherit;font-stretch:inherit;line-height:1.30769;font-size:13px;vertical-align:baseline;box-sizing:inherit;width:auto;max-height:600px;overflow:auto;border-radius:5px">--</pre>
<pre style="margin-top:0px;margin-bottom:0px;padding:12px;border:0px;font-style:inherit;font-variant:inherit;font-weight:inherit;font-stretch:inherit;line-height:1.30769;font-size:13px;vertical-align:baseline;box-sizing:inherit;width:auto;max-height:600px;overflow:auto;border-radius:5px">Thanks</pre>
<pre style="margin-top:0px;margin-bottom:0px;padding:12px;border:0px;font-style:inherit;font-variant:inherit;font-weight:inherit;font-stretch:inherit;line-height:1.30769;font-size:13px;vertical-align:baseline;box-sizing:inherit;width:auto;max-height:600px;overflow:auto;border-radius:5px">Han</pre>
</div>
</div>
</div>
</div>
</div>

</blockquote></div></div>
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.