Skip to content
Snippets Groups Projects
  1. Oct 05, 2023
    • Eric Blake's avatar
      nbd/server: Support a request payload · 009cd866
      Eric Blake authored
      
      Upcoming additions to support NBD 64-bit effect lengths allow for the
      possibility to distinguish between payload length (capped at 32M) and
      effect length (64 bits, although we generally assume 63 bits because
      of off_t limitations).  Without that extension, only the NBD_CMD_WRITE
      request has a payload; but with the extension, it makes sense to allow
      at least NBD_CMD_BLOCK_STATUS to have both a payload and effect length
      in a future patch (where the payload is a limited-size struct that in
      turn gives the real effect length as well as a subset of known ids for
      which status is requested).  Other future NBD commands may also have a
      request payload, so the 64-bit extension introduces a new
      NBD_CMD_FLAG_PAYLOAD_LEN that distinguishes between whether the header
      length is a payload length or an effect length, rather than
      hard-coding the decision based on the command.
      
      According to the spec, a client should never send a command with a
      payload without the negotiation phase proving such extension is
      available.  So in the unlikely event the bit is set or cleared
      incorrectly, the client is already at fault; if the client then
      provides the payload, we can gracefully consume it off the wire and
      fail the command with NBD_EINVAL (subsequent checks for magic numbers
      ensure we are still in sync), while if the client fails to send
      payload we block waiting for it (basically deadlocking our connection
      to the bad client, but not negatively impacting our ability to service
      other clients, so not a security risk).  Note that we do not support
      the payload version of BLOCK_STATUS yet.
      
      This patch also fixes a latent bug introduced in b2578459: once
      request->len can be 64 bits, assigning it to a 32-bit payload_len can
      cause wraparound to 0 which then sets req->complete prematurely;
      thankfully, the bug was not possible back then (it takes this and
      later patches to even allow request->len larger than 32 bits; and
      since previously the only 'payload_len = request->len' assignment was
      in NBD_CMD_WRITE which also sets check_length, which in turn rejects
      lengths larger than 32M before relying on any possibly-truncated value
      stored in payload_len).
      
      Signed-off-by: default avatarEric Blake <eblake@redhat.com>
      Message-ID: <20230925192229.3186470-15-eblake@redhat.com>
      Reviewed-by: default avatarVladimir Sementsov-Ogievskiy <vsementsov@yandex-team.ru>
      [eblake: enhance comment on handling client error, fix type bug]
      Signed-off-by: default avatarEric Blake <eblake@redhat.com>
      009cd866
    • Eric Blake's avatar
      mailmap: Fix BALATON Zoltan author email · a960a27e
      Eric Blake authored
      
      This fixes authorship of commits 5cbd51a5 and friends, where the
      qemu-ppc mailing list rewrote the "From:" field in the corresponding
      patches.  See commit 3bd2608d ("maint: Add .mailmap entries for
      patches claiming list authorship") for explanation.
      
      Signed-off-by: default avatarEric Blake <eblake@redhat.com>
      Message-ID: <20230927143815.3397386-8-eblake@redhat.com>
      a960a27e
    • Eric Blake's avatar
      maint: Tweak comments in mailmap regarding SPF · 8a18f28c
      Eric Blake authored
      Documenting that we should not add new lines to work around SPF
      rewrites sounds foreboding; the intent is instead that new lines here
      are okay, but indicate a second problem elsewhere in our build process
      that we should also consider fixing at the same time, to keep the
      section from growing without bounds.  While we have been doing that
      for qemu-devel for a while, we jut recently fixed that for qemu-block:
      https://git.linaro.org/people/pmaydell/misc-scripts.git/commit/?id=f9a317392
      
      
      
      Mentioning DMARC alongside SPF may also help people grep for this
      scenario, as well as documenting the 'git config' workaround that can
      be used by submitters to avoid the munging issue in the first place.
      
      Note the subtlety: 'git commit' sets authorship information based on
      user.name and user.email (where name is usually unquoted); while 'git
      send-email' includes a body 'From:' line only when sendemail.from is
      present but differs from authorship information.  Hence the use of
      quotes in sendemail.from (not a semantic change to email, but enough
      of a difference to add the body 'From:').
      
      Fixes: 3bd2608d ("maint: Add .mailmap entries for patches claiming list authorship")
      CC: Andrey Drobyshev <andrey.drobyshev@virtuozzo.com>
      Cc: Peter Maydell <peter.maydell@linaro.org>
      Signed-off-by: default avatarEric Blake <eblake@redhat.com>
      Message-ID: <20230927143815.3397386-7-eblake@redhat.com>
      Reviewed-by: default avatarPeter Maydell <peter.maydell@linaro.org>
      8a18f28c
    • Andrey Drobyshev's avatar
      mailmap: Fix Andrey Drobyshev author email · 994679b9
      Andrey Drobyshev authored
      
      This fixes authorship of commits 28482891, 52b10c9c as the mailing
      list rewrote the "From:" field in the corresponding patches.  See commit
      3bd2608d ("maint: Add .mailmap entries for patches claiming list
      authorship") for explanation.
      
      Signed-off-by: default avatarAndrey Drobyshev <andrey.drobyshev@virtuozzo.com>
      Message-ID: <20230926102801.512107-1-andrey.drobyshev@virtuozzo.com>
      Reviewed-by: default avatarEric Blake <eblake@redhat.com>
      Reviewed-by: default avatarPhilippe Mathieu-Daudé <philmd@linaro.org>
      Signed-off-by: default avatarEric Blake <eblake@redhat.com>
      994679b9
    • Stefan Hajnoczi's avatar
      Merge tag 'for_upstream' of https://git.kernel.org/pub/scm/virt/kvm/mst/qemu into staging · 2f3913f4
      Stefan Hajnoczi authored
      
      virtio,pci: features, cleanups
      
      vdpa:
            shadow vq vlan support
            net migration with cvq
      cxl:
           support emulating 4 HDM decoders
           serial number extended capability
      virtio:
            hared dma-buf
      
      Fixes, cleanups all over the place.
      
      Signed-off-by: default avatarMichael S. Tsirkin <mst@redhat.com>
      
      * tag 'for_upstream' of https://git.kernel.org/pub/scm/virt/kvm/mst/qemu: (53 commits)
        libvhost-user: handle shared_object msg
        vhost-user: add shared_object msg
        hw/display: introduce virtio-dmabuf
        util/uuid: add a hash function
        virtio: remove unused next argument from virtqueue_split_read_next_desc()
        virtio: remove unnecessary thread fence while reading next descriptor
        virtio: use shadow_avail_idx while checking number of heads
        libvhost-user.c: add assertion to vu_message_read_default
        pcie_sriov: unregister_vfs(): fix error path
        hw/i386/pc: improve physical address space bound check for 32-bit x86 systems
        amd_iommu: Fix APIC address check
        vdpa net: follow VirtIO initialization properly at cvq isolation probing
        vdpa net: stop probing if cannot set features
        vdpa net: fix error message setting virtio status
        hw/pci-bridge/cxl-upstream: Add serial number extended capability support
        hw/cxl: Support 4 HDM decoders at all levels of topology
        hw/cxl: Fix and use same calculation for HDM decoder block size everywhere
        hw/cxl: Add utility functions decoder interleave ways and target count.
        hw/cxl: Push cxl_decoder_count_enc() and cxl_decode_ig() into .c
        vdpa net: zero vhost_vdpa iova_tree pointer at cleanup
        ...
      
      Conflicts:
        hw/core/machine.c
        Context conflict with commit 314e0a84 ("hw/core: remove needless
        includes") because it removed an adjacent #include.
      2f3913f4
    • Stefan Hajnoczi's avatar
      Merge tag 'pull-tcg-20231004' of https://gitlab.com/rth7680/qemu into staging · 800af0aa
      Stefan Hajnoczi authored
      accel: Introduce AccelClass::cpu_common_[un]realize
      accel: Target agnostic code movement
      accel/tcg: Cleanups to use CPUState instead of CPUArchState
      accel/tcg: Move CPUNegativeOffsetState into CPUState
      tcg: Split out tcg init functions to tcg/startup.h
      linux-user/hppa: Fix struct target_sigcontext layout
      build: Remove --enable-gprof
      
      # -----BEGIN PGP SIGNATURE-----
      #
      # iQFRBAABCgA7FiEEekgeeIaLTbaoWgXAZN846K9+IV8FAmUdsL4dHHJpY2hhcmQu
      # aGVuZGVyc29uQGxpbmFyby5vcmcACgkQZN846K9+IV/iYggAvDJEyMCAXSSH97BA
      # wZT/2D/MFIhOMk6xrQRnrXfrG70N0iVKz44jl9j7k1D+9BOHcso//DDJH3c96k9A
      # MgDb6W2bsWvC15/Qw6BALf5bb/II0MJuCcQvj3CNX5lNkXAWhwIOBhsZx7V9ST1+
      # rihN4nowpRWdV5GeCjDGaJW455Y1gc96hICYHy6Eqw1cUgUFt9vm5aYU3FHlat29
      # sYRaVYKUL2hRUPPNcPiPq0AaJ8wN6/s8gT+V1UvTzkhHqskoM4ZU89RchuXVoq1h
      # SvhKElyULMRzM7thWtpW8qYJPj4mxZsKArESvHjsunGD6KEz3Fh1sy6EKRcdmpG/
      # II1vkg==
      # =k2Io
      # -----END PGP SIGNATURE-----
      # gpg: Signature made Wed 04 Oct 2023 14:36:46 EDT
      # gpg:                using RSA key 7A481E78868B4DB6A85A05C064DF38E8AF7E215F
      # gpg:                issuer "richard.henderson@linaro.org"
      # gpg: Good signature from "Richard Henderson <richard.henderson@linaro.org>" [full]
      # Primary key fingerprint: 7A48 1E78 868B 4DB6 A85A  05C0 64DF 38E8 AF7E 215F
      
      * tag 'pull-tcg-20231004' of https://gitlab.com/rth7680/qemu
      
      : (47 commits)
        tcg/loongarch64: Fix buid error
        tests/avocado: Re-enable MIPS Malta tests (GitLab issue #1884 fixed)
        build: Remove --enable-gprof
        linux-user/hppa: Fix struct target_sigcontext layout
        tcg: Split out tcg init functions to tcg/startup.h
        tcg: Remove argument to tcg_prologue_init
        accel/tcg: Make cpu-exec-common.c a target agnostic unit
        accel/tcg: Make icount.o a target agnostic unit
        accel/tcg: Make monitor.c a target-agnostic unit
        accel/tcg: Rename target-specific 'internal.h' -> 'internal-target.h'
        exec: Rename target specific page-vary.c -> page-vary-target.c
        exec: Rename cpu.c -> cpu-target.c
        accel: Rename accel-common.c -> accel-target.c
        accel: Make accel-blocker.o target agnostic
        accel/tcg: Restrict dump_exec_info() declaration
        exec: Move cpu_loop_foo() target agnostic functions to 'cpu-common.h'
        exec: Make EXCP_FOO definitions target agnostic
        accel/tcg: move ld/st helpers to ldst_common.c.inc
        accel/tcg: Unify user and softmmu do_[st|ld]*_mmu()
        accel/tcg: Remove env_tlb()
        ...
      
      Signed-off-by: default avatarStefan Hajnoczi <stefanha@redhat.com>
      800af0aa
  2. Oct 04, 2023
Loading