summaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools/qemu
AgeCommit message (Collapse)Author
2021-06-27qemu: fix CVE-2021-3527Lee Chee Yang
Signed-off-by: Lee Chee Yang <chee.yang.lee@intel.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2021-06-17qemu: Provide float128 via hwcaps2 on ppc64leKhem Raj
Fixes runtime problems with qemu-user Fatal glibc error: CPU lacks float128 support (POWER 9 or later required) Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2021-06-17qemu: fix virtio vhost-user-gpu CVEsRoss Burton
Fix a slew of CVEs (CVE-2021-3544, CVE-2021-3545, CVE-2021-3546) by backporting the relevant patches from qemu's git. Signed-off-by: Ross Burton <ross.burton@arm.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2021-05-16qemu: Upgrade 5.2.0 -> 6.0.0Richard Purdie
Building without PIE support seems broken upstream, enable it by default to match the configuration others evidently use. Tweak git submodule option to match upstream. Drop backported/merged patches, refresh others. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2021-05-14qemu: backport a patch to fix meson 0.58 buildsAlexander Kanavin
Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2021-05-11qemu: Exclude CVE-2018-18438 from cve-checkRichard Purdie
The issues were investigated and found not to be an issue therefore exclude from checks. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2021-05-11qemu: Exclude CVE-2007-0998 from cve-checkRichard Purdie
The CVE applies to the built-in VNC server but we don't enable this by default. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2021-05-11qemu: Exclude CVE-2017-5957 from cve-checkRichard Purdie
The CVE applies to virglrender before 0.6.0 which we don't have. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2021-05-06qemu: fix CVE-2021-3392Anuj Mittal
Signed-off-by: Anuj Mittal <anuj.mittal@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2021-05-06Revert "qemu: fix CVE-2021-3392"Anuj Mittal
This reverts commit 5e8e08df8b5d0040ad911d3c51f63e7fec1858b4. This is an incomplete fix. Signed-off-by: Anuj Mittal <anuj.mittal@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2021-05-04qemu: fix CVE-2021-20263Sakib Sajal
virtiofs: drop remapped security.capability xattr as needed Signed-off-by: Sakib Sajal <sakib.sajal@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2021-05-04qemu: fix CVE-2020-27821Sakib Sajal
memory: clamp cached translation in case it points to an MMIO region Signed-off-by: Sakib Sajal <sakib.sajal@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2021-05-01qemu: fix CVE-2021-3392Minjae Kim
scsi: use-after-free in mptsas_process_scsi_io_request() of mptsas1068 emulator Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2021-04-27qemurunner: Add support for qmp commandsSaul Wold
This adds support for the Qemu Machine Protocol [0] extending the current dump process for Host and Target. The commands are added in the testimage.bbclass. Currently, we setup qemu to stall until qmp gets connected and sends the initialization and continue commands, this works correctly. If the UNIX Socket does not exist, we wait an timeout to ensure to socket file is created. With this version, the monitor_dumper is created in OEQemuTarget but then set in OESSHTarget as that's where we get the SSH failure happens. Python's @property is used to create a setter/getter type of setup in OESSHTarget to get overridden by OEQemuTarget. By default the data is currently dumped to files for each command in TMPDIR/log/runtime-hostdump/<date>_qmp/unknown_<seq>_qemu_monitor as this is the naming convenstion in the dump.py code. We use the qmp.py from qemu, which needs to get installed in the recipe-sysroot-native of the target image. [0] https://github.com/qemu/qemu/blob/master/docs/interop/qmp-spec.txt Signed-off-by: Saul Wold <saul.wold@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2021-04-27qemu-system-native: install qmp python moduleSaul Wold
The qmp python module supports the Qemu Machine Protocol [0]. This module needs to be installed in a known location so the qemurunner python script can find the qmp module. This change causes it to be installed in the recipe-sysroot-native of the target image and that directory can be added to the python sys.path that needs to use the qmp.py module. [0] https://github.com/qemu/qemu/blob/master/docs/interop/qmp-spec.txt Signed-off-by: Saul Wold <saul.wold@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2021-04-26qemu: Enable seccomp if FEATURE is setArmin Kuster
Signed-off-by: Armin Kuster <akuster808@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2021-04-24qemu: fix CVE-2021-20257Sakib Sajal
Signed-off-by: Sakib Sajal <sakib.sajal@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2021-04-24qemu: fix CVE-2021-3416Sakib Sajal
Signed-off-by: Sakib Sajal <sakib.sajal@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2021-04-24qemu: fix CVE-2021-3409Sakib Sajal
Signed-off-by: Sakib Sajal <sakib.sajal@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2021-04-24qemu: fix CVE-2021-20221Sakib Sajal
Signed-off-by: Sakib Sajal <sakib.sajal@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2021-04-24qemu: fix CVE-2020-29443Sakib Sajal
Signed-off-by: Sakib Sajal <sakib.sajal@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2021-04-24qemu: fix CVE-2021-20181Sakib Sajal
Signed-off-by: Sakib Sajal <sakib.sajal@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2021-04-18qemu: Fix CVE-2020-35517Khairul Rohaizzat Jamaluddin
CVE: CVE-2020-35517 Signed-off-by: Khairul Rohaizzat Jamaluddin <khairul.rohaizzat.jamaluddin@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2021-03-11qemu: fix CVE-2021-20203Minjae Kim
net: vmxnet3: validate configuration values during activate Upstream-Status: Acepted [https://lists.gnu.org/archive/html/qemu-devel/2021-01/msg07935.html] CVE: CVE-2021-20203 Signed-off-by: Minjae Kim <flowergom@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2021-03-02qemu: Determinism fixesRichard Purdie
Add a patch to address two determinism issues and allow reproducible builds. Also strip full paths we don't need out of some ptest files, we can use the installed binaries. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2021-02-17qemu: Refresh mmap fixes patch status/contentRichard Purdie
One mmap patch was merged upstream, the other is in progress but after discussion has been amended and resent. Update the patches as such. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2021-02-05qemu: make ptest reworkMingli Yu
After qemu upgrades to 5.2.0 in commit [1], if also switches to meson and the previous logic which introduces the testsuites changes in [2] and results in below error when run ptest test: # ./run-ptest for f in ; do \ nf=$(echo $f | sed 's/tests\//\.\//g'); \ $nf; \ done So refactor the ptest part code to make it work again. [1] https://git.openembedded.org/openembedded-core/commit/?id=181c635567aafb9b4787d8d6d0bcd4a615ceae80 [2] https://git.qemu.org/?p=qemu.git;a=commitdiff;h=279588d4deea2694ebe9ceb29dfdc5c08a7c4e27 Signed-off-by: Mingli Yu <mingli.yu@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2021-01-27meta: Fix native inheritance order in recipesTomasz Dziendzielski
Classes native/nativesdk should be inherited last to prevent unexpected behaviour. See [YOCTO #5729] for details. Signed-off-by: Tomasz Dziendzielski <tomasz.dziendzielski@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2021-01-16qemu: fix do_compile errorChangqing Li
Fix error like: Fatal error: can't create tests/ptimer-test.p/..._qemu-5.2.0_hw_core_ptimer.c.o: File name too long Signed-off-by: Changqing Li <changqing.li@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2021-01-09qemu: Add some user space mmap tweaks to address musl 32 bit build issuesRichard Purdie
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2021-01-09qemu: Fix mingw buildsRichard Purdie
After the recent upgrade, mingw builds failed. Add a hack whilst a solution is discussed upstream. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2021-01-09qemu: Drop vm reservation changes to resolve build issuesRichard Purdie
When building with the new version of qemu we see errors like: """ qemu-i386: Unable to reserve 0x7ffff000 bytes of virtual address space at 0x1000 (Success) for use as guest address space (check your virtual memory ulimit setting, min_mmap_addr or reserve less using -R option) ERROR: The postinstall intercept hook 'update_gio_module_cache-nativesdk' failed """ The VM reseration patches we're carrying look suspicious in this context. Drop them since the patches appear to be a liability causing other issues and there is a much simpler fix for the webkitgtk issues on musl on 32 bit (see later linux-user mmap patches). Reviewed-by: Alistair Francis <alistair.francis@wdc.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2021-01-09qemu: Upgrade 5.1.0->5.2.0Richard Purdie
This involves some pretty major changes for qemu. In particular, they switched to meson+ninja so we have to adapt to that. Patch changes: * CVE patches - dropped as backports * cflags fix - upstream code changed significantly, need new patch if still issues * mips TLB entries - dropped as merged upstream * usb fix - dropped as merged upstream * find_datadir - dropped as code no longer present that I could find A patch was added to allow us to force the configure script into "cross" mode without setting cross_prefix which has other effects we don't need/want. Dependencies on meson/ninja were added. Specifying the python interpreter causes the internal meson copy to be built/used which is undesireable for us so don't do that. The correct python is in PATH anyway. Acked-by: Alistair Francis <alistair.francis@wdc.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2021-01-03qemu: CVE-2020-28916Li Wang
References: https://nvd.nist.gov/vuln/detail/CVE-2020-28916 backport patch from: https://git.qemu.org/?p=qemu.git;a=commit;h=c2cb511634012344e3d0fe49a037a33b12d8a98a Signed-off-by: Li Wang <li.wang@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2021-01-03qemu: CVE-2020-25723Li Wang
References: https://nvd.nist.gov/vuln/detail/CVE-2020-25723 https://bugzilla.redhat.com/show_bug.cgi?id=1898579 backport patch from: https://git.qemu.org/?p=qemu.git;a=commit;h=2fdb42d840400d58f2e706ecca82c142b97bcbd6 Signed-off-by: Li Wang <li.wang@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-12-18qemu.inc: Add seccomp PACKAGECONFIG optionNathan Rossi
Add the seccomp PACKAGECONFIG option to allow building seccomp features in QEMU. The libseccomp library is available in additional layers (e.g. meta-security). Additionally this serves as a way to disable seccomp by default to avoid the configure of QEMU automatically finding it (via pkg-config) on the build host when building qemu-system-native and auto enabling the feature. Signed-off-by: Nathan Rossi <nathan@nathanrossi.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-12-06qemu: CVE-2020-25624Li Wang
References: https://nvd.nist.gov/vuln/detail/CVE-2020-25624 backport patch from: https://git.qemu.org/?p=qemu.git;a=commit;h=1328fe0c32d5474604105b8105310e944976b058 Signed-off-by: Li Wang <li.wang@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-12-03qemu: CVE-2020-29129 CVE-2020-29130Li Wang
References: https://nvd.nist.gov/vuln/detail/CVE-2020-29129 https://nvd.nist.gov/vuln/detail/CVE-2020-29130 backport patch from: https://git.qemu.org/?p=libslirp.git;a=commit;h=2e1dcbc0c2af64fcb17009eaf2ceedd81be2b27f Signed-off-by: Li Wang <li.wang@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-11-24qemu: fix CVE-2020-24352Lee Chee Yang
Signed-off-by: Lee Chee Yang <chee.yang.lee@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-10-20qemu: change TLBs number to 64 in 34Kf mips cpu modelVictor Kamensky
Replace OE private qemu patch with one that got upstreamed and solves the same problem: increase qemumips CI performance by increasing number of TLBs in CPU model and reduce need to run software TLB refill code. Signed-off-by: Victor Kamensky <kamensky@cisco.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-10-20Revert "qemu: add 34Kf-64tlb fictitious cpu type"Victor Kamensky
This reverts commit 4470a04943352224955f17e004962f0f9e1c9b0c. Will be replaced with upstreamed solution instead, that just bumped number of TLBs to 64 in original 34Kf CPU model. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-10-08qemu: add 34Kf-64tlb fictitious cpu typeVictor Kamensky
In Yocto Project PR 13992 it was reported that qemumips in autobuilder runs almost twice slower then qemumips64 and some times hit time out. Upon investigations of qemu-system with perf, gdb, and SystemTap and comparing qemumips and qemumips64 machines behavior it was noticed that qemu soft mmu code behaves quite different and in case if qemumips tlbwr instruction called 16 times more oftern. It happens that in qemumips64 case qemu runs with cpu type that contains 64 TLB, but in case of qemumips qemu runs with cpu type that contains only 16 TLBs. The idea of proposed qemu patch is to introduce fictitious 34Kf-64tlb cpu type that defined exactly as 34Kf but has 64 TLBs, instead of original 16 TLBs. Testing of core-image-full-cmdline:do_testimage with 34Kf-64tlb shows 40% or so test execution real time improvement. Note for future porters of the patch: easiest way to update the patch and be in sync with 34Kf definition is to copy 34Kf machine definition and apply the following changes to it (just change 15 to 63 of CP0C1_MMU bits value) [kamensky@coreos-lnx2 qemu]$ diff ~/34Kf.c ~/34Kf-64tlb.c 2c2 < .name = "34Kf", > .name = "34Kf-64tlb", 6c6 < .CP0_Config1 = MIPS_CONFIG1 | (1 << CP0C1_FP) | (15 << CP0C1_MMU) | > .CP0_Config1 = MIPS_CONFIG1 | (1 << CP0C1_FP) | (63 << CP0C1_MMU) | Fixes https://bugzilla.yoctoproject.org/show_bug.cgi?id=13992 Upstream Status: Inappropriate Signed-off-by: Victor Kamensky <kamensky@cisco.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-09-30Space-comma CleanupsJon Mason
Multiple files have " ," instead of ", " in expressions. This changes them to conform to the way the rest of them are done. Found and corrected via: git ls-files | xargs sed --follow-symlinks -i 's/ ,d/, d/g' Signed-off-by: Jon Mason <jon.mason@arm.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-09-23meta: add/fix invalid Upstream-Status tagsRoss Burton
Signed-off-by: Ross Burton <ross.burton@arm.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-09-16qemu: override DEBUG_BUILDMingli Yu
Override DEBUG_BUILD for qemu as the qemu upstream states it doesn't work without optimization [1] to fix below build failure when debug build enabled. | /usr/lib/gcc/x86_64-wrs-linux/10.1.0/../../../../x86_64-wrs-linux/bin/ld.bfd: /mnt/build/tmp/work/x86_64-linux/qemu-system-native/5.1.0-r0/qemu-5.1.0/fsdev/qemu-fsdev-throttle.c:25: undefined reference to `unknown_lock_type' | /usr/lib/gcc/x86_64-wrs-linux/10.1.0/../../../../x86_64-wrs-linux/bin/ld.bfd: ../fsdev/qemu-fsdev-throttle.o: in function `fsdev_co_throttle_request': | /mnt/build/tmp/work/x86_64-linux/qemu-system-native/5.1.0-r0/qemu-5.1.0/fsdev/qemu-fsdev-throttle.c:103: undefined reference to `unknown_lock_type' | /usr/lib/gcc/x86_64-wrs-linux/10.1.0/../../../../x86_64-wrs-linux/bin/ld.bfd: ../fsdev/qemu-fsdev-throttle.o:/mnt/build/tmp/work/x86_64-linux/qemu-system-native/5.1.0-r0/qemu-5.1.0/fsdev/qemu-fsdev-throttle.c:103: more undefined references to `unknown_lock_type' follow | collect2: error: ld returned 1 exit status [1]: https://lists.nongnu.org/archive/html/qemu-devel/2020-09/msg03873.html Signed-off-by: Mingli Yu <mingli.yu@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-09-15Revert "qemu: always define unknown_lock_type"Richard Purdie
This reverts commit e442924d9ac4e202aec571b5d26bb959b5faaadd. This was rejected upstream and its been pointed out qemu doesn't work without optimization. Instead we should just error if the user attempts to build it without optimization.
2020-09-14qemu: always define unknown_lock_typeMingli Yu
When use gcc 10.1.0 and debug build is enabled, there comes below build failure: | /usr/lib/gcc/x86_64-wrs-linux/10.1.0/../../../../x86_64-wrs-linux/bin/ld.bfd: /mnt/build/tmp/work/x86_64-linux/qemu-system-native/5.1.0-r0/qemu-5.1.0/fsdev/qemu-fsdev-throttle.c:25: undefined reference to `unknown_lock_type' | /usr/lib/gcc/x86_64-wrs-linux/10.1.0/../../../../x86_64-wrs-linux/bin/ld.bfd: ../fsdev/qemu-fsdev-throttle.o: in function `fsdev_co_throttle_request': | /mnt/build/tmp/work/x86_64-linux/qemu-system-native/5.1.0-r0/qemu-5.1.0/fsdev/qemu-fsdev-throttle.c:103: undefined reference to `unknown_lock_type' | /usr/lib/gcc/x86_64-wrs-linux/10.1.0/../../../../x86_64-wrs-linux/bin/ld.bfd: ../fsdev/qemu-fsdev-throttle.o:/mnt/build/tmp/work/x86_64-linux/qemu-system-native/5.1.0-r0/qemu-5.1.0/fsdev/qemu-fsdev-throttle.c:103: more undefined references to `unknown_lock_type' follow | collect2: error: ld returned 1 exit status So always define unknown_lock_type to fix the above error. Signed-off-by: Mingli Yu <mingli.yu@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-09-11qemu: fix CVE-2020-14364Ross Burton
Backport a patch from upstream to fix CVE-2020-14364. Signed-off-by: Ross Burton <ross.burton@arm.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-08-16qemu: Upgrade 5.0.0 -> 5.1.0Richard Purdie
* Drop backported CVE fixes * Drop cpu backtrace patch from 2015 for debugging an issue which we no longer see (patch throws rejects, files have moved) * Update mips patch to account for file renames * Update chardev patch to match upstream code changes * Update webkitgtk patch, qemumips build works ok but qemux86 musl webkitgtk still fails. Need to figure out the correct fix and upstream it for this, current revert patch is not maintainable. Release notes for 5.1.0 mention slight qemumips performance improvements which would be valuable to us. My tests show no improvement in qemumips testimage execution time for core-image-sato-sdk. Fix a ptest issue for a file looking for /usr/bin/bash when we have /bin/bash. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-08-13qemu.inc: Use virtual/libgl instead of mesaChandana kalluri
Use virtual/libgl instead of mesa within the recipes to provide users the flexibility to specify providers other than mesa. Signed-off-by: Sai Hari Chandana Kalluri <chandana.kalluri@xilinx.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>