1. 13 4月, 2019 8 次提交
  2. 12 4月, 2019 1 次提交
  3. 08 4月, 2019 2 次提交
  4. 14 3月, 2019 1 次提交
  5. 07 3月, 2019 1 次提交
    • M
      cpu: Don't access invalid memory in virCPUx86Translate · 62cb9c33
      Michal Privoznik 提交于
      Problem is that if there are no signatures for a CPU, then we
      still allocate cpu->signatures (even though with size 0). Later,
      we access cpu->signatures[0] if cpu->signatures is not NULL.
      
       Invalid read of size 4
          at 0x5F439D7: virCPUx86Translate (cpu_x86.c:2930)
          by 0x5F3C239: virCPUTranslate (cpu.c:927)
          by 0x57CE7A1: qemuProcessUpdateGuestCPU (qemu_process.c:5870)
          ...
        Address 0xf752d40 is 0 bytes after a block of size 0 alloc'd
          at 0x4C30EC6: calloc (vg_replace_malloc.c:711)
          by 0x5DBDE4E: virAllocN (viralloc.c:190)
          by 0x5F3E4FA: x86ModelCopySignatures (cpu_x86.c:990)
          by 0x5F3E60F: x86ModelCopy (cpu_x86.c:1008)
          by 0x5F3E7CB: x86ModelFromCPU (cpu_x86.c:1068)
          by 0x5F4397E: virCPUx86Translate (cpu_x86.c:2922)
          by 0x5F3C239: virCPUTranslate (cpu.c:927)
          by 0x57CE7A1: qemuProcessUpdateGuestCPU (qemu_process.c:5870)
          ...
      Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
      Reviewed-by: NJiri Denemark <jdenemar@redhat.com>
      62cb9c33
  6. 05 3月, 2019 10 次提交
  7. 14 12月, 2018 2 次提交
    • D
      Enforce a standard header file guard symbol name · 568a4172
      Daniel P. Berrangé 提交于
      Require that all headers are guarded by a symbol named
      
        LIBVIRT_$FILENAME
      
      where $FILENAME is the uppercased filename, with all characters
      outside a-z changed into '_'.
      
      Note we do not use a leading __ because that is technically a
      namespace reserved for the toolchain.
      Signed-off-by: NDaniel P. Berrangé <berrange@redhat.com>
      568a4172
    • D
      Remove all Author(s): lines from source file headers · 60046283
      Daniel P. Berrangé 提交于
      In many files there are header comments that contain an Author:
      statement, supposedly reflecting who originally wrote the code.
      In a large collaborative project like libvirt, any non-trivial
      file will have been modified by a large number of different
      contributors. IOW, the Author: comments are quickly out of date,
      omitting people who have made significant contribitions.
      
      In some places Author: lines have been added despite the person
      merely being responsible for creating the file by moving existing
      code out of another file. IOW, the Author: lines give an incorrect
      record of authorship.
      
      With this all in mind, the comments are useless as a means to identify
      who to talk to about code in a particular file. Contributors will always
      be better off using 'git log' and 'git blame' if they need to  find the
      author of a particular bit of code.
      
      This commit thus deletes all Author: comments from the source and adds
      a rule to prevent them reappearing.
      
      The Copyright headers are similarly misleading and inaccurate, however,
      we cannot delete these as they have legal meaning, despite being largely
      inaccurate. In addition only the copyright holder is permitted to change
      their respective copyright statement.
      Reviewed-by: NErik Skultety <eskultet@redhat.com>
      Signed-off-by: NDaniel P. Berrangé <berrange@redhat.com>
      60046283
  8. 15 11月, 2018 2 次提交
  9. 20 9月, 2018 1 次提交
  10. 17 9月, 2018 2 次提交
  11. 28 8月, 2018 5 次提交
  12. 17 8月, 2018 3 次提交
  13. 04 7月, 2018 1 次提交
    • D
      cpu: add 'amd-ssbd' and 'amd-no-ssb' CPU features (CVE-2018-3639) · 2625722c
      Daniel P. Berrangé 提交于
      AMD x86 CPUs have two separate ways to mitigate the Speculative Store
      Bypass hardware flaw. In current processors only non-architectural MSRs
      are available, and so hypervisors must expose a virtualized MSR and CPU
      flag "virt-ssbd" (CPUID Function 8000_0008, EBX[25]=1).
      
      In future processors AMD will provide an architectural MSR, indicated by
      existance of the CPUID Function 8000_0008, EBX[24]=1, to which QEMU has
      given the name "amd-ssbd".
      
      The "amd-ssbd" flag should be used in preference to "virt-ssbd", if it
      is available, since it provides improved performance. For virtual
      machine configuration, both should be exposed when available, to allow
      for maximal guest OS compatibility as not all guests yet support both.
      
      If future processes are not vulnerable to the flaw, this will be
      indicated by the existance of CPUID Function 8000_0008, EBX[26]=1,
      to which QEMU has given the name "amd-no-ssb".
      
      See also 124441_AMD64_SpeculativeStoreBypassDisable_Whitepaper_final.pdf
      from:
      
        https://bugzilla.kernel.org/show_bug.cgi?id=199889
      
      Note that neither amd-ssbd or amd-no-ssb will be reported by the kernel
      in /proc/cpuinfo. It knows about these CPUID bits and does the right thing,
      but doesn't report their existance as distinct flags in /proc/cpuinfo.
      Signed-off-by: NDaniel P. Berrangé <berrange@redhat.com>
      2625722c
  14. 28 5月, 2018 1 次提交