aboutsummaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools/qemu
AgeCommit message (Collapse)Author
2019-10-06qemu: fix build issue on new hosts with glibc 2.30Armin Kuster
This fixes the following error: TOPDIR/tmp/work/x86_64-linux/qemu-native/3.1.0-r0/qemu-3.1.0/linux-user/syscall.c:254:16: error: static declaration of ‘gettid’ follows non-static declaration 254 | _syscall0(int, gettid) | ^~~~~~ TOPDIR/tmp/work/x86_64-linux/qemu-native/3.1.0-r0/qemu-3.1.0/linux-user/syscall.c:185:13: note: in definition of macro ‘_syscall0’ 185 | static type name (void) \ | ^~~~ In file included from /usr/include/unistd.h:1170, from TOPDIR/tmp/work/x86_64-linux/qemu-native/3.1.0-r0/qemu-3.1.0/include/qemu/osdep.h:90, from TOPDIR/tmp/work/x86_64-linux/qemu-native/3.1.0-r0/qemu-3.1.0/linux-user/syscall.c:20: /usr/include/bits/unistd_ext.h:34:16: note: previous declaration of ‘gettid’ was here 34 | extern __pid_t gettid (void) __THROW; | ^~~~~~ Signed-off-by: Armin Kuster <akuster808@gmail.com>
2019-10-05qemu: Fix 4 CVEsDan Tran
Fixes CVE-2018-18954, CVE-2019-3812, CVE-2019-6778, and CVE-2019-8934. Also deleted duplicated patch and cleanup. Signed-off-by: Dan Tran <dantran@microsoft.com> [fixup for thud-next] Signed-off-by: Armin Kuster <akuster808@gmail.com>
2019-08-16qemu: add a patch fixing the native build on newer kernelsBartosz Golaszewski
The build fails on qemu-native if we're using kernels after commit 0768e17073dc527ccd18ed5f96ce85f9985e9115. This adds an upstream patch that fixes the issue. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> [Refactoried for thud context] Signed-off-by: Armin Kuster <akuster808@gmail.com>
2019-07-04qemu: Security fixes CVE-2018-20815 CVE-2019-9824Armin Kuster
Source: qemu.org MR: 98623 Type: Security Fix Disposition: Backport from qemu.org ChangeID: 03b3f28e5860ef1cb9f58dce89f252bd7ed59f37 Description: Fixes both CVE-2018-20815 and CVE-2019-9824 Signed-off-by: Armin Kuster <akuster@mvista.com> Signed-off-by: Armin Kuster <akuster808@gmail.com>
2019-06-25qemu: Security fix for CVE-2019-12155Armin Kuster
Source: qemu.org MR: 98382 Type: Security Fix Disposition: Backport from https://git.qemu.org/?p=qemu.git;a=commit;h=d52680fc932efb8a2f334cc6993e705ed1e31e99 ChangeID: e4e5983ec1fa489eb8a0db08d1afa0606e59dde3 Description: Fixes CVE-2019-12155 Affects: <= 4.0.0 Signed-off-by: Armin Kuster <akuster@mvista.com>
2019-06-25qemu: Security fix for CVE-2018-19489Armin Kuster
Source: Qemu.org MR: 97453 Type: Security Fix Disposition: Backport from git.qemu.org/gemu.git ChangeID: a06fcb432d447cec2ed1caf112822dd1b4831ace Description: In the spirt of YP Compatible, sending change upstream. fixes CVE CVE-2018-19489 Affect < = 4.0.0 Signed-off-by: Armin Kuster <akuster@mvista.com> Signed-off-by: Armin Kuster <akuster808@gmail.com>
2019-06-01qemu: Several CVE fixesArmin Kuster
Source: qemu.org MR: 97258, 97342, 97438, 97443 Type: Security Fix Disposition: Backport from git.qemu.org/qemu.git ChangeID: a5e9fd03ca5bebc880dcc3c4567e10a9ae47dba5 Description: These issues affect qemu < 3.1.0 Fixes: CVE-2018-16867 CVE-2018-16872 CVE-2018-18849 CVE-2018-19364 Signed-off-by: Armin Kuster <akuster@mvista.com> Signed-off-by: Armin Kuster <akuster808@gmail.com>
2018-11-06qemu: fix for CVE-2018-10839Changqing Li
Signed-off-by: Changqing Li <changqing.li@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-10-16qemu: fix CVE-2018-17958/17962/17963Changqing Li
Signed-off-by: Changqing Li <changqing.li@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-09-21qemu-targets.inc: Mark 'lm32' as softmmu only architectureNathan Rossi
The lm32 architecture does not support linux-user within QEMU as it is not a Linux supported target. Signed-off-by: Nathan Rossi <nathan@nathanrossi.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2018-09-11qemu: patch for CVE-2018-15746Changqing Li
Signed-off-by: Changqing Li <changqing.li@windriver.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2018-09-06qemu: fix upstream version checkAlexander Kanavin
Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-08-16qemu: Upgrade QEMU 2.12 -> 3.0Alistair Francis
Signed-off-by: Alistair Francis <alistair.francis@wdc.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-07-02qemu: Add RISC-V supportAlistair Francis
Signed-off-by: Alistair Francis <alistair.francis@wdc.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2018-06-27qemu: CVE-2018-11806 slirp heap buffer overflowJeremy Puhlman
Signed-off-by: Jeremy Puhlman <jpuhlman@mvista.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2018-06-18package_manager.py: rework postinst_intercept failuresAlexander Kanavin
Previously a warning was printed regardless of context and nature of the failure, and because it was only a warning, it was mostly ignored. Now, the following is considered when a failure happens: 1) whether we are installing packages into a target image, or populating a SDK with host or target packages. 2) whether the failure was due to qemu not supporting the target machine. Accordingly, warnings, notes, and failures are printed, and postponing to first boot happens if possible. Signed-off-by: Alexander Kanavin <alexander.kanavin@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-06-18qemuwrapper-cross: enable multilib and nativesdk variants of the scriptAlexander Kanavin
Previously only one global variant of the script was created, which caused numerous issues: 1) multilib was not properly supported due to multilib variants each needing their own version of the qemu binary and library paths to be set 2) nativesdk was not properly supported for the same reason This patch also moves setting LD_LIBRARY_PATH directly into the recipe, as passing it down from other recipes did not work when said recipes were allarch, and adjusts calls to qemuwrapper from postinst-intercepts, so that its correct variant is selected. Also, the various qemu fallbacks in qemuwrapper script are all removed, as they are no longer necessary. Signed-off-by: Alexander Kanavin <alexander.kanavin@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-06-15qemu: don't inherit autotoolsRoss Burton
qemu doesn't use autotools, so don't inherit it and just call 'make install' directly. No need to alter makefiles anymore, as they appear to respect CFLAGS now. Remove a chmod of beginend_funcs.sh (a file we patched in, and removed, many years ago). Signed-off-by: Ross Burton <ross.burton@intel.com>
2018-06-04qemu: use sdl2 instead of sdl1Martin Jansa
* sdl1 since qemu-2.12.0 depends on x11 in DISTRO_FEATURES, switch to sdl2 Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-06-04qemu: add PACKAGECONFIG for virglrenderer, usb-redir and spiceMartin Jansa
* drop "fdt sdl" listed twice in PACKAGECONFIG * keep all 3 disabled by default * spice, usbredir recipes will eventually be in meta-networking layer (you can use jansa/spice branch from meta-openembedded-contrib repository) * virglrenderer recipe will eventually be in oe-core layer (you can use jansa/qemu branch from openembedded-core-contrib repository) Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-06-04qemu: upgrade to 2.12.0Martin Jansa
* drop patches which are now included upstream * revert "linux-user: fix mmap/munmap/mprotect/mremap/shma" which is causing 0010-linux-user-Fix-webkitgtk-hangs-on-32-bit-x86-target.patch to stop working and qemu-i386 hanging during gobject-introspection in webkitgtk when building for qemux86 with musl Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-06-03qemu: refresh patches with devtool and make them applicable with gitMartin Jansa
Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-05-04qemu: fix CVE-2017-16845Hongxu Jia
During Qemu guest migration, a destination process invokes ps2 post_load function. In that, if 'rptr' and 'count' values were invalid, it could lead to OOB access or infinite loop issue. Add check to avoid it. Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2018-04-18qemu_2.11.1.bb: support mingw buildJuro Bystricky
The patch chardev-connect-socket-to-a-spawned-command.patch calls "socketpair". This function is missing in mingw, so the patch needs to be modified accordingly (by conditional compilation using _WIN32 macro where appropriate), otherwise we end up with a broken mingw build. While it is possible to simply remove the whole patch for mingw build (via a .bbappend file in meta-mingw), it makes more sense to modify the patch itself. Signed-off-by: Juro Bystricky <juro.bystricky@intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2018-04-03qemu: do not hardcode python2.7 pathRuslan Ruslichenko
It can be installed to some non standard path in which case build will be broken. As python2.7 is specified in HOSTTOOLS we can rely that it is present in the PATH, so no need to hardcode it to /usr/bin. Signed-off-by: Ruslan Ruslichenko <rruslich@cisco.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-03-30qemu: actually use the aarch64 patchRoss Burton
Signed-off-by: Ross Burton <ross.burton@intel.com>
2018-03-28qemu: fix qemuarm64 intermediate kernel hang in raid6_select_algo funcVictor Kamensky
Backport fix from qemu mainline for intermediate qemuarm64 hang issue. Root caused in OE environment, issue with aarch64 qemu logic of executing instructions that reenabe interrupts. See patch commit message for more details. Upstream-Status: Backport Signed-off-by: Victor Kamensky <kamensky@cisco.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2018-03-11qemu: drop already applied glibc-2.25.patchAlexander Kanavin
Due to patch fuzz it was applied again in a different place. Signed-off-by: Alexander Kanavin <alexander.kanavin@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2018-03-11qemu: refresh patchesRoss Burton
The patch tool will apply patches by default with "fuzz", which is where if the hunk context isn't present but what is there is close enough, it will force the patch in. Whilst this is useful when there's just whitespace changes, when applied to source it is possible for a patch applied with fuzz to produce broken code which still compiles (see #10450). This is obviously bad. We'd like to eventually have do_patch() rejecting any fuzz on these grounds. For that to be realistic the existing patches with fuzz need to be rebased and reviewed. Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Alexander Kanavin <alexander.kanavin@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2018-02-24recipes-devtools: Bump QEMU to 2.11.1Alistair Francis
Bump the QEMU version to the bug fix release of 2.11.1 and remove the patches that are no longer required. Signed-off-by: Alistair Francis <alistair.francis@xilinx.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2018-02-22nativesdk-qemu-helper: add a missing nativesdk-python3-logging dependencyAlexander Kanavin
[YOCTO #12545] Signed-off-by: Alexander Kanavin <alexander.kanavin@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2018-02-16qemu: fix CVE-2017-15124Ross Burton
VNC server implementation in Quick Emulator (QEMU) 2.11.0 and older was found to be vulnerable to an unbounded memory allocation issue, as it did not throttle the framebuffer updates sent to its client. If the client did not consume these updates, VNC server allocates growing memory to hold onto this data. A malicious remote VNC client could use this flaw to cause DoS to the server host. Backport a series of patches from upstream to resolve this. Signed-off-by: Ross Burton <ross.burton@intel.com>
2018-02-06qemu: fix memfd_create with glibc 2.27Ross Burton
glibc 2.27 has added memfd_create() but this conflicts with a copy in qemu, so take a patch from upstream to fix building with glibc 2.27. Signed-off-by: Ross Burton <ross.burton@intel.com>
2018-01-20python: fix RDEPENDS on several recipes, due to non-existent packagesAlejandro Hernandez
The packaging has been altered slightly so ensure the dependencies are all still valid. Signed-off-by: Alejandro Hernandez <alejandro.hernandez@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2018-01-18qemu: Bump to version 2.11.0Alistair Francis
Use the latest QEMU release 2.11. Remove all patches that are no longer required as they have been merged into the 2.11 releaese. One patch had to be updated to apply to the 2.11 tree. This also applies a linux user patch to avoid webkitgtk build hangs. Signed-off-by: Alistair Francis <alistair.francis@xilinx.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-01-14qemu: CVE-2017-17381Catalin Enache
The Virtio Vring implementation in QEMU allows local OS guest users to cause a denial of service (divide-by-zero error and QEMU process crash) by unsetting vring alignment while updating Virtio rings. Reference: https://nvd.nist.gov/vuln/detail/CVE-2017-17381 Upstream patch: https://git.qemu.org/?p=qemu.git;a=commitdiff;h=758ead31c7e17bf17a9ef2e0ca1c3e86ab296b43 Signed-off-by: Catalin Enache <catalin.enache@windriver.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2018-01-13qemu-2.10.1.bb: support mingw buildJuro Bystricky
The patch chardev-connect-socket-to-a-spawned-command.patch calls "socketpair". This function is missing in mingw, so the patch needs to be modified accordingly, otherwise we end up with a broken mingw build. While it is possible to simply remove the patch on a recipe level for mingw platform, it makes more sense to modify the patch itself. Signed-off-by: Juro Bystricky <juro.bystricky@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-12-10qemu: use upstream swtpm supportPatrick Ohly
Upstream finally accepted and merged a different approach for connecting QEMU to swtpm: instead of a custom cuse-tpm device, a normal chardev connects to swtpm, and that chardev then is used by the TPM device. For now we have to backport those patches, but the next major QEMU update will have them. However, the chardev-connect-socket-to-a-spawned-command.patch is something that OE will have to carry permanently. It simplifies starting and stopping swtpm when invoking QEMU through runqemu without having to teach that script about the additional process. Upstream rejected the patch because they want to keep the complexity of starting additional processes out of QEMU. A recent enough swtpm is needed. The one currently used by meta-security fails to communicate properly with QEMU, leading to this failure: qemu-system-x86_64: -tpmdev emulator,id=tpm0,chardev=chrtpm0: tpm-emulator: Failed to send CMD_SET_DATAFD: Input/output error qemu-system-x86_64: -tpmdev emulator,id=tpm0,chardev=chrtpm0: tpm-emulator: Could not cleanly shutdown the TPM: Invalid argument With a recent enough swtpm, one can create a TPM device like this: - bitbake swtpm-native - create a TPM instance and initialize it with: $ mkdir -p my-machine/myvtpm0 $ tmp*/work/*/swtpm-wrappers-native/*/swtpm_setup_oe.sh --tpm-state my-machine/myvtpm0 --createek Starting vTPM manufacturing as root:root @ Wed 06 Dec 2017 10:03:14 AM CET TPM is listening on TCP port 34613. Successfully created EK. Successfully authored TPM state. Ending vTPM manufacturing @ Wed 06 Dec 2017 10:03:14 AM CET - runqemu "qemuparams=-chardev 'socket,id=chrtpm0,cmd=exec swtpm_oe.sh socket --terminate --ctrl type=unixio,,clientfd=0 --tpmstate dir=... --log level=10,,file=.../swtpm.log --tpm2' -tpmdev emulator,id=tpm0,chardev=chrtpm0 -device tpm-tis,tpmdev=tpm0" ... Beware that the double commas are intentional. They are needed to embed commas in the "cmd" value. swtpm_oe.sh is from swtpm-wrappers-native. In the example it is invoked without the full path for the sake of brevity. In practice, one has to use the full path (tmp*/work/*/swtpm-wrappers-native/*/swtpm_oe.sh). With the TPM2-preview version of swtpm, the same works for TPM2 by adding the --tpm2 parameter when invoking swtpm_setup_oe.sh and swtpm_oe.sh. Signed-off-by: Patrick Ohly <patrick.ohly@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-12-09qemu: fix the makefile for ptestJackie Huang
It always fail to check the file generated by configure when running ptest on the target since it's cross-compiling, so remove the check from the Makefile for ptest. Signed-off-by: Jackie Huang <jackie.huang@windriver.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2017-11-21qemu: Add patch to avoid qemuppc boot hangsRichard Purdie
qemuppc boots are occasionally hanging on the autobuilder. This adds a patch which fixes the issue in local testing. Its being discussed with upstream qemu. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-11-08qemu: upgrade to 2.10.1Leonardo Sandoval
All CVE patches removed because these are already integrated in 2.10.1. Signed-off-by: Leonardo Sandoval <leonardo.sandoval.gonzalez@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2017-09-22qemu: Security fixesYi Zhao
Fix CVE-2017-13672, CVE-2017-13673, CVE-2017-13711, CVE-2017-14167 References: https://nvd.nist.gov/vuln/detail/CVE-2017-13672 https://nvd.nist.gov/vuln/detail/CVE-2017-13673 https://nvd.nist.gov/vuln/detail/CVE-2017-13711 https://nvd.nist.gov/vuln/detail/CVE-2017-14167 Patches from: CVE-2017-13672: https://git.qemu.org/?p=qemu.git;a=commit;h=3d90c6254863693a6b13d918d2b8682e08bbc681 CVE-2017-13673: https://git.qemu.org/?p=qemu.git;a=commit;h=e65294157d4b69393b3f819c99f4f647452b48e3 CVE-2017-13711: https://git.qemu.org/?p=qemu.git;a=commit;h=1201d308519f1e915866d7583d5136d03cc1d384 CVE-2017-14167: https://git.qemu.org/?p=qemu.git;a=commit;h=ed4f86e8b6eff8e600c69adee68c7cd34dd2cccb Signed-off-by: Yi Zhao <yi.zhao@windriver.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2017-09-22qemu: remove unused patchesYi Zhao
Remove the following patches since they are unused after qemu update to 2.10: 0001-replace-struct-ucontext-with-ucontext_t-type.patch CVE-2016-9908.patch CVE-2016-9912.patch configure-fix-Darwin-target-detection.patch Signed-off-by: Yi Zhao <yi.zhao@windriver.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2017-09-21devtools: qemu: Remove obsolete '--with-system-pixman' optionAlistair Francis
QEMU version 2.11 will remove the pixman submodule. This means users are always required to supply pixman from the system if building softmmu support in QEMU. Without specifying a pixman configure option QEMU will default to using the system pixman if it is avaliable. In which case let's remove the config option as it is no longer supported in recent commits and is not required in older builds as the configure system defaults are already using system pixman. Signed-off-by: Alistair Francis <alistair.francis@xilinx.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2017-09-21qemuwrapper-cross: Add HOMEPAGE info into recipe file.Huang Qiyu
Signed-off-by: Huang Qiyu <huangqy.fnst@cn.fujitsu.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2017-08-31qemu: upgrade to version 2.10.0Juro Bystricky
Remove recipes for older versions. Remove patches no longer needed. Modify the patch "add-ptest-in-makefile.patch" for version 2.10.0 Signed-off-by: Juro Bystricky <juro.bystricky@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-08-27qemu: fix upstream version checkAlexander Kanavin
Signed-off-by: Alexander Kanavin <alexander.kanavin@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-08-19qemu: backport patches to fix boot failureChen Qi
Backport two patches to fix the following error when booting qemu. Failed to unlock byte 100 Signed-off-by: Chen Qi <Qi.Chen@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-08-16qemu: upgrade to 2.10-rc2Juro Bystricky
In order to support Nios2 emulation by QEMU, we need at least QEMU version 2.9. Signed-off-by: Juro Bystricky <juro.bystricky@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-08-11qemu: apic: fallthrough to PICHe Zhe
Backport a commit from qemu upstream to fix a protection fault https://lists.gnu.org/archive/html/qemu-devel/2013-04/msg00878.html Signed-off-by: He Zhe <zhe.he@windriver.com> Signed-off-by: Ross Burton <ross.burton@intel.com>