Skip to content
Snippets Groups Projects
  1. Nov 03, 2020
    • Marc Hartmayer's avatar
      meson: vhost-user-gpu/virtiofsd: use absolute path · cd57deab
      Marc Hartmayer authored
      The option `libexecdir` is relative to `prefix` (see
      https://mesonbuild.com/Builtin-options.html
      
      ), so we have to be aware
      of this when creating 50-qemu-gpu.json and
      50-qemu-virtiofsd.json. Otherwise, tools like libvirt will not be able
      to find the executable.
      
      Fixes: 16bf7a33 ("configure: move directory options from config-host.mak to meson")
      Signed-off-by: default avatarMarc Hartmayer <mhartmay@linux.ibm.com>
      Message-Id: <20201103112333.24734-1-mhartmay@linux.ibm.com>
      Signed-off-by: default avatarPaolo Bonzini <pbonzini@redhat.com>
      cd57deab
    • Paolo Bonzini's avatar
      meson: use b_staticpic=false for meson >=0.56.0 · a5cb7c5a
      Paolo Bonzini authored
      
      Meson 0.56.0 correctly builds non-PIC static libraries with -fPIE if
      b_pie=true.  We do not have to pass b_staticpic=true if PIE is requested
      if Meson is new-enough, which improves performance.
      
      Signed-off-by: default avatarPaolo Bonzini <pbonzini@redhat.com>
      a5cb7c5a
    • Alexander Bulekov's avatar
      qtest: add a reproducer for LP#1878642 · fd250172
      Alexander Bulekov authored
      https://bugs.launchpad.net/qemu/+bug/1878642
      
      
      
      Suggested-by: default avatarPaolo Bonzini <pbonzini@redhat.com>
      Signed-off-by: default avatarAlexander Bulekov <alxndr@bu.edu>
      Message-Id: <20201102163336.115444-1-alxndr@bu.edu>
      Signed-off-by: default avatarPaolo Bonzini <pbonzini@redhat.com>
      fd250172
    • Philippe Mathieu-Daudé's avatar
      hw/isa/lpc_ich9: Ignore reserved/invalid SCI IRQ · 4177b062
      Philippe Mathieu-Daudé authored
      
      libFuzzer triggered the following assertion:
      
        cat << EOF | qemu-system-i386 -M pc-q35-5.0 \
          -nographic -monitor none -serial none \
          -qtest stdio -d guest_errors -trace pci\*
        outl 0xcf8 0x8400f841
        outl 0xcfc 0xebed205d
        outl 0x5d02 0xedf82049
        EOF
        pci_cfg_write ICH9-LPC 31:0 @0x41 <- 0xebed205d
        hw/pci/pci.c:268: int pci_bus_get_irq_level(PCIBus *, int): Assertion `irq_num < bus->nirq' failed.
      
      This is because ich9_lpc_sci_irq() returns -1 for reserved
      (illegal) values, but ich9_lpc_pmbase_sci_update() considers
      it valid and store it in a 8-bit unsigned type. Then the 255
      value is used as GSI IRQ, resulting in a PIRQ value of 247,
      more than ICH9_LPC_NB_PIRQS (8).
      
      Fix by simply ignoring the invalid access (and reporting it):
      
        pci_cfg_write ICH9-LPC 31:0 @0x41 <- 0xebed205d
        ICH9 LPC: SCI IRQ SEL #3 is reserved
        pci_cfg_read mch 00:0 @0x0 -> 0x8086
        pci_cfg_read mch 00:0 @0x0 -> 0x29c08086
        ...
      
      Cc: qemu-stable@nongnu.org
      Reported-by: default avatarAlexander Bulekov <alxndr@bu.edu>
      Fixes: 8f242cb7 ("ich9: implement SCI_IRQ_SEL register")
      BugLink: https://bugs.launchpad.net/qemu/+bug/1878642
      
      
      Signed-off-by: default avatarPhilippe Mathieu-Daudé <f4bug@amsat.org>
      Message-Id: <20200717151705.18611-1-f4bug@amsat.org>
      Signed-off-by: default avatarPaolo Bonzini <pbonzini@redhat.com>
      4177b062
    • Alexander Bulekov's avatar
      scripts/oss-fuzz: rename bin/qemu-fuzz-i386 · f8b8f374
      Alexander Bulekov authored
      OSS-Fuzz changed the way it scans for fuzzers in $DEST_DIR. The new code
      also scans subdirectories for fuzzers. This means that OSS-Fuzz is
      considering bin/qemu-fuzz-i386 as an independent fuzzer (it is not - it
      requires a --fuzz-target argument). This has led to coverage-build
      failures and false crash reports. To work around this, we take advantage
      of OSS-Fuzz' filename extension check - OSS-Fuzz will not run anything
      that has an extension that is not ".exe":
      https://github.com/google/oss-fuzz/blob/master/infra/utils.py#L115
      
      
      
      Reported-by: OSS-Fuzz (Issue 26725)
      Reported-by: OSS-Fuzz (Issue 26679)
      Signed-off-by: default avatarAlexander Bulekov <alxndr@bu.edu>
      Message-Id: <20201101212245.185819-1-alxndr@bu.edu>
      Signed-off-by: default avatarPaolo Bonzini <pbonzini@redhat.com>
      f8b8f374
    • Philippe Mathieu-Daudé's avatar
      exec: Remove dead code (CID 1432876) · 37921851
      Philippe Mathieu-Daudé authored
      
      We removed the global_locking field in commit 41744954,
      leaving dead code around the 'unlocked' variable. Remove it
      to fix the DEADCODE issue reported by Coverity (CID 1432876).
      
      Fixes: 41744954 ("exec: Remove MemoryRegion::global_locking field")
      Signed-off-by: default avatarPhilippe Mathieu-Daudé <philmd@redhat.com>
      Message-Id: <20201030153752.1557776-1-philmd@redhat.com>
      Signed-off-by: default avatarPaolo Bonzini <pbonzini@redhat.com>
      37921851
    • Paolo Bonzini's avatar
      docs: expand sourceset documentation · 2eba427e
      Paolo Bonzini authored
      
      Expand on the usage of sourcesets and describe the CONFIG_ALL
      symbol.
      
      Signed-off-by: default avatarPaolo Bonzini <pbonzini@redhat.com>
      2eba427e
    • Paolo Bonzini's avatar
      cutils: replace strdup with g_strdup · 090afdc5
      Paolo Bonzini authored
      
      Memory returned by get_relocated_path must be freed with
      free or g_free depending on the path that the function
      took; Coverity takes exception to this practice.  The
      fix lets caller use g_free as is standard in QEMU.
      
      While at it, mention the requirements on the caller in
      the doc comment.
      
      Suggested-by: default avatarPeter Maydell <peter.maydell@linaro.org>
      Signed-off-by: default avatarPaolo Bonzini <pbonzini@redhat.com>
      090afdc5
    • Peter Maydell's avatar
      Merge remote-tracking branch 'remotes/mdroth/tags/qga-pull-2020-10-27-v3-tag' into staging · 83851c7c
      Peter Maydell authored
      
      qemu-ga patch queue for soft-freeze
      
      * add guest-get-disks for w32/linux
      * add guest-{add,remove,get}-authorized-keys
      * fix API violations and schema documentation inconsistencies with
        recently-added guest-get-devices
      
      v3:
      - fix checkpatch errors regarding disallowed usages of g_assert*
        macros and other warnings
      
      v2:
      - fix BSD build error due to missing stub for guest_get_disks
      - fix clang build error on linux due to unused variable
      - disable qga-ssh-test for now due to a memory leak within GLib when
        G_TEST_OPTION_ISOLATE_DIRS is passed to g_test_init() since it
        break Gitlab CI build-oss-fuzz test
      - rebased and re-tested on master
      
      # gpg: Signature made Tue 03 Nov 2020 02:30:50 GMT
      # gpg:                using RSA key CEACC9E15534EBABB82D3FA03353C9CEF108B584
      # gpg:                issuer "michael.roth@amd.com"
      # gpg: Good signature from "Michael Roth <flukshun@gmail.com>" [full]
      # gpg:                 aka "Michael Roth <mdroth@utexas.edu>" [full]
      # gpg:                 aka "Michael Roth <mdroth@linux.vnet.ibm.com>" [full]
      # Primary key fingerprint: CEAC C9E1 5534 EBAB B82D  3FA0 3353 C9CE F108 B584
      
      * remotes/mdroth/tags/qga-pull-2020-10-27-v3-tag:
        qga: add ssh-get-authorized-keys
        meson: minor simplification
        qga: add *reset argument to ssh-add-authorized-keys
        qga: add ssh-{add,remove}-authorized-keys
        glib-compat: add g_unix_get_passwd_entry_qemu()
        qga: add implementation of guest-get-disks for Windows
        qga: add implementation of guest-get-disks for Linux
        qga: add command guest-get-disks
        qga: Flatten simple union GuestDeviceId
        qga-win: Fix guest-get-devices error API violations
        qga: Use common time encoding for guest-get-devices 'driver-date'
        qga: Rename guest-get-devices return member 'address' to 'id'
      
      Signed-off-by: default avatarPeter Maydell <peter.maydell@linaro.org>
      83851c7c
    • Peter Maydell's avatar
      Merge remote-tracking branch 'remotes/pmaydell/tags/pull-target-arm-20201102' into staging · c7a7a877
      Peter Maydell authored
      
      target-arm queue:
       * target/arm: Fix Neon emulation bugs on big-endian hosts
       * target/arm: fix handling of HCR.FB
       * target/arm: fix LORID_EL1 access check
       * disas/capstone: Fix monitor disassembly of >32 bytes
       * hw/arm/smmuv3: Fix potential integer overflow (CID 1432363)
       * hw/arm/boot: fix SVE for EL3 direct kernel boot
       * hw/display/omap_lcdc: Fix potential NULL pointer dereference
       * hw/display/exynos4210_fimd: Fix potential NULL pointer dereference
       * target/arm: Get correct MMU index for other-security-state
       * configure: Test that gio libs from pkg-config work
       * hw/intc/arm_gicv3_cpuif: Make GIC maintenance interrupts work
       * docs: Fix building with Sphinx 3
       * tests/qtest/npcm7xx_rng-test: Disable randomness tests
      
      # gpg: Signature made Mon 02 Nov 2020 17:09:00 GMT
      # gpg:                using RSA key E1A5C593CD419DE28E8315CF3C2525ED14360CDE
      # gpg:                issuer "peter.maydell@linaro.org"
      # gpg: Good signature from "Peter Maydell <peter.maydell@linaro.org>" [ultimate]
      # gpg:                 aka "Peter Maydell <pmaydell@gmail.com>" [ultimate]
      # gpg:                 aka "Peter Maydell <pmaydell@chiark.greenend.org.uk>" [ultimate]
      # Primary key fingerprint: E1A5 C593 CD41 9DE2 8E83  15CF 3C25 25ED 1436 0CDE
      
      * remotes/pmaydell/tags/pull-target-arm-20201102: (26 commits)
        tests/qtest/npcm7xx_rng-test: Disable randomness tests
        qemu-option-trace.rst.inc: Don't use option:: markup
        scripts/kerneldoc: For Sphinx 3 use c:macro for macros with arguments
        hw/intc/arm_gicv3_cpuif: Make GIC maintenance interrupts work
        configure: Test that gio libs from pkg-config work
        target/arm: Get correct MMU index for other-security-state
        hw/display/exynos4210_fimd: Fix potential NULL pointer dereference
        hw/display/omap_lcdc: Fix potential NULL pointer dereference
        hw/arm/boot: fix SVE for EL3 direct kernel boot
        hw/arm/smmuv3: Fix potential integer overflow (CID 1432363)
        disas/capstone: Fix monitor disassembly of >32 bytes
        target/arm: fix LORID_EL1 access check
        target/arm: fix handling of HCR.FB
        target/arm: Fix VUDOT/VSDOT (scalar) on big-endian hosts
        target/arm: Fix float16 pairwise Neon ops on big-endian hosts
        target/arm: Improve do_prewiden_3d
        target/arm: Simplify do_long_3d and do_2scalar_long
        target/arm: Rename neon_load_reg64 to vfp_load_reg64
        target/arm: Add read/write_neon_element64
        target/arm: Rename neon_load_reg32 to vfp_load_reg32
        ...
      
      Signed-off-by: default avatarPeter Maydell <peter.maydell@linaro.org>
      c7a7a877
    • Marc-André Lureau's avatar
      qga: add ssh-get-authorized-keys · cad97c08
      Marc-André Lureau authored
      
      Signed-off-by: default avatarMarc-André Lureau <marcandre.lureau@redhat.com>
      *fix-up merge conflicts due to qga-ssh-test being disabled in earlier
       patch due to G_TEST_OPTION_ISOLATE_DIRS triggering build-oss-fuzz
       leak detector.
      *fix up style and disallowed g_assert* usage reported by checkpatch
      Signed-off-by: default avatarMichael Roth <michael.roth@amd.com>
      cad97c08
    • Marc-André Lureau's avatar
      2a127f96
    • Michael Roth's avatar
      qga: add *reset argument to ssh-add-authorized-keys · 0e3c9475
      Michael Roth authored
      
      I prefer 'reset' over 'clear', since 'clear' and keys may have some
      other relations or meaning.
      
      Signed-off-by: default avatarMarc-André Lureau <marcandre.lureau@redhat.com>
      *fix disallowed g_assert* usage reported by checkpatch
      Signed-off-by: default avatarMichael Roth <michael.roth@amd.com>
      0e3c9475
    • Marc-André Lureau's avatar
      qga: add ssh-{add,remove}-authorized-keys · 8d769ec7
      Marc-André Lureau authored
      Add new commands to add and remove SSH public keys from
      ~/.ssh/authorized_keys.
      
      I took a different approach for testing, including the unit tests right
      with the code. I wanted to overwrite the function to get the user
      details, I couldn't easily do that over QMP. Furthermore, I prefer
      having unit tests very close to the code, and unit files that are domain
      specific (commands-posix is too crowded already). FWIW, that
      coding/testing style is Rust-style (where tests can or should even be
      part of the documentation!).
      
      Fixes:
      https://bugzilla.redhat.com/show_bug.cgi?id=1885332
      
      
      
      Signed-off-by: default avatarMarc-André Lureau <marcandre.lureau@redhat.com>
      Reviewed-by: default avatarMichal Privoznik <mprivozn@redhat.com>
      Reviewed-by: default avatarDaniel P. Berrangé <berrange@redhat.com>
      *squashed in fix-ups for setting file ownership and use of QAPI
       conditionals for CONFIG_POSIX instead of stub definitions
      *disable qga-ssh-test for now due to G_TEST_OPTION_ISOLATE_DIRS
       triggering leak detector in build-oss-fuzz
      *fix disallowed g_assert* usage reported by checkpatch
      Signed-off-by: default avatarMichael Roth <michael.roth@amd.com>
      8d769ec7
    • Marc-André Lureau's avatar
      glib-compat: add g_unix_get_passwd_entry_qemu() · 6d593ab4
      Marc-André Lureau authored
      
      The glib function was introduced in 2.64. It's a safer version of
      getpwnam, and also simpler to use than getpwnam_r.
      
      Currently, it's only use by the next patch in qemu-ga, which doesn't
      (well well...) need the thread safety guarantees. Since the fallback
      version is still unsafe, I would rather keep the _qemu postfix, to make
      sure it's not being misused by mistake. When/if necessary, we can
      implement a safer fallback and drop the _qemu suffix.
      
      Signed-off-by: default avatarMarc-André Lureau <marcandre.lureau@redhat.com>
      Reviewed-by: default avatarMichal Privoznik <mprivozn@redhat.com>
      *fix checkpatch warnings about newlines before/after block comments
      Signed-off-by: default avatarMichael Roth <michael.roth@amd.com>
      6d593ab4
  2. Nov 02, 2020
Loading