Skip to content
Snippets Groups Projects
  1. Sep 10, 2021
  2. Sep 07, 2021
  3. Sep 06, 2021
    • Michael Tokarev's avatar
      qemu-sockets: fix unix socket path copy (again) · 118d527f
      Michael Tokarev authored
      Commit 4cfd970e added an
      assert which ensures the path within an address of a unix
      socket returned from the kernel is at least one byte and
      does not exceed sun_path buffer. Both of this constraints
      are wrong:
      
      A unix socket can be unnamed, in this case the path is
      completely empty (not even \0)
      
      And some implementations (notable linux) can add extra
      trailing byte (\0) _after_ the sun_path buffer if we
      passed buffer larger than it (and we do).
      
      So remove the assertion (since it causes real-life breakage)
      but at the same time fix the usage of sun_path. Namely,
      we should not access sun_path[0] if kernel did not return
      it at all (this is the case for unnamed sockets),
      and use the returned salen when copyig actual path as an
      upper constraint for the amount of bytes to copy - this
      will ensure we wont exceed the information provided by
      the kernel, regardless whenever there is a trailing \0
      or not. This also helps with unnamed sockets.
      
      Note the case of abstract socket, the sun_path is actually
      a blob and can contain \0 characters, - it should not be
      passed to g_strndup and the like, it should be accessed by
      memcpy-like functions.
      
      Fixes: 4cfd970e
      Fixes: http://bugs.debian.org/993145
      
      
      Signed-off-by: default avatarMichael Tokarev <mjt@tls.msk.ru>
      Reviewed-by: default avatarDaniel P. Berrangé <berrange@redhat.com>
      Reviewed-by: default avatarMarc-André Lureau <marcandre.lureau@redhat.com>
      CC: qemu-stable@nongnu.org
      118d527f
    • Peter Maydell's avatar
      Merge remote-tracking branch 'remotes/thuth-gitlab/tags/pull-request-2021-09-06' into staging · 935efca6
      Peter Maydell authored
      
      * Add definitions of terms for CI/testing
      * Fix g_setenv problem discovered by Coverity
      * Gitlab CI improvements
      * Build system improvements (configure script + meson.build)
      * Removal of the show-fixed-bugs.sh script
      * Clean up of the sdl and curses options
      
      # gpg: Signature made Mon 06 Sep 2021 10:51:49 BST
      # gpg:                using RSA key 27B88847EEE0250118F3EAB92ED9D774FE702DB5
      # gpg:                issuer "thuth@redhat.com"
      # gpg: Good signature from "Thomas Huth <th.huth@gmx.de>" [full]
      # gpg:                 aka "Thomas Huth <thuth@redhat.com>" [full]
      # gpg:                 aka "Thomas Huth <huth@tuxfamily.org>" [full]
      # gpg:                 aka "Thomas Huth <th.huth@posteo.de>" [unknown]
      # Primary key fingerprint: 27B8 8847 EEE0 2501 18F3  EAB9 2ED9 D774 FE70 2DB5
      
      * remotes/thuth-gitlab/tags/pull-request-2021-09-06:
        softmmu/vl: Deprecate the -sdl and -curses option
        softmmu/vl: Deprecate the old grab options
        softmmu/vl: Add a "grab-mod" parameter to the -display sdl option
        scripts: Remove the "show-fixed-bugs.sh" file
        configure / meson: Move the GBM handling to meson.build
        meson.build: Don't use internal libfdt if the user requested the system libfdt
        meson.build: Fix the check for a usable libfdt
        gitlab-ci: Don't try to use the system libfdt in the debian job
        libqtest: check for g_setenv() failure
        docs: add definitions of terms for CI/testing
      
      Signed-off-by: default avatarPeter Maydell <peter.maydell@linaro.org>
      935efca6
    • Thomas Huth's avatar
      softmmu/vl: Deprecate the -sdl and -curses option · 6695e4c0
      Thomas Huth authored
      
      It's not that much complicated to type "-display sdl" or "-display curses",
      so we should not clutter our main option name space with such simple
      wrapper options and rather present the users with a concise interface
      instead. Thus let's deprecate the "-sdl" and "-curses" wrapper options now.
      
      Message-Id: <20210825092023.81396-4-thuth@redhat.com>
      Reviewed-by: default avatarGerd Hoffmann <kraxel@redhat.com>
      Acked-by: default avatarPeter Krempa <pkrempa@redhat.com>
      Signed-off-by: default avatarThomas Huth <thuth@redhat.com>
      6695e4c0
    • Thomas Huth's avatar
      softmmu/vl: Deprecate the old grab options · d46156fd
      Thomas Huth authored
      
      The alt_grab and ctrl_grab parameter of the -display sdl option prevent
      the QAPIfication of the "sdl" part of the -display option, so we should
      eventually remove them. And since this feature is also rather niche anyway,
      we should not clutter the top-level option list with these, so let's
      also deprecate the "-alt-grab" and the "-ctrl-grab" options while we're
      at it.
      
      Once the deprecation period of "alt_grab" and "ctrl_grab" is over, we
      then can finally switch the -display sdl option to use QAPI internally,
      too.
      
      Message-Id: <20210825092023.81396-3-thuth@redhat.com>
      Reviewed-by: default avatarGerd Hoffmann <kraxel@redhat.com>
      Acked-by: default avatarPeter Krempa <pkrempa@redhat.com>
      Signed-off-by: default avatarThomas Huth <thuth@redhat.com>
      d46156fd
    • Thomas Huth's avatar
      softmmu/vl: Add a "grab-mod" parameter to the -display sdl option · 8e8e844b
      Thomas Huth authored
      
      The -display sdl option is not using QAPI internally yet, and uses hand-
      crafted parsing instead (see parse_display() in vl.c), which is quite
      ugly, since most of the other code is using the QAPIfied DisplayOption
      already. Unfortunately, the "alt_grab" and "ctrl_grab" use underscores in
      their names which has recently been forbidden in new QAPI code, so
      a straight conversion is not possible. While we could add some exceptions
      to the QAPI schema parser for this, the way these parameters have been
      designed was maybe a bad idea anyway: First, it's not possible to enable
      both parameters at the same time, thus instead of two boolean parameters
      it would be better to have only one multi-choice parameter instead.
      Second, the naming is also somewhat unfortunate since the "alt_grab"
      parameter is not about the ALT key, but rather about the left SHIFT key
      that has to be used additionally when the parameter is enabled.
      
      So instead of trying to QAPIfy "alt_grab" and "ctrl_grab", let's rather
      introduce an alternative to these parameters instead, a new parameter
      called "grab-mod" which can either be set to "lshift-lctrl-lalt" or to
      "rctrl". In case we ever want to support additional modes later, we can
      then also simply extend the list of supported strings here.
      
      Message-Id: <20210825092023.81396-2-thuth@redhat.com>
      Reviewed-by: default avatarGerd Hoffmann <kraxel@redhat.com>
      Signed-off-by: default avatarThomas Huth <thuth@redhat.com>
      8e8e844b
    • Thomas Huth's avatar
      scripts: Remove the "show-fixed-bugs.sh" file · bf6a6185
      Thomas Huth authored
      
      Since we are not using Launchpad anymore, there is no more need for
      this script.
      
      Message-Id: <20210825142143.142037-1-thuth@redhat.com>
      Reviewed-by: default avatarPhilippe Mathieu-Daudé <philmd@redhat.com>
      Reviewed-by: default avatarLaurent Vivier <laurent@vivier.eu>
      Signed-off-by: default avatarThomas Huth <thuth@redhat.com>
      bf6a6185
    • Thomas Huth's avatar
      configure / meson: Move the GBM handling to meson.build · 8bc5184d
      Thomas Huth authored
      
      The GBM library detection does not need to be in the configure script,
      since it does not have any user-facing options (there are no
      --enable-gbm or --disable-gbm switches). Let's move it to meson.build
      instead, so we don't have to clutter config-host.mak with the related
      switches.
      
      Additionally, only check for GBM if it is really required, i.e. if we
      either compile with OpenGL or with virglrenderer support.
      
      Message-Id: <20210714085045.797168-1-thuth@redhat.com>
      Signed-off-by: default avatarThomas Huth <thuth@redhat.com>
      8bc5184d
    • Thomas Huth's avatar
      meson.build: Don't use internal libfdt if the user requested the system libfdt · 6c22853c
      Thomas Huth authored
      
      If the users ran configure with --enable-libfdt=system, they likely did
      that on purpose. We should not silently fall back to the internal libfdt
      if the system libfdt is not usable, but report the problem with a proper
      message instead.
      
      Message-Id: <20210827120901.150276-3-thuth@redhat.com>
      Reviewed-by: default avatarPhilippe Mathieu-Daudé <philmd@redhat.com>
      Reviewed-by: default avatarMarc-André Lureau <marcandre.lureau@redhat.com>
      Signed-off-by: default avatarThomas Huth <thuth@redhat.com>
      6c22853c
    • Thomas Huth's avatar
      meson.build: Fix the check for a usable libfdt · 87daf898
      Thomas Huth authored
      The check for libfdt currently has a flaw: If there is a system libfdt, the
      meson.build code initialized the fdt variable with fdt = cc.find_library(...).
      However, if this libfdt is too old and there is no internal dtc module
      available, it continues with "fdt" pointing to the old and unusable version.
      The check later in the file that tries to detect whether libfdt is necessary
      then fails to trigger:
      
       if not fdt.found() and fdt_required.length() > 0
        error('fdt not available but required by targets ' + ', '.join(fdt_required))
       endif
      
      The build fails then during compilation instead, which is of course bad
      since this is quite confusing and already wasted quite some time of the user.
      Thus if libfdt is not usable, we should unset the "fdt" variable immediately
      again, so that the build already fails during the configuration phase.
      
      Resolves: https://gitlab.com/qemu-project/qemu/-/issues/255
      
      
      Message-Id: <20210827120901.150276-2-thuth@redhat.com>
      Reviewed-by: default avatarMarc-André Lureau <marcandre.lureau@redhat.com>
      Signed-off-by: default avatarThomas Huth <thuth@redhat.com>
      87daf898
    • Thomas Huth's avatar
      gitlab-ci: Don't try to use the system libfdt in the debian job · 2ffd4d81
      Thomas Huth authored
      
      libfdt in Debian is too old to be usable for QEMU. So far we were
      silently falling back to the internal dtc submodule, but since
      this is wrong, let's remove the --enable-fdt=system switch here now.
      
      Message-Id: <20210827151718.178988-1-thuth@redhat.com>
      Reviewed-by: default avatarDaniel P. Berrangé <berrange@redhat.com>
      Acked-by: default avatarPhilippe Mathieu-Daudé <philmd@redhat.com>
      Signed-off-by: default avatarThomas Huth <thuth@redhat.com>
      2ffd4d81
    • Peter Maydell's avatar
      libqtest: check for g_setenv() failure · aca68d95
      Peter Maydell authored
      
      g_setenv() can fail; check for it when starting a QEMU process
      when we set the QEMU_AUDIO_DRV environment variable.
      
      Because this happens after fork() reporting an exact message
      via printf() is a bad idea; just exit(1), as we already do
      for the case of execlp() failure.
      
      Fixes: Coverity CID 1460117
      Signed-off-by: default avatarPeter Maydell <peter.maydell@linaro.org>
      Reviewed-by: default avatarPhilippe Mathieu-Daudé <philmd@redhat.com>
      Message-Id: <20210820163750.9106-1-peter.maydell@linaro.org>
      Signed-off-by: default avatarThomas Huth <thuth@redhat.com>
      aca68d95
    • Willian Rampazzo's avatar
      docs: add definitions of terms for CI/testing · 1ea47ede
      Willian Rampazzo authored
      
      To understand the current state of QEMU CI/testing and have a base to
      discuss the plans for the future, it is important to define some usual
      terms. This patch defines the terms for "Automated tests", "Unit
      testing", "Functional testing", "System testing", "Flaky tests",
      "Gating", and "Continuous Integration".
      
      Signed-off-by: default avatarWillian Rampazzo <willianr@redhat.com>
      Reviewed-by: default avatarPhilippe Mathieu-Daudé <philmd@redhat.com>
      Message-Id: <20210831152939.97570-2-willianr@redhat.com>
      Signed-off-by: default avatarThomas Huth <thuth@redhat.com>
      1ea47ede
  4. Sep 05, 2021
    • Peter Maydell's avatar
      Merge remote-tracking branch 'remotes/mst/tags/for_upstream' into staging · 88afdc92
      Peter Maydell authored
      
      pc,pci,virtio: fixes, cleanups
      
      Fixes, cleanups all over the place.
      
      Signed-off-by: default avatarMichael S. Tsirkin <mst@redhat.com>
      
      # gpg: Signature made Sat 04 Sep 2021 22:34:10 BST
      # gpg:                using RSA key 5D09FD0871C8F85B94CA8A0D281F0DB8D28D5469
      # gpg:                issuer "mst@redhat.com"
      # gpg: Good signature from "Michael S. Tsirkin <mst@kernel.org>" [full]
      # gpg:                 aka "Michael S. Tsirkin <mst@redhat.com>" [full]
      # Primary key fingerprint: 0270 606B 6F3C DF3D 0B17  0970 C350 3912 AFBE 8E67
      #      Subkey fingerprint: 5D09 FD08 71C8 F85B 94CA  8A0D 281F 0DB8 D28D 5469
      
      * remotes/mst/tags/for_upstream: (35 commits)
        vhost-vdpa: remove the unncessary queue_index assignment
        vhost-vdpa: fix the wrong assertion in vhost_vdpa_init()
        vhost-vdpa: tweak the error label in vhost_vdpa_add()
        vhost-vdpa: fix leaking of vhost_net in vhost_vdpa_add()
        vhost-vdpa: don't cleanup twice in vhost_vdpa_add()
        vhost-vdpa: remove the unnecessary check in vhost_vdpa_add()
        vhost_net: do not assume nvqs is always 2
        vhost: use unsigned int for nvqs
        vhost_net: remove the meaningless assignment in vhost_net_start_one()
        vhost-vdpa: correctly return err in vhost_vdpa_set_backend_cap()
        vhost-vdpa: remove unused variable "acked_features"
        tests/vhost-user-bridge.c: Fix typo in help message
        tests/vhost-user-bridge.c: Sanity check socket path length
        hw/virtio: Add flatview update in vhost_user_cleanup()
        hw/virtio: Remove NULL check in virtio_free_region_cache()
        hw/virtio: Document virtio_queue_packed_empty_rcu is called within RCU
        MAINTAINERS: Added myself as a reviewer for acpi/smbios subsystem
        hw/acpi: use existing references to pci device struct within functions
        hw/pci: remove all references to find_i440fx function
        hw/i386/acpi-build: Get NUMA information from struct NumaState
        ...
      
      Signed-off-by: default avatarPeter Maydell <peter.maydell@linaro.org>
      88afdc92
  5. Sep 04, 2021
Loading