Patchwork [V4,00/10] Qemu Trusted Platform Module (TPM) integration

login
register
mail settings
Submitter Serge E. Hallyn
Date May 10, 2011, 4:07 a.m.
Message ID <20110510040712.GA5823@mail.hallyn.com>
Download mbox | patch
Permalink /patch/94935/
State New
Headers show

Comments

Serge E. Hallyn - May 10, 2011, 4:07 a.m.
To get this to compile on top of qemu-kvm, I needed the following
patch to force CONFIG_THREAD on so as to define things like
qemu_mutex_lock:
Stefan Berger - May 10, 2011, 10:46 a.m.
On 05/10/2011 12:07 AM, Serge E. Hallyn wrote:
> To get this to compile on top of qemu-kvm, I needed the following
> patch to force CONFIG_THREAD on so as to define things like
> qemu_mutex_lock:
>
> Index: qemu-kvm-tpm/configure
> ===================================================================
> --- qemu-kvm-tpm.orig/configure	2011-05-09 21:19:10.920002303 -0500
> +++ qemu-kvm-tpm/configure	2011-05-09 21:19:22.150002305 -0500
> @@ -3420,6 +3420,7 @@
>             exit 1
>         fi
>         echo "CONFIG_TPM=y">>  $config_host_mak
> +      echo "CONFIG_THREAD=y">>  $config_host_mak
>     fi
>   fi
>
That seems to be qemu-kvm specific.

   Stefan
Serge E. Hallyn - May 10, 2011, 11:59 a.m.
Quoting Stefan Berger (stefanb@linux.vnet.ibm.com):
> On 05/10/2011 12:07 AM, Serge E. Hallyn wrote:
> >To get this to compile on top of qemu-kvm, I needed the following
> >patch to force CONFIG_THREAD on so as to define things like
> >qemu_mutex_lock:
> >
> >Index: qemu-kvm-tpm/configure
> >===================================================================
> >--- qemu-kvm-tpm.orig/configure	2011-05-09 21:19:10.920002303 -0500
> >+++ qemu-kvm-tpm/configure	2011-05-09 21:19:22.150002305 -0500
> >@@ -3420,6 +3420,7 @@
> >            exit 1
> >        fi
> >        echo "CONFIG_TPM=y">>  $config_host_mak
> >+      echo "CONFIG_THREAD=y">>  $config_host_mak
> >    fi
> >  fi
> >
> That seems to be qemu-kvm specific.

Hm, yeah, I guess it is.  Wonder what the odds are of that actually
working then.  Well, I've just about got this and libtpms packaged,
will hopefully finish up this afternoon and see.

I saw nothing problematic in the patches, but just didn't feel
qualified to send acks based on simple review, so figured I'd be
better off actually testing.

What is your plan regarding libtpms?  Will you be making actual
releases at sf.net at some point?

thanks,
-serge
Stefan Berger - May 10, 2011, 12:43 p.m.
On 05/10/2011 07:59 AM, Serge E. Hallyn wrote:
> Quoting Stefan Berger (stefanb@linux.vnet.ibm.com):
>> On 05/10/2011 12:07 AM, Serge E. Hallyn wrote:
>>> To get this to compile on top of qemu-kvm, I needed the following
>>> patch to force CONFIG_THREAD on so as to define things like
>>> qemu_mutex_lock:
>>>
>>> Index: qemu-kvm-tpm/configure
>>> ===================================================================
>>> --- qemu-kvm-tpm.orig/configure	2011-05-09 21:19:10.920002303 -0500
>>> +++ qemu-kvm-tpm/configure	2011-05-09 21:19:22.150002305 -0500
>>> @@ -3420,6 +3420,7 @@
>>>             exit 1
>>>         fi
>>>         echo "CONFIG_TPM=y">>   $config_host_mak
>>> +      echo "CONFIG_THREAD=y">>   $config_host_mak
>>>     fi
>>>   fi
>>>
>> That seems to be qemu-kvm specific.
> Hm, yeah, I guess it is.  Wonder what the odds are of that actually
> working then.  Well, I've just about got this and libtpms packaged,
> will hopefully finish up this afternoon and see.
>
> I saw nothing problematic in the patches, but just didn't feel
> qualified to send acks based on simple review, so figured I'd be
> better off actually testing.
>
I am currently making modifications to the patches to support command 
lines like this one to be in line with other devices:

-tpm type=builtin,path=<path>,id=xyz   -device tpm_tis,id=xyz

Typically with command lines like this Qemu also supports multiple 
devices of the same type. With the TPM this is a bit problematic since 
it would need to support multiple TPMs also in the firmware (aka BIOS). 
So I may support this command line but only allow one TPM.

> What is your plan regarding libtpms?  Will you be making actual
> releases at sf.net at some point?
I was going to wait for a review of all the patches here on the ml and 
see the code checked in -- until that hasn't happened anything could 
change. So for now I am keeping libtpms in Fedora Rawhide and then was 
going to produce a libtpms-0.5.2 and make it commonly available via 
Fedora, maybe putting a copy of the library on sf.net. I would hold off 
on packaging and distributing it.

    Stefan
Serge E. Hallyn - May 10, 2011, 2:20 p.m.
Quoting Stefan Berger (stefanb@linux.vnet.ibm.com):
> >What is your plan regarding libtpms?  Will you be making actual
> >releases at sf.net at some point?
> I was going to wait for a review of all the patches here on the ml
> and see the code checked in -- until that hasn't happened anything
> could change. So for now I am keeping libtpms in Fedora Rawhide and
> then was going to produce a libtpms-0.5.2 and make it commonly
> available via Fedora, maybe putting a copy of the library on sf.net.
> I would hold off on packaging and distributing it.

Ok, thanks, so I certainly won't push it into the archives yet, but
will keep it in a ppa for easy testing.

thanks,
-serge

Patch

Index: qemu-kvm-tpm/configure
===================================================================
--- qemu-kvm-tpm.orig/configure	2011-05-09 21:19:10.920002303 -0500
+++ qemu-kvm-tpm/configure	2011-05-09 21:19:22.150002305 -0500
@@ -3420,6 +3420,7 @@ 
           exit 1
       fi
       echo "CONFIG_TPM=y" >> $config_host_mak
+      echo "CONFIG_THREAD=y" >> $config_host_mak
   fi
 fi