qemu: bump to version 5.0.0
authorYousong Zhou <yszhou4tech@gmail.com>
Mon, 11 May 2020 02:52:47 +0000 (10:52 +0800)
committerYousong Zhou <yszhou4tech@gmail.com>
Mon, 11 May 2020 09:02:16 +0000 (17:02 +0800)
The slirp patch was included in this QEMU release

CXX_DEPENDS is now added for all host components otherwise we get
errors like the following

  Package qemu-img is missing dependencies for the following libraries:
  libuClibc++.so.0
  Package qemu-nbd is missing dependencies for the following libraries:
  libuClibc++.so.0

--disable-bluez was removed from configure args because upstream
deprecated bluetooth subsystem since qemu v3.1 and remove the code in
commit 1d4ffe8dc77c ("Remove the core bluetooth code")

Signed-off-by: Yousong Zhou <yszhou4tech@gmail.com>
utils/qemu/Makefile
utils/qemu/patches/0001-configure-allow-disable-fortify_source.patch
utils/qemu/patches/0002-configure-allow-enabling-disabling-libudev-from-comm.patch
utils/qemu/patches/0003-configure-enable-guest_agent-no-matter-whether-softm.patch
utils/qemu/patches/0004-disas-fix-compilation-failure-when-isnan-is-a-macro.patch
utils/qemu/patches/0005-pc-bios-fix-compilation-when-AS-is-actually-gcc-driv.patch
utils/qemu/patches/0006-slirp-ipreass-fix-use-after-free.patch [deleted file]
utils/qemu/patches/0006-util-mmap-alloc-fix-missing-MAP_SYNC.patch

index 82bf64e1d2375a181171ab2b0e8257583f39c234..7f2025cba1a0422f8d4173a547177380f732ad85 100644 (file)
@@ -9,10 +9,10 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=qemu
-PKG_VERSION:=4.2.0
-PKG_RELEASE:=3
+PKG_VERSION:=5.0.0
+PKG_RELEASE:=1
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
-PKG_HASH:=d3481d4108ce211a053ef15be69af1bdd9dde1510fda80d92be0f6c3e98768f0
+PKG_HASH:=2f13a92a0fa5c8b69ff0796b59b86b080bbb92ebad5d301a7724dd06b5e78cb6
 PKG_SOURCE_URL:=http://download.qemu.org/
 PKG_LICENSE:=GPL-2.0
 PKG_LICENSE_FILES:=LICENSE tcg/LICENSE
@@ -31,6 +31,7 @@ include $(INCLUDE_DIR)/package.mk
 
 QEMU_DEPS_IN_GUEST := @(TARGET_x86_64||TARGET_armvirt||TARGET_arm64||TARGET_malta)
 QEMU_DEPS_IN_HOST := @(TARGET_x86_64||TARGET_sunxi)
+QEMU_DEPS_IN_HOST += $(CXX_DEPENDS)
 
 define Package/virtio-console-helper
   SECTION:=utils
@@ -73,7 +74,7 @@ define Package/qemu-bridge-helper
   SUBMENU:=Virtualization
   TITLE:=QEMU bridge helper
   URL:=http://www.qemu.org
-  DEPENDS:=+glib2 $(CXX_DEPENDS) $(QEMU_DEPS_IN_HOST)
+  DEPENDS:=+glib2 $(QEMU_DEPS_IN_HOST)
 endef
 
 define Package/qemu-bridge-helper/install
@@ -189,7 +190,7 @@ define qemu-target
     SUBMENU:=Virtualization
     TITLE:=QEMU target $(1)
     URL:=http://www.qemu.org
-    DEPENDS:= +glib2 +libpthread +zlib $(CXX_DEPENDS) $(QEMU_DEPS_IN_HOST) $(qemu-target-$(1)-deps) \
+    DEPENDS:= +glib2 +libpthread +zlib $(QEMU_DEPS_IN_HOST) $(qemu-target-$(1)-deps) \
        +QEMU_UI_VNC:qemu-keymaps \
        +QEMU_UI_VNC_JPEG:libjpeg \
        +QEMU_UI_VNC_PNG:libpng \
@@ -296,6 +297,7 @@ CONFIGURE_ARGS +=                   \
        --enable-vhost-net              \
        --enable-vhost-scsi             \
        --enable-vhost-user             \
+       --enable-vhost-user-fs          \
        --enable-vhost-vsock            \
 
 # Image formats support
@@ -361,11 +363,11 @@ CONFIGURE_ARGS +=                 \
        --audio-drv-list=''             \
        --disable-attr                  \
        --disable-auth-pam              \
-       --disable-bluez                 \
        --disable-brlapi                \
        --disable-bzip2                 \
        --disable-cap-ng                \
        --disable-capstone              \
+       --disable-containers            \
        --disable-curl                  \
        --disable-debug-info            \
        --disable-debug-mutex           \
@@ -388,11 +390,13 @@ CONFIGURE_ARGS +=                 \
        --disable-lzfse                 \
        --disable-lzo                   \
        --disable-modules               \
+       --disable-module-upgrades       \
        --disable-mpath                 \
        --disable-netmap                \
        --disable-nettle                \
        --disable-numa                  \
        --disable-opengl                \
+       --disable-plugins               \
        --disable-pvrdma                \
        --disable-qom-cast-debug        \
        --disable-rbd                   \
@@ -414,7 +418,9 @@ CONFIGURE_ARGS +=                   \
        --disable-vxhs                  \
        --disable-werror                \
        --disable-xen-pci-passthrough   \
+       --disable-xkbcommon             \
        --disable-xfsctl                \
+       --disable-zstd                  \
 
 CONFIGURE_ARGS += --target-list='$(foreach target,$(qemu-target-list),$(if $(CONFIG_PACKAGE_qemu-$(target)),$(target)))'
 CONFIGURE_ARGS += $(if $(CONFIG_PACKAGE_qemu-ga),--enable-guest-agent)
index e3c29dc12557ae36d937479255156e31c9d4d67d..4d11c4ab149522ac298b6404c829356cb0ece18d 100644 (file)
@@ -1,6 +1,6 @@
-From d4fcdea769a4629c874ebe1801d83e854c94d5e4 Mon Sep 17 00:00:00 2001
+From 871bc03884e8dd4a4b50d05022e347e72f4733d9 Mon Sep 17 00:00:00 2001
 From: Yousong Zhou <yszhou4tech@gmail.com>
-Date: Sat, 24 Feb 2018 13:43:19 +0800
+Date: Mon, 11 May 2020 10:46:09 +0800
 Subject: [PATCH] configure: allow disable fortify_source
 
 Tell build system of qemu to not add _FORTIFY_SOURCE options and let the
@@ -10,12 +10,12 @@ OpenWrt base build system decide flavor of fortify_source to use
  1 file changed, 2 insertions(+)
 
 diff --git a/configure b/configure
-index 6099be1d84..b52d2cb406 100755
+index 23b5e93752..c8d2ac1c3e 100755
 --- a/configure
 +++ b/configure
-@@ -1539,6 +1539,8 @@ for opt do
+@@ -1601,6 +1601,8 @@ for opt do
    ;;
-   --disable-plugins) plugins="no"
+   --gdb=*) gdb_bin="$optarg"
    ;;
 +  --disable-fortify-source) fortify_source="no"
 +  ;;
index 2bc6446bf1ae4009434c180716010848990a2a93..0af7763d49736d338600e0899c0e3d9d77e586f7 100644 (file)
@@ -1,6 +1,6 @@
-From 2a6ab8342245c8dc2a09478d8eb0292e2dbcecf2 Mon Sep 17 00:00:00 2001
+From 608b183335725bcc1c2dd8b615551c49ec3b9c88 Mon Sep 17 00:00:00 2001
 From: Yousong Zhou <yszhou4tech@gmail.com>
-Date: Tue, 2 Apr 2019 06:31:31 +0000
+Date: Mon, 11 May 2020 10:46:37 +0800
 Subject: [PATCH] configure: allow enabling/disabling libudev from command line
 
 ---
@@ -8,12 +8,12 @@ Subject: [PATCH] configure: allow enabling/disabling libudev from command line
  1 file changed, 4 insertions(+)
 
 diff --git a/configure b/configure
-index b52d2cb406..efe06f3c2b 100755
+index c8d2ac1c3e..cf3f8ffdd7 100755
 --- a/configure
 +++ b/configure
-@@ -1539,6 +1539,10 @@ for opt do
+@@ -1601,6 +1601,10 @@ for opt do
    ;;
-   --disable-plugins) plugins="no"
+   --gdb=*) gdb_bin="$optarg"
    ;;
 +  --enable-libudev) libudev=yes
 +  ;;
index bedf363c5dabe2a2acc7b4589cff103bbb7f7d88..afeb2738b769c89cf91273f9f7b15602f5f3f873 100644 (file)
@@ -1,4 +1,4 @@
-From 296215421441b73bc6eb487f1d4e7e15e0510a77 Mon Sep 17 00:00:00 2001
+From 3f07c9cb96b361f07ce637088f818bbe0edbcde3 Mon Sep 17 00:00:00 2001
 From: Yousong Zhou <yszhou4tech@gmail.com>
 Date: Fri, 7 Feb 2020 03:02:44 +0800
 Subject: [PATCH] configure: enable guest_agent no matter whether softmmu is
@@ -13,10 +13,10 @@ Fixes a512590 ("configure: qemu-ga is only needed with softmmu targets")
  1 file changed, 1 insertion(+), 1 deletion(-)
 
 diff --git a/configure b/configure
-index efe06f3c2b..552d16ca8f 100755
+index cf3f8ffdd7..b4af83a01f 100755
 --- a/configure
 +++ b/configure
-@@ -6246,7 +6246,7 @@ fi
+@@ -6414,7 +6414,7 @@ fi
  # Probe for guest agent support/options
  
  if [ "$guest_agent" != "no" ]; then
index c7b2f92ae288a6636b36d85771b151dc6b77d2bd..52c4b3b39c754790a9a00af00f64cd3a8a1f84da 100644 (file)
@@ -1,4 +1,4 @@
-From 3ac531a6bdeecbe40741a76f1dc2b7fa6c11f8ef Mon Sep 17 00:00:00 2001
+From 26dd9766757895c04b33a89865e3886f18146332 Mon Sep 17 00:00:00 2001
 From: Yousong Zhou <yszhou4tech@gmail.com>
 Date: Sat, 24 Feb 2018 13:45:25 +0800
 Subject: [PATCH] disas: fix compilation failure when isnan is a macro
index a3846b373af3398b055887b88c2bf391ba1c0aca..7785bd2d9eb7e6d98d96d98c55e245672a7fe753 100644 (file)
@@ -1,4 +1,4 @@
-From b6223a90ebbb5729e41b4fcb3bc9ac309ec04784 Mon Sep 17 00:00:00 2001
+From 905f3b7b6115f303f964b5aa1d3bc9bdae9d5bec Mon Sep 17 00:00:00 2001
 From: Yousong Zhou <yszhou4tech@gmail.com>
 Date: Sat, 24 Feb 2018 13:46:31 +0800
 Subject: [PATCH] pc-bios: fix compilation when $(AS) is actually gcc driver
diff --git a/utils/qemu/patches/0006-slirp-ipreass-fix-use-after-free.patch b/utils/qemu/patches/0006-slirp-ipreass-fix-use-after-free.patch
deleted file mode 100644 (file)
index 45f37d3..0000000
+++ /dev/null
@@ -1,46 +0,0 @@
-From c59279437eda91841b9d26079c70b8a540d41204 Mon Sep 17 00:00:00 2001
-From: Samuel Thibault <samuel.thibault@ens-lyon.org>
-Date: Mon, 26 Aug 2019 00:55:03 +0200
-Subject: [PATCH] ip_reass: Fix use after free
-
-Using ip_deq after m_free might read pointers from an allocation reuse.
-
-This would be difficult to exploit, but that is still related with
-CVE-2019-14378 which generates fragmented IP packets that would trigger this
-issue and at least produce a DoS.
-
-Signed-off-by: Samuel Thibault <samuel.thibault@ens-lyon.org>
----
-Taken from https://gitlab.freedesktop.org/slirp/libslirp/commit/c5927943
-
- slirp/src/ip_input.c | 6 ++++--
- 1 file changed, 4 insertions(+), 2 deletions(-)
-
-diff --git a/slirp/src/ip_input.c b/slirp/src/ip_input.c
-index 7364ce0..aa514ae 100644
---- a/slirp/src/ip_input.c
-+++ b/slirp/src/ip_input.c
-@@ -292,6 +292,7 @@ static struct ip *ip_reass(Slirp *slirp, struct ip *ip, struct ipq *fp)
-      */
-     while (q != (struct ipasfrag *)&fp->frag_link &&
-            ip->ip_off + ip->ip_len > q->ipf_off) {
-+        struct ipasfrag *prev;
-         i = (ip->ip_off + ip->ip_len) - q->ipf_off;
-         if (i < q->ipf_len) {
-             q->ipf_len -= i;
-@@ -299,9 +300,10 @@ static struct ip *ip_reass(Slirp *slirp, struct ip *ip, struct ipq *fp)
-             m_adj(dtom(slirp, q), i);
-             break;
-         }
-+        prev = q;
-         q = q->ipf_next;
--        m_free(dtom(slirp, q->ipf_prev));
--        ip_deq(q->ipf_prev);
-+        ip_deq(prev);
-+        m_free(dtom(slirp, prev));
-     }
- insert:
--- 
-2.22.0
-
index 53eaf08cd962ef0130e0f562dc38f4c1ca2b256c..2cc566e1b3bdc0fd27ce32cda22ba08c66d61c19 100644 (file)
@@ -1,4 +1,4 @@
-From f385b623c14b5208df88b0be479a9ab30ab68c72 Mon Sep 17 00:00:00 2001
+From e1e0a76305927290d75b4aae56f1ed89d83da741 Mon Sep 17 00:00:00 2001
 From: Yousong Zhou <yszhou4tech@gmail.com>
 Date: Mon, 30 Mar 2020 12:48:58 +0800
 Subject: [PATCH] util/mmap-alloc: fix missing MAP_SYNC