xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
From: Jordi Cucurull Juan <jordi.cucurull@scytl.com>
To: Ian Campbell <Ian.Campbell@citrix.com>, xen-devel@lists.xenproject.org
Cc: Daniel De Graaf <dgdegra@tycho.nsa.gov>,
	Jordi Cucurull Juan <jordi.cucurull@scytl.com>
Subject: Re: Questions about the usage of the vTPM implemented in Xen 4.3
Date: Mon, 10 Feb 2014 18:23:03 +0100	[thread overview]
Message-ID: <52F90AF7.603@scytl.com> (raw)
In-Reply-To: <1392042440.26657.9.camel@kazak.uk.xensource.com>

[-- Attachment #1: Type: text/plain, Size: 3180 bytes --]

Hello Ian,

I am using the "xl" toolstack. I have included the configuration and
screen logs of the vTPM-Mgr stub domain, vTPM stub domain and DomU.

As you can see in the logs, I have enabled the vTPM Mgr and vTPM stub
domains once. Then I have enabled the DomU two consecutive times without
disconnecting the stub domains (in all the cases issuing the command "xl
create -c /var/xen/configuration.cfg).

When the DomU shuts down (after issuing a poweroff command with an ssh
connection) the vTPM stub domain does not stop. Instead the following
entries appear on its log:

Tpmback:Info Frontend 14/0 disconnected^M
Failed to read /local/domain/14/device/vtpm/0/state.^M
Tpmback:Info Frontend 14/0 disconnected^M

and later, when the DomU is started again:

Tpmback:Info Frontend 15/0 connected^M

In addition, one can see that the measurements performed by the
"pv-grub" differ from the first to the second boot of the DomU (since
the vTPM domain instance has been kept alive):

[root@localhost ~]# cat /sys/class/misc/tpm0/device/pcrs
...
PCR-04: 5A 4D CA AA C4 90 19 78 9A CB 7A C9 87 A6 08 A8 7C A2 7B DB
PCR-05: E5 6C FC F9 65 D2 D0 FC 7A 24 7F 42 66 28 D5 F9 D3 10 EF 72
...

[root@localhost ~]# cat /sys/class/misc/tpm0/device/pcrs
...
PCR-04: BB 67 AA F3 9E B6 4B 8F 7E 76 57 7A 16 14 FB 0C B2 57 DF 69
PCR-05: C0 A5 04 68 85 93 1B CD AE 61 F7 DA 49 ED 72 9E 2E D7 06 F0
...


Does anybody know if this is the expected behaviour? Can this be changed?


Thanks!
Jordi.



On 02/10/2014 03:27 PM, Ian Campbell wrote:
> CCing the vTPM maintainer.
>
> On Wed, 2014-02-05 at 17:52 +0100, Jordi Cucurull Juan wrote:
>> Dear all,
>>
>> I have recently configured a Xen 4.3 server with the vTPM enabled and a
>> guest virtual machine that takes advantage of it. After playing a bit
>> with it, I have a few questions:
>>
>> 1.According to the documentation, to shutdown the vTPM stubdom it is
>> only needed to normally shutdown the guest VM. Theoretically, the vTPM
>> stubdom automatically shuts down after this. Nevertheless, if I shutdown
>> the guest the vTPM stubdom continues active and, moreover, I can start
>> the machine again and the values of the vTPM are the last ones there
>> were in the previous instance of the guest. Is this normal?
> I don't know much about vTPM but this seems odd to me. Which toolstack
> are you using? Can you provide details of your config and logs from both
> the startup and shutdown etc please.
>
> I've no clue about #2 or #3 I'm afraid.
>
>> 2.In the documentation it is recommended to avoid accessing the physical
>> TPM from Dom0 at the same time than the vTPM Manager stubdom.
>> Nevertheless, I currently have the IMA and the Trousers enabled in Dom0
>> without any apparent issue. Why is not recommended directly accessing
>> the physical TPM of Dom0?
>>
>> 3.If it is not recommended to directly accessing the physical TPM in
>> Dom0, which is the advisable way to check the integrity of this domain?
>> With solutions such as TBOOT and IntelTXT?
>>
>> Best regards,
>> Jordi.
>>
>>
>>
>> _______________________________________________
>> Xen-devel mailing list
>> Xen-devel@lists.xen.org
>> http://lists.xen.org/xen-devel
>


[-- Attachment #2: conf-domu.cfg --]
[-- Type: text/plain, Size: 356 bytes --]

# Configuration of pv-grub
kernel = "/usr/local/lib/xen/boot/pv-grub-x86_64.gz"
extra= "(hd0,0)/grub/grub.conf"

# Configuration of guest
name = "virtual1"
memory = "512"
disk = [ 'tap:aio:/var/xen/virtual1/virtual1.img,xvda,w' ]
vif = [ 'mac=00:16:3E:5C:48:A2,ip=10.0.0.1' ]
vcpus=1
on_reboot = 'destroy'
on_crash = 'destroy'
vtpm=["backend=domu-vtpm1"]


[-- Attachment #3: conf-vtpm.cfg --]
[-- Type: text/plain, Size: 225 bytes --]

kernel="/usr/local/lib/xen/boot/vtpm-stubdom.gz"
memory=8
disk=["file:/home/jcucurull/Xen/virtual1/vtpm.img,hda,w"]
name="domu-vtpm1"
vtpm=["backend=vtpmmgr,uuid=b85cd52c-d39c-4364-9306-2bfa476be2e2"]
extra="hwinitpcr=none"


[-- Attachment #4: conf-vtpmmgr.cfg --]
[-- Type: text/plain, Size: 145 bytes --]

kernel="/usr/local/lib/xen/boot/vtpmmgr-stubdom.gz"
memory=16
disk=["file:/var/xen/vtpmmgr-stubdom.img,hda,w"]
name="vtpmmgr"
iomem=["fed40,5"]


[-- Attachment #5: enable-domu.log.gz --]
[-- Type: application/x-gzip, Size: 3214 bytes --]

[-- Attachment #6: enable-vtpm.log.gz --]
[-- Type: application/x-gzip, Size: 7172 bytes --]

[-- Attachment #7: enable-vtpmmgr.log.gz --]
[-- Type: application/x-gzip, Size: 3060 bytes --]

[-- Attachment #8: Type: text/plain, Size: 126 bytes --]

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel

  reply	other threads:[~2014-02-10 17:23 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-02-05 16:52 Questions about the usage of the vTPM implemented in Xen 4.3 Jordi Cucurull Juan
2014-02-10 14:27 ` Ian Campbell
2014-02-10 17:23   ` Jordi Cucurull Juan [this message]
2014-02-10 19:40 ` Daniel De Graaf
2014-02-11  9:37   ` Ian Campbell
2014-02-11 15:25     ` [PATCH] docs/vtpm: fix auto-shutdown reference Daniel De Graaf
2014-02-12 17:22       ` Ian Campbell
2014-02-13  9:54         ` Ian Campbell
2014-02-11 10:01   ` Questions about the usage of the vTPM implemented in Xen 4.3 Jordi Cucurull Juan
2014-02-11 15:26     ` Daniel De Graaf
2014-02-12  9:38       ` Jordi Cucurull Juan
2014-02-12 19:07         ` Daniel De Graaf

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=52F90AF7.603@scytl.com \
    --to=jordi.cucurull@scytl.com \
    --cc=Ian.Campbell@citrix.com \
    --cc=dgdegra@tycho.nsa.gov \
    --cc=xen-devel@lists.xenproject.org \
    /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
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).