diff options
author | jmbills <jason.m.bills@intel.com> | 2021-10-04 22:42:48 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-10-04 22:42:48 +0300 |
commit | 0c9e31989c615598b5d042ffab385606660c93c0 (patch) | |
tree | 8019999b0ca042482e5193d6cabc06220c71d776 /poky/meta/recipes-devtools/qemu | |
parent | 04cd92067d2481643df5010cb39b2134b648cf4d (diff) | |
parent | ffe6d597d9e3d4407cf8062b5d6505a80ce08f41 (diff) | |
download | openbmc-0c9e31989c615598b5d042ffab385606660c93c0.tar.xz |
Update
Diffstat (limited to 'poky/meta/recipes-devtools/qemu')
8 files changed, 71 insertions, 29 deletions
diff --git a/poky/meta/recipes-devtools/qemu/nativesdk-qemu-helper_1.0.bb b/poky/meta/recipes-devtools/qemu/nativesdk-qemu-helper_1.0.bb index ca1ad964d..08c5ca770 100644 --- a/poky/meta/recipes-devtools/qemu/nativesdk-qemu-helper_1.0.bb +++ b/poky/meta/recipes-devtools/qemu/nativesdk-qemu-helper_1.0.bb @@ -1,6 +1,6 @@ SUMMARY = "Qemu helper scripts" LICENSE = "GPLv2" -RDEPENDS_${PN} = "nativesdk-qemu \ +RDEPENDS:${PN} = "nativesdk-qemu \ nativesdk-python3-shell nativesdk-python3-fcntl nativesdk-python3-logging \ " diff --git a/poky/meta/recipes-devtools/qemu/qemu-helper-native_1.0.bb b/poky/meta/recipes-devtools/qemu/qemu-helper-native_1.0.bb index 2fc07669d..ccf1c4678 100644 --- a/poky/meta/recipes-devtools/qemu/qemu-helper-native_1.0.bb +++ b/poky/meta/recipes-devtools/qemu/qemu-helper-native_1.0.bb @@ -1,6 +1,6 @@ SUMMARY = "Helper utilities needed by the runqemu script" LICENSE = "GPLv2" -RDEPENDS_${PN} = "qemu-system-native" +RDEPENDS:${PN} = "qemu-system-native" PR = "r1" LIC_FILES_CHKSUM = "file://${WORKDIR}/tunctl.c;endline=4;md5=ff3a09996bc5fff6bc5d4e0b4c28f999" diff --git a/poky/meta/recipes-devtools/qemu/qemu-native.inc b/poky/meta/recipes-devtools/qemu/qemu-native.inc index 54e49d8bc..5d3ba3486 100644 --- a/poky/meta/recipes-devtools/qemu/qemu-native.inc +++ b/poky/meta/recipes-devtools/qemu/qemu-native.inc @@ -2,10 +2,10 @@ require qemu.inc inherit native -EXTRA_OEMAKE_append = " LD='${LD}' AR='${AR}' OBJCOPY='${OBJCOPY}' LDFLAGS='${LDFLAGS}'" +EXTRA_OEMAKE:append = " LD='${LD}' AR='${AR}' OBJCOPY='${OBJCOPY}' LDFLAGS='${LDFLAGS}'" -LDFLAGS_append = " -fuse-ld=bfd" +LDFLAGS:append = " -fuse-ld=bfd" -do_install_append() { +do_install:append() { ${@bb.utils.contains('PACKAGECONFIG', 'gtk+', 'make_qemu_wrapper', '', d)} } diff --git a/poky/meta/recipes-devtools/qemu/qemu-native_6.0.0.bb b/poky/meta/recipes-devtools/qemu/qemu-native_6.0.0.bb index d23d7a8ad..d9ef15556 100644 --- a/poky/meta/recipes-devtools/qemu/qemu-native_6.0.0.bb +++ b/poky/meta/recipes-devtools/qemu/qemu-native_6.0.0.bb @@ -4,6 +4,6 @@ DEPENDS = "glib-2.0-native zlib-native" require qemu-native.inc -EXTRA_OECONF_append = " --target-list=${@get_qemu_usermode_target_list(d)} --disable-tools --disable-blobs --disable-guest-agent" +EXTRA_OECONF:append = " --target-list=${@get_qemu_usermode_target_list(d)} --disable-tools --disable-blobs --disable-guest-agent" PACKAGECONFIG ??= "pie" diff --git a/poky/meta/recipes-devtools/qemu/qemu-system-native_6.0.0.bb b/poky/meta/recipes-devtools/qemu/qemu-system-native_6.0.0.bb index 9d7d0cdce..1c12eb7cf 100644 --- a/poky/meta/recipes-devtools/qemu/qemu-system-native_6.0.0.bb +++ b/poky/meta/recipes-devtools/qemu/qemu-system-native_6.0.0.bb @@ -9,16 +9,16 @@ require qemu-native.inc # and avoid file clashes DEPENDS = "glib-2.0-native zlib-native pixman-native qemu-native bison-native" -EXTRA_OECONF_append = " --target-list=${@get_qemu_system_target_list(d)}" +EXTRA_OECONF:append = " --target-list=${@get_qemu_system_target_list(d)}" PACKAGECONFIG ??= "fdt alsa kvm pie \ ${@bb.utils.contains('DISTRO_FEATURES', 'opengl', 'virglrenderer glx', '', d)} \ " # Handle distros such as CentOS 5 32-bit that do not have kvm support -PACKAGECONFIG_remove = "${@'kvm' if not os.path.exists('/usr/include/linux/kvm.h') else ''}" +PACKAGECONFIG:remove = "${@'kvm' if not os.path.exists('/usr/include/linux/kvm.h') else ''}" -do_install_append() { +do_install:append() { install -Dm 0755 ${WORKDIR}/powerpc_rom.bin ${D}${datadir}/qemu # The following is also installed by qemu-native diff --git a/poky/meta/recipes-devtools/qemu/qemu.inc b/poky/meta/recipes-devtools/qemu/qemu.inc index 33a8baea7..76e8da159 100644 --- a/poky/meta/recipes-devtools/qemu/qemu.inc +++ b/poky/meta/recipes-devtools/qemu/qemu.inc @@ -6,7 +6,7 @@ a variety of guest operating systems" HOMEPAGE = "http://qemu.org" LICENSE = "GPLv2 & LGPLv2.1" -RDEPENDS_${PN}-ptest = "bash" +RDEPENDS:${PN}-ptest = "bash" require qemu-targets.inc inherit pkgconfig ptest @@ -39,13 +39,14 @@ SRC_URI = "https://download.qemu.org/${BPN}-${PV}.tar.xz \ file://0001-linux-user-Tag-vsx-with-ieee128-fpbits.patch \ file://CVE-2021-3527-1.patch \ file://CVE-2021-3527-2.patch \ + file://CVE-2021-3682.patch \ " UPSTREAM_CHECK_REGEX = "qemu-(?P<pver>\d+(\.\d+)+)\.tar" SRC_URI[sha256sum] = "87bc1a471ca24b97e7005711066007d443423d19aacda3d442558ae032fa30b9" -SRC_URI_append_class-target = " file://cross.patch" -SRC_URI_append_class-nativesdk = " file://cross.patch" +SRC_URI:append:class-target = " file://cross.patch" +SRC_URI:append:class-nativesdk = " file://cross.patch" # Applies against virglrender < 0.6.0 and not qemu itself CVE_CHECK_WHITELIST += "CVE-2017-5957" @@ -58,14 +59,14 @@ CVE_CHECK_WHITELIST += "CVE-2007-0998" # https://bugzilla.redhat.com/show_bug.cgi?id=1609015#c11 CVE_CHECK_WHITELIST += "CVE-2018-18438" -COMPATIBLE_HOST_mipsarchn32 = "null" -COMPATIBLE_HOST_mipsarchn64 = "null" +COMPATIBLE_HOST:mipsarchn32 = "null" +COMPATIBLE_HOST:mipsarchn64 = "null" # Per https://lists.nongnu.org/archive/html/qemu-devel/2020-09/msg03873.html # upstream states qemu doesn't work without optimization DEBUG_BUILD = "0" -do_install_append() { +do_install:append() { # Prevent QA warnings about installed ${localstatedir}/run if [ -d ${D}${localstatedir}/run ]; then rmdir ${D}${localstatedir}/run; fi } @@ -110,9 +111,9 @@ export LIBTOOL="${HOST_SYS}-libtool" B = "${WORKDIR}/build" -#EXTRA_OECONF_append = " --python=${HOSTTOOLS_DIR}/python3" +#EXTRA_OECONF:append = " --python=${HOSTTOOLS_DIR}/python3" -do_configure_prepend_class-native() { +do_configure:prepend:class-native() { # Append build host pkg-config paths for native target since the host may provide sdl BHOST_PKGCONFIG_PATH=$(PATH=/usr/bin:/bin pkg-config --variable pc_path pkg-config || echo "") if [ ! -z "$BHOST_PKGCONFIG_PATH" ]; then @@ -136,7 +137,7 @@ do_install () { # This will trigger a MMU access fault in the virtual CPU. With this change, # the qemu-mips works fine. # IMPORTANT: This piece needs to be removed once the root cause is fixed! -do_install_append() { +do_install:append() { if [ -e "${D}/${bindir}/qemu-mips" ]; then create_wrapper ${D}/${bindir}/qemu-mips \ QEMU_RESERVED_VA=0x0 @@ -156,8 +157,8 @@ make_qemu_wrapper() { } # Disable kvm/virgl/mesa on targets that do not support it -PACKAGECONFIG_remove_darwin = "kvm virglrenderer glx gtk+" -PACKAGECONFIG_remove_mingw32 = "kvm virglrenderer glx gtk+" +PACKAGECONFIG:remove:darwin = "kvm virglrenderer glx gtk+" +PACKAGECONFIG:remove:mingw32 = "kvm virglrenderer glx gtk+" PACKAGECONFIG[sdl] = "--enable-sdl,--disable-sdl,libsdl2" PACKAGECONFIG[virtfs] = "--enable-virtfs --enable-attr --enable-cap-ng,--disable-virtfs,libcap-ng attr," @@ -203,6 +204,6 @@ PACKAGECONFIG[ust] = "--enable-trace-backend=ust,--enable-trace-backend=nop,lttn PACKAGECONFIG[pie] = "--enable-pie,--disable-pie,," PACKAGECONFIG[seccomp] = "--enable-seccomp,--disable-seccomp,libseccomp" -INSANE_SKIP_${PN} = "arch" +INSANE_SKIP:${PN} = "arch" -FILES_${PN} += "${datadir}/icons" +FILES:${PN} += "${datadir}/icons" diff --git a/poky/meta/recipes-devtools/qemu/qemu/CVE-2021-3682.patch b/poky/meta/recipes-devtools/qemu/qemu/CVE-2021-3682.patch new file mode 100644 index 000000000..50a49233d --- /dev/null +++ b/poky/meta/recipes-devtools/qemu/qemu/CVE-2021-3682.patch @@ -0,0 +1,41 @@ +From 5e796671e6b8d5de4b0b423dce1b3eba144a92c9 Mon Sep 17 00:00:00 2001 +From: Gerd Hoffmann <kraxel@redhat.com> +Date: Thu, 22 Jul 2021 09:27:56 +0200 +Subject: [PATCH] usbredir: fix free call +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +data might point into the middle of a larger buffer, there is a separate +free_on_destroy pointer passed into bufp_alloc() to handle that. It is +only used in the normal workflow though, not when dropping packets due +to the queue being full. Fix that. + +Resolves: https://gitlab.com/qemu-project/qemu/-/issues/491 +Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> +Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com> +Message-Id: <20210722072756.647673-1-kraxel@redhat.com> + +CVE: CVE-2021-3682 +Upstream-Status: Backport [5e796671e6b8d5de4b0b423dce1b3eba144a92c9] +Signed-off-by: Sakib Sajal <sakib.sajal@windriver.com> +--- + hw/usb/redirect.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/hw/usb/redirect.c b/hw/usb/redirect.c +index 4ec9326e05..1ec909a63a 100644 +--- a/hw/usb/redirect.c ++++ b/hw/usb/redirect.c +@@ -476,7 +476,7 @@ static int bufp_alloc(USBRedirDevice *dev, uint8_t *data, uint16_t len, + if (dev->endpoint[EP2I(ep)].bufpq_dropping_packets) { + if (dev->endpoint[EP2I(ep)].bufpq_size > + dev->endpoint[EP2I(ep)].bufpq_target_size) { +- free(data); ++ free(free_on_destroy); + return -1; + } + dev->endpoint[EP2I(ep)].bufpq_dropping_packets = 0; +-- +2.25.1 + diff --git a/poky/meta/recipes-devtools/qemu/qemu_6.0.0.bb b/poky/meta/recipes-devtools/qemu/qemu_6.0.0.bb index 90b135a61..f8a816b12 100644 --- a/poky/meta/recipes-devtools/qemu/qemu_6.0.0.bb +++ b/poky/meta/recipes-devtools/qemu/qemu_6.0.0.bb @@ -4,17 +4,17 @@ require qemu.inc # error: a parameter list without types is only allowed in a function definition # void (*_function)(sigval_t); -COMPATIBLE_HOST_libc-musl = 'null' +COMPATIBLE_HOST:libc-musl = 'null' DEPENDS = "glib-2.0 zlib pixman bison-native ninja-native meson-native" -RDEPENDS_${PN}_class-target += "bash" +RDEPENDS:${PN}:class-target += "bash" -EXTRA_OECONF_append_class-target = " --target-list=${@get_qemu_target_list(d)}" -EXTRA_OECONF_append_class-target_mipsarcho32 = "${@bb.utils.contains('BBEXTENDCURR', 'multilib', ' --disable-capstone', '', d)}" -EXTRA_OECONF_append_class-nativesdk = " --target-list=${@get_qemu_target_list(d)}" +EXTRA_OECONF:append:class-target = " --target-list=${@get_qemu_target_list(d)}" +EXTRA_OECONF:append:class-target:mipsarcho32 = "${@bb.utils.contains('BBEXTENDCURR', 'multilib', ' --disable-capstone', '', d)}" +EXTRA_OECONF:append:class-nativesdk = " --target-list=${@get_qemu_target_list(d)}" -do_install_append_class-nativesdk() { +do_install:append:class-nativesdk() { ${@bb.utils.contains('PACKAGECONFIG', 'gtk+', 'make_qemu_wrapper', '', d)} } @@ -24,6 +24,6 @@ PACKAGECONFIG ??= " \ ${@bb.utils.contains('DISTRO_FEATURES', 'opengl', 'virglrenderer glx', '', d)} \ ${@bb.utils.filter('DISTRO_FEATURES', 'seccomp', d)} \ " -PACKAGECONFIG_class-nativesdk ??= "fdt sdl kvm pie \ +PACKAGECONFIG:class-nativesdk ??= "fdt sdl kvm pie \ ${@bb.utils.contains('DISTRO_FEATURES', 'opengl', 'virglrenderer glx', '', d)} \ " |