qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Stefan Berger <stefanb@linux.vnet.ibm.com>
To: Kevin O'Connor <kevin@koconnor.net>
Cc: seabios@seabios.org, qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [SeaBIOS] [PATCH V5 0/9] Add TPM support to SeaBIOS
Date: Thu, 07 Jul 2011 11:22:26 -0400	[thread overview]
Message-ID: <4E15CF32.20002@linux.vnet.ibm.com> (raw)
In-Reply-To: <20110707124319.GA23494@morn.localdomain>

On 07/07/2011 08:43 AM, Kevin O'Connor wrote:
> On Thu, Jul 07, 2011 at 07:48:29AM -0400, Stefan Berger wrote:
>> On 07/06/2011 06:58 PM, Kevin O'Connor wrote:
>>> BTW, I don't think patch 7 or 9 really make sense to integrate in the
>>> official version of SeaBIOS.  Also, in patch 8, I'd prefer to see all
>>> new fw_cfg entries use the "romfile" mechanism.
>> Patch 7 is the menu. This patch is needed in 'some form' since in
>> some cases, like after giving up ownership of the TPM, the TPM
>> becomes disabled and deactivated and one has to interact with the
>> BIOS to activate and enable it again. Other scenarios include
>> someone who has forgotten the owner password for the TPM and now has
>> to go through the BIOS to give up ownership of it -- that's the only
>> way one can do this then.
> Hrmm.  I don't recall seeing this menu on the factory BIOS of real
> machines.  How do normal users interact with it?
Everyone has to go through the BIOS menu to maybe even enable and 
activate the TPM before first use. It's typically under 'security'.
> Can the info be passed in from QEmu?
>
To a certain limit, yes. I have an experimental patch that allows one to 
pass in a parameter via command line to Qemu which then passes this 
parameter on to the BIOS via the firmware interface. It tells the BIOS 
what it should do with the TPM upon VM startup / reboot. I can for 
example tell it to always enable and activate the TPM so that the user 
doesn't have to go through the BIOS once he gave up ownership of the 
device. However, I cannot tell the BIOS to give up ownership every time 
there is a startup/reboot since otherwise all keys that the TPM owner 
generated will be lost. So the case where the user forgot his password 
is problematic and in that case he would have to get to the BIOS menu, 
give up ownership and then boot the machine again. The reason is that 
only during an early bootup the TPM is in a state that would allow 
certain commands to be sent that among other things allow giving up 
ownership.

>> I'll have a look at the 'romfile' mechanism for patch 8.
>>
>> I only post patch 9 for someone who is interested to be able to run
>> the tests. Since the 128kb are slowly filling up, it's not going to
>> be compilable with it for much longer and I don't expect it to go
>> into the repo.
So regarding the romfile mechanism for patch 8: In patch 8 I (expect 
Qemu to) hash for example files passed via -kernel, -initrd and data 
provided via -append or modules in case of multiboot, write them into 
concatenated data structures and pass the byte array to the firmware 
interface for SeaBIOS to pick up. Now with the romfile mechanism I have 
the impression that these are more or less static data, whereas what is 
happening in patch 8 depends on the parameters pass to qemu.

Here an example for such a command line when Qemu starts in this type of 
paravirtualized mode:

qemu -kernel /boot/vmlinuz-2.6.36 -initrd /boot/initrd-2.6.36 -append 
"ro [...]" [...]

In effect Qemu does a

sha1sum /boot/vmlinuz-2.6.36
sha1sum /boot/initrd-2.6.36
echo -n "ro [...] | sha1sum

and logs what it measured, i.e., kernel, initrd, or command line.

And here's the corresponding patch for Qemu:

http://www.mail-archive.com/qemu-devel@nongnu.org/msg69677.html

> There is no limit at 128K - if it's exceeded the build will start
> using a 256K rom.
>
Good to know.

    Stefan
> More important than the total size is the "fixed" size reported at the
> end of the build - that's how much space is used under 1 Meg after the
> "post" phase completes.  Ideally it would stay under 64K though that's
> not a hard limit either.
>
> -Kevin

      reply	other threads:[~2011-07-07 15:22 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-07-06 16:31 [Qemu-devel] [PATCH V5 0/9] Add TPM support to SeaBIOS Stefan Berger
2011-07-06 16:31 ` [Qemu-devel] [PATCH V5 1/9] Add an implementation of a TPM TIS driver Stefan Berger
2011-07-06 16:32 ` [Qemu-devel] [PATCH V5 2/9] Provide ACPI SSDT table for TPM device + S3 resume support Stefan Berger
2011-07-06 16:32 ` [Qemu-devel] [PATCH V5 3/9] Add public get_rsdp function Stefan Berger
2011-07-06 16:32 ` [Qemu-devel] [PATCH V5 4/9] Implementation of the TCG BIOS extensions Stefan Berger
2011-07-06 16:32 ` [Qemu-devel] [PATCH V5 5/9] Support for BIOS interrupt handler Stefan Berger
2011-07-06 16:32 ` [Qemu-devel] [PATCH V5 6/9] Add measurement code to the BIOS Stefan Berger
2011-07-06 16:32 ` [Qemu-devel] [PATCH V5 7/9] Add a menu for TPM control Stefan Berger
2011-07-06 16:32 ` [Qemu-devel] [PATCH V5 8/9] Support for Qemu-provided measurements Stefan Berger
2011-07-06 16:32 ` [Qemu-devel] [PATCH V5 9/9] Optional tests for the TIS interface Stefan Berger
2011-07-06 22:58 ` [Qemu-devel] [SeaBIOS] [PATCH V5 0/9] Add TPM support to SeaBIOS Kevin O'Connor
2011-07-07 11:48   ` Stefan Berger
2011-07-07 12:43     ` Kevin O'Connor
2011-07-07 15:22       ` Stefan Berger [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=4E15CF32.20002@linux.vnet.ibm.com \
    --to=stefanb@linux.vnet.ibm.com \
    --cc=kevin@koconnor.net \
    --cc=qemu-devel@nongnu.org \
    --cc=seabios@seabios.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).