[tpm2] Re: tpm2_flushcontext stuck

Kenneth Goldman <kgoldman at us.ibm.com>
Newsgroups dev.linux.lists.tpm2
Message-ID <BN8PR15MB275326320CD1F689C1EDC804F27B9@BN8PR15MB2753.namprd15.prod.outlook.com>
They way I use it:

/dev/tpm0 is locking, one user at a time.  I use it for debug only.  IMHO, production applications should not use it.

/dev/tpmrm0 is the multi-user interface.  Use it for production applications, where the TPM is shared.

I suspect (not sure) that /dev/tpm0 will have unexpected effects when the kernel is also trying to use the TPM.


And as a newbie, I felt that the fact TPM exposes two devices (/dev/tpm0 and /dev/tpmrm0) under Linux is confusing and is making things more complicated.  The architecture diagram (https://github.com/tpm2-software/tpm2-tss<https://github.com/tpm2-software/tpm2-tss>) shows all calls go through the Resource Manager but that is not the case in reality.  I was wondering what is the benefit to have 2 devices instead of just one device in linux?
attachment.htm (text/html, 2.9 KB)
<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="Generator" content="Microsoft Word 15 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
	{font-family:"Cambria Math";
	panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
	{font-family:Calibri;
	panose-1:2 15 5 2 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
	{margin:0in;
	font-size:11.0pt;
	font-family:"Calibri",sans-serif;}
a:link, span.MsoHyperlink
	{mso-style-priority:99;
	color:blue;
	text-decoration:underline;}
span.EmailStyle34
	{mso-style-type:personal-reply;
	font-family:"Calibri",sans-serif;
	color:windowtext;}
.MsoChpDefault
	{mso-style-type:export-only;
	font-size:10.0pt;}
@page WordSection1
	{size:8.5in 11.0in;
	margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
	{page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang="EN-US" link="blue" vlink="purple" style="word-wrap:break-word">
<div class="WordSection1">
<p class="MsoNormal">They way I use it:<o:p></o:p></p>
<p class="MsoNormal"><o:p>&nbsp;</o:p></p>
<p class="MsoNormal">/dev/tpm0 is locking, one user at a time.&nbsp; I use it for debug only.&nbsp; IMHO, production applications should not use it.<o:p></o:p></p>
<p class="MsoNormal"><o:p>&nbsp;</o:p></p>
<p class="MsoNormal">/dev/tpmrm0 is the multi-user interface.&nbsp; Use it for production applications, where the TPM is shared.<o:p></o:p></p>
<p class="MsoNormal"><o:p>&nbsp;</o:p></p>
<p class="MsoNormal">I suspect (not sure) that /dev/tpm0 will have unexpected effects when the kernel is also trying to use the TPM.<o:p></o:p></p>
<p class="MsoNormal"><o:p>&nbsp;</o:p></p>
<div style="border:none;border-left:solid blue 1.5pt;padding:0in 0in 0in 4.0pt">
<div>
<div>
<p class="MsoNormal"><o:p>&nbsp;</o:p></p>
</div>
<div>
<p class="MsoNormal">And as a newbie, I felt that the fact TPM exposes two devices (/dev/tpm0 and /dev/tpmrm0) under Linux is confusing and is making things&nbsp;more&nbsp;complicated.&nbsp; The architecture diagram (<a href="https://github.com/tpm2-software/tpm2-tss">https://github.com/tpm2-software/tpm2-tss</a>)
 shows all calls go through the Resource Manager but that is not the case in reality.&nbsp; I was wondering what is the benefit to have 2 devices instead of just one device in linux?&nbsp;<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p>&nbsp;</o:p></p>
</div>
</div>
</div>
</div>
</body>
</html>
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.