1. 25 7月, 2017 2 次提交
  2. 24 7月, 2017 6 次提交
  3. 20 7月, 2017 4 次提交
  4. 19 7月, 2017 1 次提交
    • M
      virFileInData: Report an error if unable to reposition file · 8ae82e67
      Michal Privoznik 提交于
      The purpose of this function is to tell if the current position
      in given FD is in data section or a hole and how much bytes there
      is remaining until the end of the section. This is achieved by
      couple of lseeks(). The most important part is that we reposition
      the FD back, so that the position is unchanged from the caller
      POV. And until now the final lseek() back to the original
      position was done with no check for errors. And I was convinced
      that that's okay since nothing can go wrong. However, review
      feedback from a related series persuaded me, that it's better to
      be safe than sorry. Therefore, lets check if the final lseek()
      succeeded and if it doesn't report an error.
      Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
      Reviewed-by: NJohn Ferlan <jferlan@redhat.com>
      8ae82e67
  5. 14 7月, 2017 3 次提交
  6. 13 7月, 2017 3 次提交
    • D
      Revert "Prevent more compiler optimization of mockable functions" · 407a281a
      Daniel P. Berrange 提交于
      This reverts commit e4b980c8.
      
      When a binary links against a .a archive (as opposed to a shared library),
      any symbols which are marked as 'weak' get silently dropped. As a result
      when the binary later runs, those 'weak' functions have an address of
      0x0 and thus crash when run.
      
      This happened with virtlogd and virtlockd because they don't link to
      libvirt.so, but instead just libvirt_util.a and libvirt_rpc.a. The
      virRandomBits symbols was weak and so left out of the virtlogd &
      virtlockd binaries, despite being required by virHashTable functions.
      
      Various other binaries like libvirt_lxc, libvirt_iohelper, etc also
      link directly to .a files instead of libvirt.so, so are potentially
      at risk of dropping symbols leading to a later runtime crash.
      
      This is normal linker behaviour because a weak symbol is not treated
      as undefined, so nothing forces it to be pulled in from the .a You
      have to force the linker to pull in weak symbols using -u$SYMNAME
      which is not a practical approach.
      
      This risk is silent bad linkage that affects runtime behaviour is
      not acceptable for a fix that was merely trying to fix the test
      suite. So stop using __weak__ again.
      Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
      407a281a
    • M
      util: Don't leak linksrc in vircgroup · 1701ba6f
      Martin Kletzander 提交于
      Signed-off-by: NMartin Kletzander <mkletzan@redhat.com>
      1701ba6f
    • J
      Avoid hidden cgroup mount points · dacd160d
      Juan Hernandez 提交于
      Currently the scan of the /proc/mounts file used to find cgroup mount
      points doesn't take into account that mount points may hidden by other
      mount points. For, example in certain Kubernetes environments the
      /proc/mounts contains the following lines:
      
        cgroup /sys/fs/cgroup/net_prio,net_cls cgroup ...
        tmpfs /sys/fs/cgroup tmpfs ...
        cgroup /sys/fs/cgroup/net_cls,net_prio cgroup ...
      
      In this particular environment the first mount point is hidden by the
      second one. The correct mount point is the third one, but libvirt will
      never process it because it only checks the first mount point for each
      controller (net_cls in this case). So libvirt will try to use the first
      mount point, which doesn't actually exist, and the complete detection
      process will fail.
      
      To avoid that issue this patch changes the virCgroupDetectMountsFromFile
      function so that when there are duplicates it takes the information from
      the last line in /proc/mounts. This requires removing the previous
      explicit condition to skip duplicates, and adding code to free the
      memory used by the processing of duplicated lines.
      
      Related-To: https://bugzilla.redhat.com/1468214
      Related-To: https://github.com/kubevirt/libvirt/issues/4Signed-off-by: NJuan Hernandez <jhernand@redhat.com>
      dacd160d
  7. 11 7月, 2017 11 次提交
  8. 28 6月, 2017 1 次提交
  9. 26 6月, 2017 1 次提交
  10. 24 6月, 2017 1 次提交
    • J
      util: Force reading of meta data to get encryption capacity value · 5431055d
      John Ferlan 提交于
      https://bugzilla.redhat.com/show_bug.cgi?id=1371892
      
      As it turns out the volume create, build, and refresh path was not peeking
      at the meta data, so immediately after a create operation the value displayed
      for capacity was still incorrect. However, if a pool refresh was done the
      correct value was fetched as a result of a meta data peek.
      
      The reason is it seems historically if the file type is RAW then peeking
      at the file just took the physical value for the capacity. However, since
      we know if it's an encrypted file, then peeking at the meta data will be
      required in order to get a true capacity value.
      
      So check for encryption in the source and if present, use the meta data
      in order to fill in the capacity value and set the payload_offset.
      5431055d
  11. 23 6月, 2017 1 次提交
  12. 22 6月, 2017 5 次提交
  13. 20 6月, 2017 1 次提交