1. 16 10月, 2017 1 次提交
    • D
      qemu: ensure TLS clients always verify the server certificate · 16daadc7
      Daniel P. Berrange 提交于
      The default_tls_x509_verify (and related) parameters in qemu.conf
      control whether the QEMU TLS servers request & verify certificates
      from clients. This works as a simple access control system for
      servers by requiring the CA to issue certs to permitted clients.
      This use of client certificates is disabled by default, since it
      requires extra work to issue client certificates.
      
      Unfortunately the code was using this configuration parameter when
      setting up both TLS clients and servers in QEMU. The result was that
      TLS clients for character devices and disk devices had verification
      turned off, meaning they would ignore errors while validating the
      server certificate.
      
      This allows for trivial MITM attacks between client and server,
      as any certificate returned by the attacker will be accepted by
      the client.
      
      This is assigned CVE-2017-1000256  / LSN-2017-0002
      Reviewed-by: NEric Blake <eblake@redhat.com>
      Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
      (cherry picked from commit 441d3eb6)
      16daadc7
  2. 17 1月, 2017 2 次提交
    • J
      tests: fix QED disk test in xlconfigtest · d0f12e08
      Jim Fehlig 提交于
      When LIBXL_HAVE_QED is defined, xlconfigtest fails
      
       9) Xen XL-2-XML Format disk-qed  ... command line: config parsing error
       in disk specification: no vdev specified in
       `target=/var/lib/libvirt/images/XenGuest2,format=qed,backendtype=qdisk,vdev=hda,access=rw'
      FAILED
      
      As per the xl-disk-configuration(5) man page, target= must come
      last in the disk specification when specified by name:
      
      When this parameter is specified by name, ie with the target=
      syntax in the configuration file, it consumes the whole rest of the
      DISKSPEC including trailing whitespaces.  Therefore in that case
      it must come last.
      
      Change tests/xlconfigdata/test-disk-qed.cfg to adhere to this
      restriction.
      d0f12e08
    • D
      Revert "perf: Add cache_l1d perf event support" · 2d0c4947
      Daniel P. Berrange 提交于
      This reverts commit ae16c95f.
      2d0c4947
  3. 11 1月, 2017 2 次提交
    • L
      conf: aggregate multiple pcie-root-ports onto a single slot · 147ebe6d
      Laine Stump 提交于
      Set the VIR_PCI_CONNECT_AGGREGATE_SLOT flag for pcie-root-ports so
      that they will be assigned to all the functions on a slot.
      
      Some qemu test case outputs had to be adjusted due to the
      pcie-root-ports now being put on multiple functions.
      147ebe6d
    • L
      qemu: use virDomainPCIAddressSetAllMulti() to set multi when needed · 8f400871
      Laine Stump 提交于
      If there are multiple devices assigned to the different functions of a
      single PCI slot, they will not work properly if the device at function
      0 doesn't have its "multi" attribute turned on, so it makes sense for
      libvirt to turn it on during PCI address assignment. Setting multi
      then assures that the new setting is stored in the config (so it will
      be used next time the domain is started), preventing any potential
      problems in the case that a future change in the configuration
      eliminates the devices on all non-0 functions (multi will still be set
      for function 0 even though it is the only function in use on the slot,
      which has no useful purpose, but also doesn't cause any problems).
      
      (NB: If we were to instead just decide on the setting for
      multifunction at runtime, a later removal of the non-0 functions of a
      slot would result in a silent change in the guest ABI for the
      remaining device on function 0 (although it may seem like an
      inconsequential guest ABI change, it *is* a guest ABI change to turn
      off the multi bit).)
      8f400871
  4. 10 1月, 2017 2 次提交
    • A
      qemu: Use virtio-pci by default for mach-virt guests · 1d845463
      Andrea Bolognani 提交于
      virtio-pci is the way forward for aarch64 guests: it's faster
      and less alien to people coming from other architectures.
      Now that guest support is finally getting there (Fedora 24,
      CentOS 7.3, Ubuntu 16.04 and Debian testing all support
      virtio-pci out of the box), we'd like to start using it by
      default instead of virtio-mmio.
      
      Users and applications can already opt-in by explicitly using
      
        <address type='pci'/>
      
      inside the relevant elements, but that's kind of cumbersome and
      requires all users and management applications to adapt, which
      we'd really like to avoid.
      
      What we can do instead is use virtio-mmio only if the guest
      already has at least one virtio-mmio device, and use virtio-pci
      in all other situations.
      
      That means existing virtio-mmio guests will keep using the old
      addressing scheme, and new guests will automatically be created
      using virtio-pci instead. Users can still override the default
      in either direction.
      
      Existing tests such as aarch64-aavmf-virtio-mmio and
      aarch64-virtio-pci-default already cover all possible
      scenarios, so no additions to the test suites are necessary.
      1d845463
    • N
      perf: Add cache_l1d perf event support · ae16c95f
      Nitesh Konkar 提交于
      This patch adds support and documentation for
      a generalized hardware cache event called cache_l1d
      perf event.
      Signed-off-by: NNitesh Konkar <nitkon12@linux.vnet.ibm.com>
      ae16c95f
  5. 07 1月, 2017 3 次提交
  6. 06 1月, 2017 6 次提交
  7. 05 1月, 2017 1 次提交
  8. 04 1月, 2017 1 次提交
  9. 02 1月, 2017 7 次提交
  10. 22 12月, 2016 1 次提交
    • P
      tests: enable virpolkittest on any ELF platform · c782a8d9
      Pino Toscano 提交于
      This tests uses preload, which should work on any ELF-based platform
      (and indeed it passes on Linux, GNU/kFreeBSD, and FreeBSD).
      
      Also remove the WITH_DBUS conditional, as the test is already built
      based on that conditional.
      c782a8d9
  11. 21 12月, 2016 1 次提交
  12. 20 12月, 2016 1 次提交
  13. 19 12月, 2016 1 次提交
  14. 16 12月, 2016 4 次提交
  15. 14 12月, 2016 2 次提交
  16. 13 12月, 2016 1 次提交
  17. 09 12月, 2016 1 次提交
    • J
      tests: Fix virmacmaptest when allocation fails · 80acf4b8
      John Ferlan 提交于
      If the allocation fails in DO_TEST_FLUSH_PROLOGUE, then 'mgr == NULL',
      but the code continues on - which won't be good. So modify the macro
      to cause an immediate failure and jump to a cleanup label.
      
      Found by Coverity as FORWARD_NULL event.
      80acf4b8
  18. 08 12月, 2016 2 次提交
    • M
      qemu: Create hugepage path on per domain basis · f55afd83
      Michal Privoznik 提交于
      If you've ever tried running a huge page backed guest under
      different user than in qemu.conf, you probably failed. Problem is
      even though we have corresponding APIs in the security drivers,
      there's no implementation and thus we don't relabel the huge page
      path. But even if we did, so far all of the domains share the
      same path:
      
         /hugepageMount/libvirt/qemu
      
      Our only option there would be to set 0777 mode on the qemu dir
      which is totally unsafe. Therefore, we can create dir on
      per-domain basis, i.e.:
      
         /hugepageMount/libvirt/qemu/domainName
      
      and chown domainName dir to the user that domain is configured to
      run under.
      Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
      f55afd83
    • M
      conf: Make scheduler formatting simpler · dc18766b
      Martin Kletzander 提交于
      Since the great rework of how we store vcpu- and iothread-related
      data, we have overly complex part of code that is trying to format the
      scheduler tuning data in as less lines as possible by grouping
      settings for multiple threads.  That was designed as an input syntax
      sugar for users, but we don't need to also use that when formatting
      the XML.  Switching to simple enumeration makes the code nicer,
      shorter and more welcoming to future changes.
      Signed-off-by: NMartin Kletzander <mkletzan@redhat.com>
      dc18766b
  19. 07 12月, 2016 1 次提交