From mboxrd@z Thu Jan 1 00:00:00 1970 From: Shuaijun Zhang Subject: Re: [PATCH] docs/vtpm: explain dom0 physical TPM access caveats Date: Wed, 12 Mar 2014 16:36:01 +0000 Message-ID: References: <20140312135145.GD3245@phenom.dumpdata.com> <53207134.5020009@tycho.nsa.gov> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============3006212408310686666==" Return-path: In-Reply-To: <53207134.5020009@tycho.nsa.gov> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Daniel De Graaf Cc: xen-devel@lists.xen.org List-Id: xen-devel@lists.xenproject.org --===============3006212408310686666== Content-Type: multipart/alternative; boundary=089e012297669acbbf04f46b6e45 --089e012297669acbbf04f46b6e45 Content-Type: text/plain; charset=ISO-8859-1 That explains the reason. But If the dom0 can't access the TPM, you will not be able to verify the dom0 system & the boot process. Is it not a security risk? Is there any solution that allows me to use vTPM and also be able to verify the dom0 system(host system)? Regards, Jason On 12 March 2014 14:37, Daniel De Graaf wrote: > On 03/12/2014 09:51 AM, Konrad Rzeszutek Wilk wrote: > >> On Wed, Mar 12, 2014 at 12:32:24PM +0000, Shuaijun Zhang wrote: >> >>> Hi There, >>> >>> In the document of VTPM (http://xenbits.xen.org/docs/ >>> unstable/misc/vtpm.txt >>> ): The Linux dom0 kernel should not try accessing the TPM while the >>> vTPM Manager >>> domain is accessing it. >>> >>> Anyone knows the reason why the dom0 should not access the TPM while vTPM >>> Mgr is accessing it? >>> >> >> Lets rope in the maintainer. Perhaps the doc should be updated to explain >> this. >> >> >>> Thanks & Regards, >>> Jason >>> >> > I agree; this docs patch explains the reasoning behind the original > guidance > and addresses use cases that cannot yet be handled by a virtual TPM. > > ----------------------------->8-------------------------------- > > Signed-off-by: Daniel De Graaf > --- > docs/misc/vtpm.txt | 22 ++++++++++++++++++---- > 1 file changed, 18 insertions(+), 4 deletions(-) > > diff --git a/docs/misc/vtpm.txt b/docs/misc/vtpm.txt > index df1dfae..d20b424 100644 > --- a/docs/misc/vtpm.txt > +++ b/docs/misc/vtpm.txt > @@ -120,10 +120,24 @@ the stubdom tree. > Compiling the LINUX dom0 kernel: > -------------------------------- > -The Linux dom0 kernel should not try accessing the TPM while the vTPM > -Manager domain is accessing it; the simplest way to accomplish this is > -to ensure the kernel is compiled without a driver for the TPM, or avoid > -loading the driver by blacklisting the module. > +Because the TPM manager uses direct access to the physical TPM, it may > interfere > +with access to the TPM by dom0. The simplest solution for this is to > prevent > +dom0 from accessing the physical TPM by compiling the kernel without a > driver or > +blacklisting the module. If dom0 needs a TPM but does not need to use it > during > +the boot process (i.e. it is not using IMA), a virtual TPM can be > attached to > +dom0 after the system is booted. > + > +Because the TPM manager does not yet accept requests for deep quotes, if > a quote > +or other request needs to be fulfilled by the physical TPM, dom0 will > need to > +access the physical TPM. In order to prevent interference, the TPM > Manager and > +dom0 should use different values for the TPM's locality; since Linux > always uses > +locality 0, using locality 2 for the TPM Manager is recommended. If both > Linux > +and the TPM Manager attempt to access the TPM at the same time, the TPM > device > +will return a busy status; some applications will consider this a fatal > error > +instead of retrying the command at a later time. If a vTPM gets an error > when > +loading its key, it will currently generate a fresh vTPM image (with a > new EK, > +SRK, and blank NVRAM). > + > Compiling the LINUX domU kernel: > -------------------------------- > -- Shuaijun Zhang Research Engineer Software Research Institute, Athlone Institute of Technology, IE Tel: +353 90 646 8196 http://www.ait.ie/sri/ --089e012297669acbbf04f46b6e45 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable
That explains the reason.=A0
But If the dom= 0 can't access the TPM, you will not be able to verify the dom0 system = & the boot process. Is it not a security risk?
Is there any s= olution that allows me to use vTPM and also be able to verify the dom0 syst= em(host system)?

Regards,
Jason


On 12 March 2014 14:37, Daniel D= e Graaf <dgdegra@tycho.nsa.gov> wrote:
On 03/12/2014 09:51 AM, Konrad Rzeszutek Wil= k wrote:
On Wed, Mar 12, 2014 at 12:32:24PM +0000, Shuaijun Zhang wrote:
Hi There,

In the document of VTPM (http://xenbits.xen.org/docs/unstable/= misc/vtpm.txt
): The Linux dom0 kernel should not try accessing the TPM while the
vTPM Manager
domain is accessing it.

Anyone knows the reason why the dom0 should not access the TPM while vTPM Mgr is accessing it?

Lets rope in the maintainer. Perhaps the doc should be updated to explain this.


Thanks & Regards,
Jason

I agree; this docs patch explains the reasoning behind the original guidanc= e
and addresses use cases that cannot yet be handled by a virtual TPM.

----------------------------->8--------------------------------

Signed-off-by: Daniel De Graaf <dgdegra@tycho.nsa.gov>
---
=A0docs/misc/vtpm.txt | 22 ++++++++++++++++++----
=A01 file changed, 18 insertions(+), 4 deletions(-)

diff --git a/docs/misc/vtpm.txt b/docs/misc/vtpm.txt
index df1dfae..d20b424 100644
--- a/docs/misc/vtpm.txt
+++ b/docs/misc/vtpm.txt
@@ -120,10 +120,24 @@ the stubdom tree.
=A0Compiling the LINUX dom0 kernel:
=A0--------------------------------
=A0-The Linux dom0 kernel should not try accessing the TPM while the vTPM -Manager domain is accessing it; the simplest way to accomplish this is
-to ensure the kernel is compiled without a driver for the TPM, or avoid -loading the driver by blacklisting the module.
+Because the TPM manager uses direct access to the physical TPM, it may int= erfere
+with access to the TPM by dom0. =A0The simplest solution for this is to pr= event
+dom0 from accessing the physical TPM by compiling the kernel without a dri= ver or
+blacklisting the module. =A0If dom0 needs a TPM but does not need to use i= t during
+the boot process (i.e. it is not using IMA), a virtual TPM can be attached= to
+dom0 after the system is booted.
+
+Because the TPM manager does not yet accept requests for deep quotes, if a= quote
+or other request needs to be fulfilled by the physical TPM, dom0 will need= to
+access the physical TPM. =A0In order to prevent interference, the TPM Mana= ger and
+dom0 should use different values for the TPM's locality; since Linux a= lways uses
+locality 0, using locality 2 for the TPM Manager is recommended. =A0If bot= h Linux
+and the TPM Manager attempt to access the TPM at the same time, the TPM de= vice
+will return a busy status; some applications will consider this a fatal er= ror
+instead of retrying the command at a later time. =A0If a vTPM gets an erro= r when
+loading its key, it will currently generate a fresh vTPM image (with a new= EK,
+SRK, and blank NVRAM).
+
=A0 Compiling the LINUX domU kernel:
=A0--------------------------------



--
Shuaijun Zha= ng
Research Engineer
Software Research Institute,
Athlone Institut= e of Technology, IE
Tel: +353 90 646 8196
http://www.ait.ie/sri/
--089e012297669acbbf04f46b6e45-- --===============3006212408310686666== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Xen-devel mailing list Xen-devel@lists.xen.org http://lists.xen.org/xen-devel --===============3006212408310686666==--