public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
From: "John Helmert III" <ajak@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] repo/gentoo:master commit in: app-emulation/qemu/files/
Date: Mon, 10 Jan 2022 21:02:39 +0000 (UTC)	[thread overview]
Message-ID: <1641848545.52a126660cdd959d861b7be8336a5b28acb5b1d2.ajak@gentoo> (raw)

commit:     52a126660cdd959d861b7be8336a5b28acb5b1d2
Author:     Michael Mair-Keimberger <mmk <AT> levelnine <DOT> at>
AuthorDate: Mon Jan 10 16:57:21 2022 +0000
Commit:     John Helmert III <ajak <AT> gentoo <DOT> org>
CommitDate: Mon Jan 10 21:02:25 2022 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=52a12666

app-emulation/qemu: remove unused patches

Package-Manager: Portage-3.0.30, Repoman-3.0.3
Signed-off-by: Michael Mair-Keimberger <mmk <AT> levelnine.at>
Closes: https://github.com/gentoo/gentoo/pull/23727
Signed-off-by: John Helmert III <ajak <AT> gentoo.org>

 .../qemu/files/qemu-6.1.0-automagic-libbpf.patch   |  21 ----
 .../qemu/files/qemu-6.1.0-data-corruption.patch    | 114 ---------------------
 .../files/qemu-6.1.0-fix-unix-socket-copy.patch    |  76 --------------
 3 files changed, 211 deletions(-)

diff --git a/app-emulation/qemu/files/qemu-6.1.0-automagic-libbpf.patch b/app-emulation/qemu/files/qemu-6.1.0-automagic-libbpf.patch
deleted file mode 100644
index d067650dc8fa..000000000000
--- a/app-emulation/qemu/files/qemu-6.1.0-automagic-libbpf.patch
+++ /dev/null
@@ -1,21 +0,0 @@
-commit 080832e4f4801a28bd1170c49e61f6a0f5f05d03
-Author: Paolo Bonzini <pbonzini@redhat.com>
-Date:   Tue Sep 7 12:45:12 2021 +0200
-
-    ebpf: only include in system emulators
-    
-    eBPF files are being included in user emulators, which is useless and
-    also breaks compilation because ebpf/trace-events is only processed
-    if a system emulator is included in the build.
-    
-    Resolves: https://gitlab.com/qemu-project/qemu/-/issues/566
-    Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
-    Signed-off-by: Jason Wang <jasowang@redhat.com>
-
-diff --git a/ebpf/meson.build b/ebpf/meson.build
-index 9cd0635370..2dd0fd8948 100644
---- a/ebpf/meson.build
-+++ b/ebpf/meson.build
-@@ -1 +1 @@
--common_ss.add(when: libbpf, if_true: files('ebpf_rss.c'), if_false: files('ebpf_rss-stub.c'))
-+softmmu_ss.add(when: libbpf, if_true: files('ebpf_rss.c'), if_false: files('ebpf_rss-stub.c'))

diff --git a/app-emulation/qemu/files/qemu-6.1.0-data-corruption.patch b/app-emulation/qemu/files/qemu-6.1.0-data-corruption.patch
deleted file mode 100644
index 25c788426a9c..000000000000
--- a/app-emulation/qemu/files/qemu-6.1.0-data-corruption.patch
+++ /dev/null
@@ -1,114 +0,0 @@
-commit cc071629539dc1f303175a7e2d4ab854c0a8b20f
-Author: Paolo Bonzini <pbonzini@redhat.com>
-Date:   Thu Sep 23 09:04:36 2021 -0400
-
-    block: introduce max_hw_iov for use in scsi-generic
-    
-    Linux limits the size of iovecs to 1024 (UIO_MAXIOV in the kernel
-    sources, IOV_MAX in POSIX).  Because of this, on some host adapters
-    requests with many iovecs are rejected with -EINVAL by the
-    io_submit() or readv()/writev() system calls.
-    
-    In fact, the same limit applies to SG_IO as well.  To fix both the
-    EINVAL and the possible performance issues from using fewer iovecs
-    than allowed by Linux (some HBAs have max_segments as low as 128),
-    introduce a separate entry in BlockLimits to hold the max_segments
-    value from sysfs.  This new limit is used only for SG_IO and clamped
-    to bs->bl.max_iov anyway, just like max_hw_transfer is clamped to
-    bs->bl.max_transfer.
-    
-    Reported-by: Halil Pasic <pasic@linux.ibm.com>
-    Cc: Hanna Reitz <hreitz@redhat.com>
-    Cc: Kevin Wolf <kwolf@redhat.com>
-    Cc: qemu-block@nongnu.org
-    Cc: qemu-stable@nongnu.org
-    Fixes: 18473467d5 ("file-posix: try BLKSECTGET on block devices too, do not round to power of 2", 2021-06-25)
-    Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
-    Message-Id: <20210923130436.1187591-1-pbonzini@redhat.com>
-    Signed-off-by: Kevin Wolf <kwolf@redhat.com>
-
-diff --git a/block/block-backend.c b/block/block-backend.c
-index 6140d133e2..ba2b5ebb10 100644
---- a/block/block-backend.c
-+++ b/block/block-backend.c
-@@ -1986,6 +1986,12 @@ uint32_t blk_get_max_transfer(BlockBackend *blk)
-     return ROUND_DOWN(max, blk_get_request_alignment(blk));
- }
- 
-+int blk_get_max_hw_iov(BlockBackend *blk)
-+{
-+    return MIN_NON_ZERO(blk->root->bs->bl.max_hw_iov,
-+                        blk->root->bs->bl.max_iov);
-+}
-+
- int blk_get_max_iov(BlockBackend *blk)
- {
-     return blk->root->bs->bl.max_iov;
-diff --git a/block/file-posix.c b/block/file-posix.c
-index c62e42743d..53be0bdc1b 100644
---- a/block/file-posix.c
-+++ b/block/file-posix.c
-@@ -1273,7 +1273,7 @@ static void raw_refresh_limits(BlockDriverState *bs, Error **errp)
- 
-         ret = hdev_get_max_segments(s->fd, &st);
-         if (ret > 0) {
--            bs->bl.max_iov = ret;
-+            bs->bl.max_hw_iov = ret;
-         }
-     }
- }
-diff --git a/block/io.c b/block/io.c
-index 18d345a87a..bb0a254def 100644
---- a/block/io.c
-+++ b/block/io.c
-@@ -136,6 +136,7 @@ static void bdrv_merge_limits(BlockLimits *dst, const BlockLimits *src)
-     dst->min_mem_alignment = MAX(dst->min_mem_alignment,
-                                  src->min_mem_alignment);
-     dst->max_iov = MIN_NON_ZERO(dst->max_iov, src->max_iov);
-+    dst->max_hw_iov = MIN_NON_ZERO(dst->max_hw_iov, src->max_hw_iov);
- }
- 
- typedef struct BdrvRefreshLimitsState {
-diff --git a/hw/scsi/scsi-generic.c b/hw/scsi/scsi-generic.c
-index 665baf900e..0306ccc7b1 100644
---- a/hw/scsi/scsi-generic.c
-+++ b/hw/scsi/scsi-generic.c
-@@ -180,7 +180,7 @@ static int scsi_handle_inquiry_reply(SCSIGenericReq *r, SCSIDevice *s, int len)
-         page = r->req.cmd.buf[2];
-         if (page == 0xb0) {
-             uint64_t max_transfer = blk_get_max_hw_transfer(s->conf.blk);
--            uint32_t max_iov = blk_get_max_iov(s->conf.blk);
-+            uint32_t max_iov = blk_get_max_hw_iov(s->conf.blk);
- 
-             assert(max_transfer);
-             max_transfer = MIN_NON_ZERO(max_transfer, max_iov * qemu_real_host_page_size)
-diff --git a/include/block/block_int.h b/include/block/block_int.h
-index ffe86068d4..f4c75e8ba9 100644
---- a/include/block/block_int.h
-+++ b/include/block/block_int.h
-@@ -718,6 +718,13 @@ typedef struct BlockLimits {
-      */
-     uint64_t max_hw_transfer;
- 
-+    /* Maximal number of scatter/gather elements allowed by the hardware.
-+     * Applies whenever transfers to the device bypass the kernel I/O
-+     * scheduler, for example with SG_IO.  If larger than max_iov
-+     * or if zero, blk_get_max_hw_iov will fall back to max_iov.
-+     */
-+    int max_hw_iov;
-+
-     /* memory alignment, in bytes so that no bounce buffer is needed */
-     size_t min_mem_alignment;
- 
-diff --git a/include/sysemu/block-backend.h b/include/sysemu/block-backend.h
-index 29d4fdbf63..82bae55161 100644
---- a/include/sysemu/block-backend.h
-+++ b/include/sysemu/block-backend.h
-@@ -211,6 +211,7 @@ uint32_t blk_get_request_alignment(BlockBackend *blk);
- uint32_t blk_get_max_transfer(BlockBackend *blk);
- uint64_t blk_get_max_hw_transfer(BlockBackend *blk);
- int blk_get_max_iov(BlockBackend *blk);
-+int blk_get_max_hw_iov(BlockBackend *blk);
- void blk_set_guest_block_size(BlockBackend *blk, int align);
- void *blk_try_blockalign(BlockBackend *blk, size_t size);
- void *blk_blockalign(BlockBackend *blk, size_t size);

diff --git a/app-emulation/qemu/files/qemu-6.1.0-fix-unix-socket-copy.patch b/app-emulation/qemu/files/qemu-6.1.0-fix-unix-socket-copy.patch
deleted file mode 100644
index 7701b26b4f9a..000000000000
--- a/app-emulation/qemu/files/qemu-6.1.0-fix-unix-socket-copy.patch
+++ /dev/null
@@ -1,76 +0,0 @@
-commit 118d527f2e4baec5fe8060b22a6212468b8e4d3f
-Author: Michael Tokarev <mjt@tls.msk.ru>
-Date:   Wed Sep 1 16:16:24 2021 +0300
-
-    qemu-sockets: fix unix socket path copy (again)
-    
-    Commit 4cfd970ec188558daa6214f26203fe553fb1e01f 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: 4cfd970ec188558daa6214f26203fe553fb1e01f
-    Fixes: http://bugs.debian.org/993145
-    Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
-    Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
-    Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>
-    CC: qemu-stable@nongnu.org
-
-diff --git a/util/qemu-sockets.c b/util/qemu-sockets.c
-index f2f3676d1f..c5043999e9 100644
---- a/util/qemu-sockets.c
-+++ b/util/qemu-sockets.c
-@@ -1345,25 +1345,22 @@ socket_sockaddr_to_address_unix(struct sockaddr_storage *sa,
-     SocketAddress *addr;
-     struct sockaddr_un *su = (struct sockaddr_un *)sa;
- 
--    assert(salen >= sizeof(su->sun_family) + 1 &&
--           salen <= sizeof(struct sockaddr_un));
--
-     addr = g_new0(SocketAddress, 1);
-     addr->type = SOCKET_ADDRESS_TYPE_UNIX;
-+    salen -= offsetof(struct sockaddr_un, sun_path);
- #ifdef CONFIG_LINUX
--    if (!su->sun_path[0]) {
-+    if (salen > 0 && !su->sun_path[0]) {
-         /* Linux abstract socket */
--        addr->u.q_unix.path = g_strndup(su->sun_path + 1,
--                                        salen - sizeof(su->sun_family) - 1);
-+        addr->u.q_unix.path = g_strndup(su->sun_path + 1, salen - 1);
-         addr->u.q_unix.has_abstract = true;
-         addr->u.q_unix.abstract = true;
-         addr->u.q_unix.has_tight = true;
--        addr->u.q_unix.tight = salen < sizeof(*su);
-+        addr->u.q_unix.tight = salen < sizeof(su->sun_path);
-         return addr;
-     }
- #endif
- 
--    addr->u.q_unix.path = g_strndup(su->sun_path, sizeof(su->sun_path));
-+    addr->u.q_unix.path = g_strndup(su->sun_path, salen);
-     return addr;
- }
- #endif /* WIN32 */


             reply	other threads:[~2022-01-10 21:02 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-01-10 21:02 John Helmert III [this message]
  -- strict thread matches above, loose matches on Subject: below --
2025-02-27  9:31 [gentoo-commits] repo/gentoo:master commit in: app-emulation/qemu/files/ Ionen Wolkens
2025-02-05  0:18 Sam James
2024-12-23 20:01 Conrad Kostecki
2024-08-20  8:01 Joonas Niilola
2023-11-20 20:20 Ulrich Müller
2023-10-22 16:33 Joonas Niilola
2023-02-22 11:32 Sam James
2022-01-12  8:38 Matthias Maier
2022-01-06 19:08 John Helmert III
2021-06-16 20:59 Sergei Trofimovich
2021-03-14 18:53 Conrad Kostecki
2020-09-21 21:48 Conrad Kostecki
2020-07-06 18:40 Sergei Trofimovich
2020-04-18 21:31 Sergei Trofimovich
2019-05-20 16:27 Matthias Maier
2018-03-30  2:54 Aaron Bauman
2018-03-27 15:44 Matthias Maier
2017-12-06 12:42 Michael Palimaka
2017-11-12 20:22 Matthias Maier
2017-07-26 19:37 Matthias Maier
2017-07-26 17:15 Matthias Maier
2016-09-05  5:30 Matthias Maier
2016-08-15 20:36 Luca Barbato

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1641848545.52a126660cdd959d861b7be8336a5b28acb5b1d2.ajak@gentoo \
    --to=ajak@gentoo.org \
    --cc=gentoo-commits@lists.gentoo.org \
    --cc=gentoo-dev@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox