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: a8fc5165aab0
Choose a base ref
...
head repository: qemu/qemu
compare: e53e2e2a1bfe
Choose a head ref
  • 10 commits
  • 8 files changed
  • 3 contributors

Commits on Aug 9, 2023

  1. qemu/osdep: Remove fallback for MAP_FIXED_NOREPLACE

    In order for our emulation of MAP_FIXED_NOREPLACE to succeed within
    linux-user target_mmap, we require a non-zero value.  This does not
    require host kernel support, merely the bit being defined.
    
    MAP_FIXED_NOREPLACE was added with glibc 2.28.  From repology.org:
    
                      Fedora 36: 2.35
              CentOS 8 (RHEL-8): 2.28
                      Debian 11: 2.31
             OpenSUSE Leap 15.4: 2.31
               Ubuntu LTS 20.04: 2.31
    
    Reported-by: Akihiko Odaki <akihiko.odaki@daynix.com>
    Reviewed-by: Akihiko Odaki <akihiko.odaki@daynix.com>
    Reviewed-by: Alex Bennée <alex.bennee@linaro.org>
    Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
    Message-Id: <20230808164418.69989-1-richard.henderson@linaro.org>
    rth7680 committed Aug 9, 2023
    Copy the full SHA
    c42e77a View commit details
    Browse the repository at this point in the history
  2. hw/nvme: fix null pointer access in directive receive

    nvme_directive_receive() does not check if an endurance group has been
    configured (set) prior to testing if flexible data placement is enabled
    or not.
    
    Fix this.
    
    Cc: qemu-stable@nongnu.org
    Resolves: https://gitlab.com/qemu-project/qemu/-/issues/1815
    Fixes: 73064ed ("hw/nvme: flexible data placement emulation")
    Reviewed-by: Jesper Wendel Devantier <j.devantier@samsung.com>
    Signed-off-by: Klaus Jensen <k.jensen@samsung.com>
    birkelund committed Aug 9, 2023
    Copy the full SHA
    6c8f845 View commit details
    Browse the repository at this point in the history
  3. hw/nvme: fix null pointer access in ruh update

    The Reclaim Unit Update operation in I/O Management Receive does not
    verify the presence of a configured endurance group prior to accessing
    it.
    
    Fix this.
    
    Cc: qemu-stable@nongnu.org
    Fixes: 73064ed ("hw/nvme: flexible data placement emulation")
    Reviewed-by: Jesper Wendel Devantier <j.devantier@samsung.com>
    Signed-off-by: Klaus Jensen <k.jensen@samsung.com>
    birkelund committed Aug 9, 2023
    Copy the full SHA
    3439ba9 View commit details
    Browse the repository at this point in the history
  4. linux-user: Split out do_mmap

    New function that rejects unsupported map types and flags.
    In 4b840f9 we should not have accepted MAP_SHARED_VALIDATE
    without actually validating the rest of the flags.
    
    Fixes: 4b840f9 ("linux-user: Populate more bits in mmap_flags_tbl")
    Reviewed-by: Alex Bennée <alex.bennee@linaro.org>
    Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
    rth7680 committed Aug 9, 2023
    Copy the full SHA
    9ab8d07 View commit details
    Browse the repository at this point in the history
  5. linux-user: Use ARRAY_SIZE with bitmask_transtbl

    Rather than using a zero tuple to end the table, use a macro
    to apply ARRAY_SIZE and pass that on to the convert functions.
    
    This fixes two bugs in which the conversion functions required
    that both the target and host masks be non-zero in order to
    continue, rather than require both target and host masks be
    zero in order to terminate.
    
    This affected mmap_flags_tbl when the host does not support
    all of the flags we wish to convert (e.g. MAP_UNINITIALIZED).
    Mapping these flags to zero is good enough, and matches how
    the kernel ignores bits that are unknown.
    
    Fixes: 4b840f9 ("linux-user: Populate more bits in mmap_flags_tbl")
    Reviewed-by: Alex Bennée <alex.bennee@linaro.org>
    Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
    rth7680 committed Aug 9, 2023
    Copy the full SHA
    a05cee9 View commit details
    Browse the repository at this point in the history
  6. tests/tcg: Disable filename test for info proc mappings

    This test fails when host page size != guest page size,
    because qemu may not be able to directly map the file.
    
    Fixes: a634148 ("tests/tcg: Add a test for info proc mappings")
    Acked-by: Ilya Leoshkevich <iii@linux.ibm.com>
    Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
    rth7680 committed Aug 9, 2023
    Copy the full SHA
    1b65895 View commit details
    Browse the repository at this point in the history
  7. util/interval-tree: Check root for null in interval_tree_iter_first

    Fix a crash in qemu-user when running
    
        cat /proc/self/maps
    
    in a chroot, where /proc isn't mounted.
    
    The problem was introduced by commit 3ce3dd8 ("util/selfmap:
    Rewrite using qemu/interval-tree.h") where in open_self_maps_1() the
    function read_self_maps() is called and which returns NULL if it can't
    read the hosts /proc/self/maps file. Afterwards that NULL is fed into
    interval_tree_iter_first() which doesn't check if the root node is NULL.
    
    Fix it by adding a check if root is NULL and return NULL in that case.
    
    Signed-off-by: Helge Deller <deller@gmx.de>
    Fixes: 3ce3dd8 ("util/selfmap: Rewrite using qemu/interval-tree.h")
    Message-Id: <ZNOsq6Z7t/eyIG/9@p100>
    Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
    Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
    hdeller authored and rth7680 committed Aug 9, 2023
    Copy the full SHA
    47d1e98 View commit details
    Browse the repository at this point in the history
  8. linux-user: Fix openat() emulation to correctly detect accesses to /proc

    In qemu we catch accesses to files like /proc/cpuinfo or /proc/net/route
    and return to the guest contents which would be visible on a real system
    (instead what the host would show).
    
    This patch fixes a bug, where for example the accesses
        cat /proc////cpuinfo
    or
        cd /proc && cat cpuinfo
    will not be recognized by qemu and where qemu will wrongly show
    the contents of the host's /proc/cpuinfo file.
    
    Signed-off-by: Helge Deller <deller@gmx.de>
    Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
    Message-Id: <20230803214450.647040-2-deller@gmx.de>
    Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
    Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
    hdeller authored and rth7680 committed Aug 9, 2023
    Copy the full SHA
    b800205 View commit details
    Browse the repository at this point in the history
  9. Merge tag 'nvme-fixes-pull-request' of https://gitlab.com/birkelund/qemu

     into staging
    
    hw/nvme: fixes
    
    # -----BEGIN PGP SIGNATURE-----
    #
    # iQEzBAABCgAdFiEEUigzqnXi3OaiR2bATeGvMW1PDekFAmTTlmcACgkQTeGvMW1P
    # DemjjggAnhEvaJ4fgS9rsvtxCwtzLNc405xMpNxh6rPaxa+sL3RXPIrW6vWG13+W
    # VcHw8DI8EV4DzAFP919ZmTUq9/boRbgxx84bStlILUPHWol8+eGYVVfT75wFKszx
    # d4Vi3nyPSGlrxieSrosARqimcUDtFtDGGAxjvEcKgzhkcU3a8DVYAOmx/hdlWJJQ
    # KSk4h/E1pKItFbvv+w9yszsbToeZN65oIy7kQtFgx0JOULyWvEYSVygotw/AruF3
    # FPQ0nrJuZ115w3cJWDszznVJ6+3EcWbD3luQc3zE1FOPp76EkAOkcnPh1XbBJrE2
    # 2BsCX/XnXcZT7BWSJbEzGXLsHjqsPg==
    # =Zy0+
    # -----END PGP SIGNATURE-----
    # gpg: Signature made Wed 09 Aug 2023 06:36:39 AM PDT
    # gpg:                using RSA key 522833AA75E2DCE6A24766C04DE1AF316D4F0DE9
    # gpg: Good signature from "Klaus Jensen <its@irrelevant.dk>" [unknown]
    # gpg:                 aka "Klaus Jensen <k.jensen@samsung.com>" [unknown]
    # 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: DDCA 4D9C 9EF9 31CC 3468  4272 63D5 6FC5 E55D A838
    #      Subkey fingerprint: 5228 33AA 75E2 DCE6 A247  66C0 4DE1 AF31 6D4F 0DE9
    
    * tag 'nvme-fixes-pull-request' of https://gitlab.com/birkelund/qemu:
      hw/nvme: fix null pointer access in ruh update
      hw/nvme: fix null pointer access in directive receive
    
    Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
    rth7680 committed Aug 9, 2023
    Copy the full SHA
    c0b7823 View commit details
    Browse the repository at this point in the history
  10. Merge tag 'pull-lu-20230809' of https://gitlab.com/rth7680/qemu into …

    …staging
    
    linux-user: Fixes for mmap syscall emulation
    linux-user: Correctly detect access to /proc in openat
    util/interval-tree: Check root for null in interval_tree_iter_first
    tests/tcg: Disable filename test for info proc mappings
    
    # -----BEGIN PGP SIGNATURE-----
    #
    # iQFRBAABCgA7FiEEekgeeIaLTbaoWgXAZN846K9+IV8FAmTT0O4dHHJpY2hhcmQu
    # aGVuZGVyc29uQGxpbmFyby5vcmcACgkQZN846K9+IV9NeQf/SGtJsvcMdPPcOt1P
    # ZK9fBK+gS9XzWvkquSL2wehs0ZY61u2IHznIqsFxhhmPqNTZPKb27u6Cg8DCxYdw
    # Hc+YMtjx2MOBv2pXTCc14XWkTsclP2jJaf2VUFIR/MowBJb7Xcgbv53PvRnCn3xT
    # KC80Pm6eJZFT0EkQZwHbT8doakkjyIx8JIapdNFvD6Ne0CWCKOwDK9sF5ob1Tf5g
    # BXyCw5ZtnCiToYw+RpBnhZ1wsInV+o/MV7FwcgrxGWB+4ovwRLknBzAggHvhz3ZO
    # pdCqvobBtUk88+txMX6ewIDYU9BsuOnWDR+j99MD9/kPtbgSLlRYzxJ0PAjCMG6m
    # xu0Tyg==
    # =n1TD
    # -----END PGP SIGNATURE-----
    # gpg: Signature made Wed 09 Aug 2023 10:46:22 AM PDT
    # gpg:                using RSA key 7A481E78868B4DB6A85A05C064DF38E8AF7E215F
    # gpg:                issuer "richard.henderson@linaro.org"
    # gpg: Good signature from "Richard Henderson <richard.henderson@linaro.org>" [ultimate]
    
    * tag 'pull-lu-20230809' of https://gitlab.com/rth7680/qemu:
      linux-user: Fix openat() emulation to correctly detect accesses to /proc
      util/interval-tree: Check root for null in interval_tree_iter_first
      tests/tcg: Disable filename test for info proc mappings
      linux-user: Use ARRAY_SIZE with bitmask_transtbl
      linux-user: Split out do_mmap
      qemu/osdep: Remove fallback for MAP_FIXED_NOREPLACE
    
    Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
    rth7680 committed Aug 9, 2023
    Copy the full SHA
    e53e2e2 View commit details
    Browse the repository at this point in the history