Skip to content
Snippets Groups Projects
  1. Apr 20, 2022
    • Alex Bennée's avatar
      docs/devel: add some notes on the binfmt-image-debian targets · 396408ee
      Alex Bennée authored
      
      We document some of this on the wiki but lets move it into our
      official developer notes documentation.
      
      Signed-off-by: default avatarAlex Bennée <alex.bennee@linaro.org>
      Cc: Paolo Bonzini <pbonzini@redhat.com>
      Reviewed-by: default avatarRichard Henderson <richard.henderson@linaro.org>
      Message-Id: <20220419091020.3008144-3-alex.bennee@linaro.org>
      396408ee
    • Alex Bennée's avatar
      tests/avocado: update aarch64_virt test to exercise -cpu max · 11593544
      Alex Bennée authored
      
      The Fedora 29 kernel is quite old and importantly fails when running
      in LPA2 scenarios. As it's not really exercising much of the CPU space
      replace it with a custom 5.16.12 kernel with all the architecture
      options turned on. There is a minimal buildroot initramfs included in
      the kernel which has a few tools for stress testing the memory
      subsystem. The userspace also targets the Neoverse N1 processor so
      would fail with a v8.0 cpu like cortex-a53.
      
      While we are at it move the test into its own file so it can have an
      assigned maintainer.
      
      Signed-off-by: default avatarAlex Bennée <alex.bennee@linaro.org>
      Acked-by: default avatarRichard Henderson <richard.henderson@linaro.org>
      Tested-by: default avatarRichard Henderson <richard.henderson@linaro.org>
      Message-Id: <20220419091020.3008144-2-alex.bennee@linaro.org>
      11593544
    • Richard Henderson's avatar
      Merge tag 'for-upstream' of https://gitlab.com/bonzini/qemu into staging · 1be5a765
      Richard Henderson authored
      * Add cpu0-id to query-sev-capabilities
      * whpx support for breakpoints and stepping
      * initial support for Hyper-V Synthetic Debugging
      * use monotonic clock for QemuCond and QemuSemaphore
      * Remove qemu-common.h include from most units and lots of other clenaups
      * do not include headers for all virtio devices in virtio-ccw.h
      
      # -----BEGIN PGP SIGNATURE-----
      #
      # iQFIBAABCAAyFiEE8TM4V0tmI4mGbHaCv/vSX3jHroMFAmJXCQAUHHBib256aW5p
      # QHJlZGhhdC5jb20ACgkQv/vSX3jHroNT6wf+NHDJUEdDiwaVGVTGXgHuiaycsymi
      # FpNPiw/+XxSGN5xF3fkUGgqaDrcwIYwVfnXlghKSz8kp1cP3cjxa5CzNMLGTp5je
      # N6BxFbD7yC6dhagGm3mj32jlsptv3M38OHqKc3t+RaUAotP5RF2VdCyfUBLG6vU0
      # aMzvMfMtB5aG0D8Fr5EV63t1JMTceFU0YxsG73UCFs2Yx4Z0cGBbNxMbHweRhd1q
      # tPeVDS46MFPM3/2cGGHpeeqxkoCTU7A9j1VuNQI3k+Kg+6W5YVxiK/UP7bw77E/a
      # yAHsmIVTNro8ajMBch73weuHtGtdfFLvCKc6QX6aVjzK4dF1voQ01E7gPQ==
      # =rMle
      # -----END PGP SIGNATURE-----
      # gpg: Signature made Wed 13 Apr 2022 10:31:44 AM PDT
      # gpg:                using RSA key F13338574B662389866C7682BFFBD25F78C7AE83
      # gpg:                issuer "pbonzini@redhat.com"
      # gpg: Good signature from "Paolo Bonzini <bonzini@gnu.org>" [undefined]
      # gpg:                 aka "Paolo Bonzini <pbonzini@redhat.com>" [undefined]
      # gpg: WARNING: This key is not certified with a trusted signature!
      # gpg:          There is no indication that the signature belongs to the owner.
      # Primary key fingerprint: 46F5 9FBD 57D6 12E7 BFD4  E2F7 7E15 100C CD36 69B1
      #      Subkey fingerprint: F133 3857 4B66 2389 866C  7682 BFFB D25F 78C7 AE83
      
      * tag 'for-upstream' of https://gitlab.com/bonzini/qemu
      
      : (53 commits)
        target/i386: Remove unused XMMReg, YMMReg types and CPUState fields
        target/i386: do not access beyond the low 128 bits of SSE registers
        virtio-ccw: do not include headers for all virtio devices
        virtio-ccw: move device type declarations to .c files
        virtio-ccw: move vhost_ccw_scsi to a separate file
        s390x: follow qdev tree to detect SCSI device on a CCW bus
        hw: hyperv: Initial commit for Synthetic Debugging device
        hyperv: Add support to process syndbg commands
        hyperv: Add definitions for syndbg
        hyperv: SControl is optional to enable SynIc
        thread-posix: optimize qemu_sem_timedwait with zero timeout
        thread-posix: implement Semaphore with QemuCond and QemuMutex
        thread-posix: use monotonic clock for QemuCond and QemuSemaphore
        thread-posix: remove the posix semaphore support
        whpx: Added support for breakpoints and stepping
        build-sys: simplify AF_VSOCK check
        build-sys: drop ntddscsi.h check
        Remove qemu-common.h include from most units
        qga: remove explicit environ argument from exec/spawn
        Move fcntl_setfl() to oslib-posix
        ...
      
      Signed-off-by: default avatarRichard Henderson <richard.henderson@linaro.org>
      1be5a765
    • Richard Henderson's avatar
      3202995c
  2. Apr 19, 2022
  3. Apr 13, 2022
    • Peter Maydell's avatar
      target/i386: Remove unused XMMReg, YMMReg types and CPUState fields · c9e28ae7
      Peter Maydell authored
      
      In commit b7711471 in 2014 we refactored the handling of the x86
      vector registers so that instead of separate structs XMMReg, YMMReg
      and ZMMReg for representing the 16-byte, 32-byte and 64-byte width
      vector registers and multiple fields in the CPU state, we have a
      single type (XMMReg, later renamed to ZMMReg) and a single struct
      field (xmm_regs).  However, in 2017 in commit c97d6d2c some of
      the old struct types and CPU state fields got added back, when we
      merged in the hvf support (which had developed in a separate fork
      that had presumably not had the refactoring of b7711471), as part
      of code handling xsave.  Commit f585195e then almost immediately
      dropped that xsave code again in favour of sharing the xsave handling
      with KVM, but forgot to remove the now unused CPU state fields and
      struct types.
      
      Delete the unused types and CPUState fields.
      
      Signed-off-by: default avatarPeter Maydell <peter.maydell@linaro.org>
      Message-Id: <20220412110047.1497190-1-peter.maydell@linaro.org>
      Signed-off-by: default avatarPaolo Bonzini <pbonzini@redhat.com>
      c9e28ae7
    • Paolo Bonzini's avatar
      target/i386: do not access beyond the low 128 bits of SSE registers · d22697dd
      Paolo Bonzini authored
      
      The i386 target consolidates all vector registers so that instead of
      XMMReg, YMMReg and ZMMReg structs there is a single ZMMReg that can
      fit all of SSE, AVX and AVX512.
      
      When TCG copies data from and to the SSE registers, it uses the
      full 64-byte width.  This is not a correctness issue because TCG
      never lets guest code see beyond the first 128 bits of the ZMM
      registers, however it causes uninitialized stack memory to
      make it to the CPU's migration stream.
      
      Fix it by only copying the low 16 bytes of the ZMMReg union into
      the destination register.
      
      Reviewed-by: default avatarPeter Maydell <peter.maydell@linaro.org>
      Signed-off-by: default avatarPaolo Bonzini <pbonzini@redhat.com>
      d22697dd
  4. Apr 12, 2022
  5. Apr 08, 2022
    • Wentao Liang's avatar
      virtio-iommu: use-after-free fix · 4bf58c72
      Wentao Liang authored
      
      A potential Use-after-free was reported in virtio_iommu_handle_command
      when using virtio-iommu:
      
      > I find a potential Use-after-free in QEMU 6.2.0, which is in
      > virtio_iommu_handle_command() (./hw/virtio/virtio-iommu.c).
      >
      >
      > Specifically, in the loop body, the variable 'buf' allocated at line 639 can be
      > freed by g_free() at line 659. However, if the execution path enters the loop
      > body again and the if branch takes true at line 616, the control will directly
      > jump to 'out' at line 651. At this time, 'buf' is a freed pointer, which is not
      > assigned with an allocated memory but used at line 653. As a result, a UAF bug
      > is triggered.
      >
      >
      >
      > 599     for (;;) {
      > ...
      > 615         sz = iov_to_buf(iov, iov_cnt, 0, &head, sizeof(head));
      > 616         if (unlikely(sz != sizeof(head))) {
      > 617             tail.status = VIRTIO_IOMMU_S_DEVERR;
      > 618             goto out;
      > 619         }
      > ...
      > 639             buf = g_malloc0(output_size);
      > ...
      > 651 out:
      > 652         sz = iov_from_buf(elem->in_sg, elem->in_num, 0,
      > 653                           buf ? buf : &tail, output_size);
      > ...
      > 659         g_free(buf);
      >
      > We can fix it by set ‘buf‘ to NULL after freeing it:
      >
      >
      > 651 out:
      > 652         sz = iov_from_buf(elem->in_sg, elem->in_num, 0,
      > 653                           buf ? buf : &tail, output_size);
      > ...
      > 659         g_free(buf);
      > +++ buf = NULL;
      > 660     }
      
      Fix as suggested by the reporter.
      
      Signed-off-by: default avatarWentao Liang <Wentao_Liang_g@163.com>
      Signed-off-by: default avatarMichael S. Tsirkin <mst@redhat.com>
      Message-id: 20220407095047.50371-1-mst@redhat.com
      Message-ID: <20220406040445-mutt-send-email-mst@kernel.org>
      Signed-off-by: default avatarPeter Maydell <peter.maydell@linaro.org>
      4bf58c72
    • Peter Maydell's avatar
      Merge tag 'fixes-20220408-pull-request' of git://git.kraxel.org/qemu into staging · dde8689d
      Peter Maydell authored
      two cursor/qxl related security fixes.
      
      # gpg: Signature made Fri 08 Apr 2022 05:37:16 BST
      # gpg:                using RSA key A0328CFFB93A17A79901FE7D4CB6D8EED3E87138
      # gpg: Good signature from "Gerd Hoffmann (work) <kraxel@redhat.com>" [full]
      # gpg:                 aka "Gerd Hoffmann <gerd@kraxel.org>" [full]
      # gpg:                 aka "Gerd Hoffmann (private) <kraxel@gmail.com>" [full]
      # Primary key fingerprint: A032 8CFF B93A 17A7 9901  FE7D 4CB6 D8EE D3E8 7138
      
      * tag 'fixes-20220408-pull-request' of git://git.kraxel.org/qemu
      
      :
        ui/cursor: fix integer overflow in cursor_alloc (CVE-2021-4206)
        display/qxl-render: fix race condition in qxl_cursor (CVE-2021-4207)
      
      Signed-off-by: default avatarPeter Maydell <peter.maydell@linaro.org>
      dde8689d
  6. Apr 07, 2022
  7. Apr 06, 2022
Loading