Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: qemu/qemu
base: fae9449998e7
Choose a base ref
...
head repository: qemu/qemu
compare: 134253a4fe9a
Choose a head ref
  • 4 commits
  • 5 files changed
  • 4 contributors

Commits on May 26, 2023

  1. util/vfio-helpers: Use g_file_read_link()

    When _FORTIFY_SOURCE=2, glibc version is 2.35, and GCC version is
    12.1.0, the compiler complains as follows:
    
    In file included from /usr/include/features.h:490,
                     from /usr/include/bits/libc-header-start.h:33,
                     from /usr/include/stdint.h:26,
                     from /usr/lib/gcc/aarch64-unknown-linux-gnu/12.1.0/include/stdint.h:9,
                     from /home/alarm/q/var/qemu/include/qemu/osdep.h:94,
                     from ../util/vfio-helpers.c:13:
    In function 'readlink',
        inlined from 'sysfs_find_group_file' at ../util/vfio-helpers.c:116:9,
        inlined from 'qemu_vfio_init_pci' at ../util/vfio-helpers.c:326:18,
        inlined from 'qemu_vfio_open_pci' at ../util/vfio-helpers.c:517:9:
    /usr/include/bits/unistd.h:119:10: error: argument 2 is null but the corresponding size argument 3 value is 4095 [-Werror=nonnull]
      119 |   return __glibc_fortify (readlink, __len, sizeof (char),
          |          ^~~~~~~~~~~~~~~
    
    This error implies the allocated buffer can be NULL. Use
    g_file_read_link(), which allocates buffer automatically to avoid the
    error.
    
    Signed-off-by: Akihiko Odaki <akihiko.odaki@daynix.com>
    Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
    Reviewed-by: Cédric Le Goater <clg@redhat.com>
    Signed-off-by: Cédric Le Goater <clg@redhat.com>
    (cherry picked from commit dbdea0d)
    Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
    akihikodaki authored and Michael Tokarev committed May 26, 2023
    Copy the full SHA
    668aeea View commit details
    Browse the repository at this point in the history
  2. usb/ohci: Set pad to 0 after frame update

    When the OHCI controller's framenumber is incremented, HccaPad1 register
    should be set to zero (Ref OHCI Spec 4.4)
    
    ReactOS uses hccaPad1 to determine if the OHCI hardware is running,
    consequently it fails this check in current qemu master.
    
    Signed-off-by: Ryan Wendland <wendland@live.com.au>
    Resolves: https://gitlab.com/qemu-project/qemu/-/issues/1048
    Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
    (cherry picked from commit 6301460)
    Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
    bonzini authored and Michael Tokarev committed May 26, 2023
    Copy the full SHA
    9d62245 View commit details
    Browse the repository at this point in the history
  3. hw/scsi/lsi53c895a: Fix reentrancy issues in the LSI controller (CVE-…

    …2023-0330)
    
    We cannot use the generic reentrancy guard in the LSI code, so
    we have to manually prevent endless reentrancy here. The problematic
    lsi_execute_script() function has already a way to detect whether
    too many instructions have been executed - we just have to slightly
    change the logic here that it also takes into account if the function
    has been called too often in a reentrant way.
    
    The code in fuzz-lsi53c895a-test.c has been taken from an earlier
    patch by Mauro Matteo Cascella.
    
    Resolves: https://gitlab.com/qemu-project/qemu/-/issues/1563
    Message-Id: <20230522091011.1082574-1-thuth@redhat.com>
    Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
    Reviewed-by: Alexander Bulekov <alxndr@bu.edu>
    Signed-off-by: Thomas Huth <thuth@redhat.com>
    (cherry picked from commit b987718)
    Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
    huth authored and Michael Tokarev committed May 26, 2023
    Copy the full SHA
    e49884a View commit details
    Browse the repository at this point in the history
  4. machine: do not crash if default RAM backend name has been stolen

    QEMU aborts when default RAM backend should be used (i.e. no
    explicit '-machine memory-backend=' specified) but user
    has created an object which 'id' equals to default RAM backend
    name used by board.
    
     $QEMU -machine pc \
           -object memory-backend-ram,id=pc.ram,size=4294967296
    
     Actual results:
     QEMU 7.2.0 monitor - type 'help' for more information
     (qemu) Unexpected error in object_property_try_add() at ../qom/object.c:1239:
     qemu-kvm: attempt to add duplicate property 'pc.ram' to object (type 'container')
     Aborted (core dumped)
    
    Instead of abort, check for the conflicting 'id' and exit with
    an error, suggesting how to remedy the issue.
    
    Buglink: https://bugzilla.redhat.com/show_bug.cgi?id=2207886
    Signed-off-by: Igor Mammedov <imammedo@redhat.com>
    Message-Id: <20230522131717.3780533-1-imammedo@redhat.com>
    Tested-by: Thomas Huth <thuth@redhat.com>
    Reviewed-by: Thomas Huth <thuth@redhat.com>
    Reviewed-by: Shaoqin Huang <shahuang@redhat.com>
    Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
    Signed-off-by: Thomas Huth <thuth@redhat.com>
    (cherry picked from commit a37531f)
    Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
    Igor Mammedov authored and Michael Tokarev committed May 26, 2023
    Copy the full SHA
    134253a View commit details
    Browse the repository at this point in the history