From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 227DF1382C5 for ; Sun, 14 Mar 2021 18:54:00 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 7120CE0833; Sun, 14 Mar 2021 18:53:59 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 487C5E0833 for ; Sun, 14 Mar 2021 18:53:59 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 9E617340D4A for ; Sun, 14 Mar 2021 18:53:57 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id E999E590 for ; Sun, 14 Mar 2021 18:53:55 +0000 (UTC) From: "Conrad Kostecki" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Conrad Kostecki" Message-ID: <1615747914.f309e47704c04a153a328c9ad7c07547db51b5a6.conikost@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: app-emulation/qemu/files/ X-VCS-Repository: repo/gentoo X-VCS-Files: app-emulation/qemu/files/qemu-4.0.0-mkdir_systemtap.patch app-emulation/qemu/files/qemu-4.2.0-cflags.patch app-emulation/qemu/files/qemu-5.1.0-pixman-for-vhost-user-gpu.patch app-emulation/qemu/files/qemu-5.1.0-usb-host-workaround-libusb-bug.patch app-emulation/qemu/files/qemu-5.1.0-usb-oob-CVE-2020-14364.patch X-VCS-Directories: app-emulation/qemu/files/ X-VCS-Committer: conikost X-VCS-Committer-Name: Conrad Kostecki X-VCS-Revision: f309e47704c04a153a328c9ad7c07547db51b5a6 X-VCS-Branch: master Date: Sun, 14 Mar 2021 18:53:55 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: 728a1908-c765-44f2-8c9e-9250b194fe27 X-Archives-Hash: b141a4c69a48e36498195134966098f0 commit: f309e47704c04a153a328c9ad7c07547db51b5a6 Author: Michael Mair-Keimberger levelnine at> AuthorDate: Sun Mar 14 16:45:36 2021 +0000 Commit: Conrad Kostecki gentoo org> CommitDate: Sun Mar 14 18:51:54 2021 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=f309e477 app-emulation/qemu: remove unused patches Closes: https://github.com/gentoo/gentoo/pull/19927 Package-Manager: Portage-3.0.17, Repoman-3.0.2 Signed-off-by: Michael Mair-Keimberger levelnine.at> Signed-off-by: Conrad Kostecki gentoo.org> .../qemu/files/qemu-4.0.0-mkdir_systemtap.patch | 12 --- app-emulation/qemu/files/qemu-4.2.0-cflags.patch | 16 ---- .../qemu-5.1.0-pixman-for-vhost-user-gpu.patch | 62 --------------- ...qemu-5.1.0-usb-host-workaround-libusb-bug.patch | 82 -------------------- .../files/qemu-5.1.0-usb-oob-CVE-2020-14364.patch | 90 ---------------------- 5 files changed, 262 deletions(-) diff --git a/app-emulation/qemu/files/qemu-4.0.0-mkdir_systemtap.patch b/app-emulation/qemu/files/qemu-4.0.0-mkdir_systemtap.patch deleted file mode 100644 index 95ccdd7a4b1..00000000000 --- a/app-emulation/qemu/files/qemu-4.0.0-mkdir_systemtap.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff --git a/Makefile b/Makefile -index 04a0d450..e0013a59 100644 ---- a/Makefile -+++ b/Makefile -@@ -803,6 +802,7 @@ - $(call install-prog,$(HELPERS-y),$(DESTDIR)$(libexecdir)) - endif - ifdef CONFIG_TRACE_SYSTEMTAP -+ mkdir -p $(DESTDIR)$(bindir) - $(INSTALL_PROG) "scripts/qemu-trace-stap" $(DESTDIR)$(bindir) - endif - ifneq ($(BLOBS),) diff --git a/app-emulation/qemu/files/qemu-4.2.0-cflags.patch b/app-emulation/qemu/files/qemu-4.2.0-cflags.patch deleted file mode 100644 index 101926589a6..00000000000 --- a/app-emulation/qemu/files/qemu-4.2.0-cflags.patch +++ /dev/null @@ -1,16 +0,0 @@ -diff --git i/configure w/configure -index a72a5def57..546d757603 100755 ---- i/configure -+++ w/configure -@@ -6093,10 +6093,6 @@ write_c_skeleton - if test "$gcov" = "yes" ; then - QEMU_CFLAGS="-fprofile-arcs -ftest-coverage -g $QEMU_CFLAGS" - QEMU_LDFLAGS="-fprofile-arcs -ftest-coverage $QEMU_LDFLAGS" --elif test "$fortify_source" = "yes" ; then -- CFLAGS="-O2 -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 $CFLAGS" --elif test "$debug" = "no"; then -- CFLAGS="-O2 $CFLAGS" - fi - - if test "$have_asan" = "yes"; then - diff --git a/app-emulation/qemu/files/qemu-5.1.0-pixman-for-vhost-user-gpu.patch b/app-emulation/qemu/files/qemu-5.1.0-pixman-for-vhost-user-gpu.patch deleted file mode 100644 index 4eb644fde54..00000000000 --- a/app-emulation/qemu/files/qemu-5.1.0-pixman-for-vhost-user-gpu.patch +++ /dev/null @@ -1,62 +0,0 @@ -https://bugs.gentoo.org/735146 - -From 4fd46e6cdd976f4aecdc3fbbad728e00a7bc4ee0 Mon Sep 17 00:00:00 2001 -From: Rafael Kitover -Date: Thu, 13 Aug 2020 20:19:24 +0000 -Subject: [PATCH] configure: Require pixman for vhost-user-gpu. - -Use the test from Makefile to check if vhost-user-gpu is being built, -and if so require pixman. - -Signed-off-by: Rafael Kitover ---- - configure | 28 ++++++++++++++-------------- - 1 file changed, 14 insertions(+), 14 deletions(-) - ---- a/configure -+++ b/configure -@@ -4062,20 +4062,6 @@ if test "$modules" = yes; then - fi - fi - --########################################## --# pixman support probe -- --if test "$softmmu" = "no"; then -- pixman_cflags= -- pixman_libs= --elif $pkg_config --atleast-version=0.21.8 pixman-1 > /dev/null 2>&1; then -- pixman_cflags=$($pkg_config --cflags pixman-1) -- pixman_libs=$($pkg_config --libs pixman-1) --else -- error_exit "pixman >= 0.21.8 not present." \ -- "Please install the pixman devel package." --fi -- - ########################################## - # libmpathpersist probe - -@@ -4491,6 +4477,20 @@ if test "$opengl" = "yes" && test "$have_x11" = "yes"; then - done - fi - -+########################################## -+# pixman support probe -+ -+if test "$softmmu" = "no" && ! test "${linux} ${virglrenderer} ${gbm} ${want_tools}" = "yes yes yes yes"; then -+ pixman_cflags= -+ pixman_libs= -+elif $pkg_config --atleast-version=0.21.8 pixman-1 > /dev/null 2>&1; then -+ pixman_cflags=$($pkg_config --cflags pixman-1) -+ pixman_libs=$($pkg_config --libs pixman-1) -+else -+ error_exit "pixman >= 0.21.8 not present." \ -+ "Please install the pixman devel package." -+fi -+ - ########################################## - # libxml2 probe - if test "$libxml2" != "no" ; then --- -2.28.0 - diff --git a/app-emulation/qemu/files/qemu-5.1.0-usb-host-workaround-libusb-bug.patch b/app-emulation/qemu/files/qemu-5.1.0-usb-host-workaround-libusb-bug.patch deleted file mode 100644 index 34a50a9bfb5..00000000000 --- a/app-emulation/qemu/files/qemu-5.1.0-usb-host-workaround-libusb-bug.patch +++ /dev/null @@ -1,82 +0,0 @@ -From 202d69a715a4b1824dcd7ec1683d027ed2bae6d3 Mon Sep 17 00:00:00 2001 -Message-Id: <202d69a715a4b1824dcd7ec1683d027ed2bae6d3.1606202550.git.mprivozn@redhat.com> -From: Gerd Hoffmann -Date: Mon, 24 Aug 2020 13:00:57 +0200 -Subject: [PATCH] usb-host: workaround libusb bug - -libusb_get_device_speed() does not work for -libusb_wrap_sys_device() devices in v1.0.23. - -Buglink: https://bugzilla.redhat.com/show_bug.cgi?id=1871090 -Signed-off-by: Gerd Hoffmann -Message-id: 20200824110057.32089-1-kraxel@redhat.com -Signed-off-by: Michal Privoznik ---- - hw/usb/host-libusb.c | 37 ++++++++++++++++++++++++++++++++++++- - 1 file changed, 36 insertions(+), 1 deletion(-) - -diff --git a/hw/usb/host-libusb.c b/hw/usb/host-libusb.c -index c474551d84..08604f787f 100644 ---- a/hw/usb/host-libusb.c -+++ b/hw/usb/host-libusb.c -@@ -39,6 +39,11 @@ - #endif - #include - -+#ifdef CONFIG_LINUX -+#include -+#include -+#endif -+ - #include "qapi/error.h" - #include "migration/vmstate.h" - #include "monitor/monitor.h" -@@ -885,6 +890,7 @@ static void usb_host_ep_update(USBHostDevice *s) - static int usb_host_open(USBHostDevice *s, libusb_device *dev, int hostfd) - { - USBDevice *udev = USB_DEVICE(s); -+ int libusb_speed; - int bus_num = 0; - int addr = 0; - int rc; -@@ -935,7 +941,36 @@ static int usb_host_open(USBHostDevice *s, libusb_device *dev, int hostfd) - usb_ep_init(udev); - usb_host_ep_update(s); - -- udev->speed = speed_map[libusb_get_device_speed(dev)]; -+ libusb_speed = libusb_get_device_speed(dev); -+#ifdef CONFIG_LINUX -+ if (hostfd && libusb_speed == 0) { -+ /* -+ * Workaround libusb bug: libusb_get_device_speed() does not -+ * work for libusb_wrap_sys_device() devices in v1.0.23. -+ * -+ * Speeds are defined in linux/usb/ch9.h, file not included -+ * due to name conflicts. -+ */ -+ int rc = ioctl(hostfd, USBDEVFS_GET_SPEED, NULL); -+ switch (rc) { -+ case 1: /* low */ -+ libusb_speed = LIBUSB_SPEED_LOW; -+ break; -+ case 2: /* full */ -+ libusb_speed = LIBUSB_SPEED_FULL; -+ break; -+ case 3: /* high */ -+ case 4: /* wireless */ -+ libusb_speed = LIBUSB_SPEED_HIGH; -+ break; -+ case 5: /* super */ -+ case 6: /* super plus */ -+ libusb_speed = LIBUSB_SPEED_SUPER; -+ break; -+ } -+ } -+#endif -+ udev->speed = speed_map[libusb_speed]; - usb_host_speed_compat(s); - - if (s->ddesc.iProduct) { --- -2.26.2 - diff --git a/app-emulation/qemu/files/qemu-5.1.0-usb-oob-CVE-2020-14364.patch b/app-emulation/qemu/files/qemu-5.1.0-usb-oob-CVE-2020-14364.patch deleted file mode 100644 index d1d23ec6f0e..00000000000 --- a/app-emulation/qemu/files/qemu-5.1.0-usb-oob-CVE-2020-14364.patch +++ /dev/null @@ -1,90 +0,0 @@ -https://bugs.gentoo.org/743649 - -From b946434f2659a182afc17e155be6791ebfb302eb Mon Sep 17 00:00:00 2001 -From: Gerd Hoffmann -Date: Tue, 25 Aug 2020 07:36:36 +0200 -Subject: [PATCH] usb: fix setup_len init (CVE-2020-14364) - -Store calculated setup_len in a local variable, verify it, and only -write it to the struct (USBDevice->setup_len) in case it passed the -sanity checks. - -This prevents other code (do_token_{in,out} functions specifically) -from working with invalid USBDevice->setup_len values and overrunning -the USBDevice->setup_buf[] buffer. - -Fixes: CVE-2020-14364 -Signed-off-by: Gerd Hoffmann -Tested-by: Gonglei -Reviewed-by: Li Qiang -Message-id: 20200825053636.29648-1-kraxel@redhat.com ---- - hw/usb/core.c | 16 ++++++++++------ - 1 file changed, 10 insertions(+), 6 deletions(-) - -diff --git a/hw/usb/core.c b/hw/usb/core.c -index 5abd128b6b..5234dcc73f 100644 ---- a/hw/usb/core.c -+++ b/hw/usb/core.c -@@ -129,6 +129,7 @@ void usb_wakeup(USBEndpoint *ep, unsigned int stream) - static void do_token_setup(USBDevice *s, USBPacket *p) - { - int request, value, index; -+ unsigned int setup_len; - - if (p->iov.size != 8) { - p->status = USB_RET_STALL; -@@ -138,14 +139,15 @@ static void do_token_setup(USBDevice *s, USBPacket *p) - usb_packet_copy(p, s->setup_buf, p->iov.size); - s->setup_index = 0; - p->actual_length = 0; -- s->setup_len = (s->setup_buf[7] << 8) | s->setup_buf[6]; -- if (s->setup_len > sizeof(s->data_buf)) { -+ setup_len = (s->setup_buf[7] << 8) | s->setup_buf[6]; -+ if (setup_len > sizeof(s->data_buf)) { - fprintf(stderr, - "usb_generic_handle_packet: ctrl buffer too small (%d > %zu)\n", -- s->setup_len, sizeof(s->data_buf)); -+ setup_len, sizeof(s->data_buf)); - p->status = USB_RET_STALL; - return; - } -+ s->setup_len = setup_len; - - request = (s->setup_buf[0] << 8) | s->setup_buf[1]; - value = (s->setup_buf[3] << 8) | s->setup_buf[2]; -@@ -259,26 +261,28 @@ static void do_token_out(USBDevice *s, USBPacket *p) - static void do_parameter(USBDevice *s, USBPacket *p) - { - int i, request, value, index; -+ unsigned int setup_len; - - for (i = 0; i < 8; i++) { - s->setup_buf[i] = p->parameter >> (i*8); - } - - s->setup_state = SETUP_STATE_PARAM; -- s->setup_len = (s->setup_buf[7] << 8) | s->setup_buf[6]; - s->setup_index = 0; - - request = (s->setup_buf[0] << 8) | s->setup_buf[1]; - value = (s->setup_buf[3] << 8) | s->setup_buf[2]; - index = (s->setup_buf[5] << 8) | s->setup_buf[4]; - -- if (s->setup_len > sizeof(s->data_buf)) { -+ setup_len = (s->setup_buf[7] << 8) | s->setup_buf[6]; -+ if (setup_len > sizeof(s->data_buf)) { - fprintf(stderr, - "usb_generic_handle_packet: ctrl buffer too small (%d > %zu)\n", -- s->setup_len, sizeof(s->data_buf)); -+ setup_len, sizeof(s->data_buf)); - p->status = USB_RET_STALL; - return; - } -+ s->setup_len = setup_len; - - if (p->pid == USB_TOKEN_OUT) { - usb_packet_copy(p, s->data_buf, s->setup_len); --- -2.28.0 -