1. 13 6月, 2018 1 次提交
  2. 12 6月, 2018 3 次提交
  3. 08 6月, 2018 5 次提交
  4. 06 6月, 2018 5 次提交
    • S
      conf: Add support for choosing emulation of a TPM 2.0 · 8737578d
      Stefan Berger 提交于
      This patch extends the TPM's device XML with TPM 2.0 support. This only works
      for the emulator type backend and looks as follows:
      
          <tpm model='tpm-tis'>
            <backend type='emulator' version='2.0'/>
          </tpm>
      
      The swtpm process now has --tpm2 as an additional parameter:
      
      system_u:system_r:svirt_t:s0:c597,c632 tss 18477 11.8  0.0 28364  3868 ?        Rs   11:13  13:50 /usr/bin/swtpm socket --daemon --ctrl type=unixio,path=/var/run/libvirt/qemu/swtpm/testvm-swtpm.sock,mode=0660 --tpmstate dir=/var/lib/libvirt/swtpm/testvm/tpm2,mode=0640 --log file=/var/log/swtpm/libvirt/qemu/testvm-swtpm.log --tpm2 --pid file=/var/run/libvirt/qemu/swtpm/testvm-swtpm.pid
      
      The version of the TPM can be changed and the state of the TPM is preserved.
      Signed-off-by: NStefan Berger <stefanb@linux.vnet.ibm.com>
      Reviewed-by: NJohn Ferlan <jferlan@redhat.com>
      Reviewed-by: NJán Tomko <jtomko@redhat.com>
      8737578d
    • S
      qemu: Extend QEMU with external TPM support · 2a606b86
      Stefan Berger 提交于
      Implement functions for managing the storage of the external swtpm as well
      as starting and stopping it. Also implement functions to use swtpm_setup,
      which simulates the manufacturing of a TPM, which includes creation of
      certificates for the device.
      
      Further, the external TPM needs storage on the host that we need to set
      up before it can be run. We can clean up the host once the domain is
      undefined.
      
      This patch also implements a small layer for external device support that
      calls into the TPM device layer if a domain has an attached TPM. This is
      the layer we will wire up later on.
      Signed-off-by: NStefan Berger <stefanb@linux.vnet.ibm.com>
      Reviewed-by: NJohn Ferlan <jferlan@redhat.com>
      Reviewed-by: NJán Tomko <jtomko@redhat.com>
      2a606b86
    • S
      conf: Add support for external swtpm TPM emulator to domain XML · 33af0b2b
      Stefan Berger 提交于
      This patch adds support for an external swtpm TPM emulator. The XML for
      this type of TPM looks as follows:
      
       <tpm model='tpm-tis'>
         <backend type='emulator'/>
       </tpm>
      
      The XML will currently only define a TPM 1.2.
      
      Extend the documentation.
      
      Add a test case testing the XML parser and formatter.
      Signed-off-by: NStefan Berger <stefanb@linux.vnet.ibm.com>
      Reviewed-by: NJohn Ferlan <jferlan@redhat.com>
      Reviewed-by: NJán Tomko <jtomko@redhat.com>
      33af0b2b
    • J
      qemu: Fix double free in qemuDomainSecretAESClear · 228ae709
      John Ferlan 提交于
      Commit id 02b031a4 added a secondary path from which the
      incoming @secinfo would not be free'd until the private
      data was freed in qemuDomainStorageSourcePrivateDispose.
      
      However, by doing this the original intention to free
      @*secinfo afterwards is lost and thus the pass by value
      of the secinfo->s.aes (or secinfo->s.plain for its method)
      results in not keeping the NULL setting in the various
      secret.{username|iv|ciphertext} fields upon return to
      qemuDomainSecretInfoClear and eventually will result in
      a double free at domain destroy:
      
          raise ()
          abort ()
          __libc_message ()
          malloc_printerr ()
          _int_free ()
          virFree
          qemuDomainSecretAESClear
          qemuDomainSecretInfoClear
          qemuDomainSecretInfoFree
          qemuDomainStorageSourcePrivateDispose
          virObjectUnref
          virStorageSourceClear
          virStorageSourceFree
          virDomainDiskDefFree
          virDomainDefFree
          virDomainObjRemoveTransientDef
          qemuProcessStop
          qemuDomainDestroyFlags
          virDomainDestroy
      Signed-off-by: NJohn Ferlan <jferlan@redhat.com>
      ACKed-by: NPeter Krempa <pkrempa@redhat.com>
      228ae709
    • R
      all: Replace virGetLastError with virGetLastErrorCode where we can · 2b6667ab
      ramyelkest 提交于
      Replace instances where we previously called virGetLastError just to
      either get the code or to check if an error exists with
      virGetLastErrorCode to avoid a validity pre-check.
      Signed-off-by: NRamy Elkest <ramyelkest@gmail.com>
      Reviewed-by: NErik Skultety <eskultet@redhat.com>
      2b6667ab
  5. 05 6月, 2018 26 次提交