Date   

[meta-oe] [PATCH] tesseract: upgrade 4.1.3 -> 5.2.0

wangmy
 

0001-include-sys-time.h.patch
removed since it's not available in new version.

Signed-off-by: Wang Mingyu <wangmy@...>
---
.../tesseract/0001-include-sys-time.h.patch | 34 -------------------
...{tesseract_4.1.3.bb => tesseract_5.2.0.bb} | 6 ++--
2 files changed, 2 insertions(+), 38 deletions(-)
delete mode 100644 meta-oe/recipes-graphics/tesseract/tesseract/0001-include-sys-time.h.patch
rename meta-oe/recipes-graphics/tesseract/{tesseract_4.1.3.bb => tesseract_5.2.0.bb} (71%)

diff --git a/meta-oe/recipes-graphics/tesseract/tesseract/0001-include-sys-time.h.patch b/meta-oe/recipes-graphics/tesseract/tesseract/0001-include-sys-time.h.patch
deleted file mode 100644
index de1fa75b7c..0000000000
--- a/meta-oe/recipes-graphics/tesseract/tesseract/0001-include-sys-time.h.patch
+++ /dev/null
@@ -1,34 +0,0 @@
-From b47fa9532a7090d76521603dbc818bdec100085f Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@...>
-Date: Tue, 15 Sep 2020 17:04:27 -0700
-Subject: [PATCH] include sys/time.h
-
-This provides missing definitions of timeval stuct
-
-Fixes
-| ../../../git/src/ccutil/ocrclass.h:154:7: error: member access into
-incomplete type 'struct timeval'
-| tv->tv_usec = (millisecs.count() % 1000) * 1000;
-
-Upstream-Status: Pending
-Signed-off-by: Khem Raj <raj.khem@...>
----
- src/ccutil/ocrclass.h | 2 ++
- 1 file changed, 2 insertions(+)
-
-diff --git a/src/ccutil/ocrclass.h b/src/ccutil/ocrclass.h
-index d39a6dd6..96395c9b 100644
---- a/src/ccutil/ocrclass.h
-+++ b/src/ccutil/ocrclass.h
-@@ -28,6 +28,8 @@
-
- #include <chrono>
- #include <ctime>
-+#include <sys/time.h>
-+
- #ifdef _WIN32
- #include <winsock2.h> // for timeval
- #endif
---
-2.28.0
-
diff --git a/meta-oe/recipes-graphics/tesseract/tesseract_4.1.3.bb b/meta-oe/recipes-graphics/tesseract/tesseract_5.2.0.bb
similarity index 71%
rename from meta-oe/recipes-graphics/tesseract/tesseract_4.1.3.bb
rename to meta-oe/recipes-graphics/tesseract/tesseract_5.2.0.bb
index 6f92679682..8eb2073563 100644
--- a/meta-oe/recipes-graphics/tesseract/tesseract_4.1.3.bb
+++ b/meta-oe/recipes-graphics/tesseract/tesseract_5.2.0.bb
@@ -5,10 +5,8 @@ BUGTRACKER = "https://github.com/tesseract-ocr/tesseract/issues"
LICENSE = "Apache-2.0"
LIC_FILES_CHKSUM = "file://LICENSE;md5=3b83ef96387f14655fc854ddc3c6bd57"

-BRANCH = "4.1"
-SRCREV = "f38e7a7ba850b668d4505dd4c712238d7ec63ca8"
-SRC_URI = "git://github.com/${BPN}-ocr/${BPN}.git;branch=${BRANCH};protocol=https \
- file://0001-include-sys-time.h.patch \
+SRCREV = "5ad5325a0aa8effc47ca033625b6a51682f82767"
+SRC_URI = "git://github.com/${BPN}-ocr/${BPN}.git;branch=main;protocol=https \
"

S = "${WORKDIR}/git"
--
2.25.1


[meta-oe] [PATCH] cli11: upgrade 2.2.0 -> 2.3.0

wangmy
 

Changelog:
==========
Add CLI11_PRECOMPILED as an option. #762
Bugfix: Include <functional> in FormatterFwd #727
Bugfix: Add missing Macros.hpp to Error.hpp #755
Bugfix: Fix subcommand callback trigger #733
Bugfix: Variable rename to avoid warning #734
Bugfix: split_program_name single file name error #740
Bugfix: Better support for min/max overrides on MSVC #741
Bugfix: Support MSVC 2022 #748
Bugfix: Support negated flag in config file #775
Bugfix: Better errors for some confusing config file situations #781
Backend: Restore coverage testing (lost with Travis CI) #747

Signed-off-by: Wang Mingyu <wangmy@...>
---
.../recipes-support/cli11/{cli11_2.2.0.bb => cli11_2.3.0.bb} | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
rename meta-oe/recipes-support/cli11/{cli11_2.2.0.bb => cli11_2.3.0.bb} (94%)

diff --git a/meta-oe/recipes-support/cli11/cli11_2.2.0.bb b/meta-oe/recipes-support/cli11/cli11_2.3.0.bb
similarity index 94%
rename from meta-oe/recipes-support/cli11/cli11_2.2.0.bb
rename to meta-oe/recipes-support/cli11/cli11_2.3.0.bb
index 53a57489fe..53ae95b68e 100644
--- a/meta-oe/recipes-support/cli11/cli11_2.2.0.bb
+++ b/meta-oe/recipes-support/cli11/cli11_2.3.0.bb
@@ -3,7 +3,7 @@ DESCRIPTION = "A command line parser for C++11 and beyond that provides a rich f
HOMEPAGE = "https://github.com/CLIUtils/CLI11"
LICENSE = "BSD-3-Clause"
LIC_FILES_CHKSUM = "file://LICENSE;md5=9ad746b5f49c0fd53c08ca1faff1922c"
-SRCREV = "b9be5b9444772324459989177108a6a65b8b2769"
+SRCREV = "a66ae4145779c56dc0f9f98a631656417dd77de8"
PV .= "+git${SRCPV}"

SRC_URI += "gitsm://github.com/CLIUtils/CLI11;branch=main;protocol=https \
--
2.25.1


[meta-networking] [PATCH] blueman: upgrade 2.3.2 -> 2.3.4

wangmy
 

Bugs fixed
==========
Errors when connected to a device with the DisconnectItems plugin enabled

Signed-off-by: Wang Mingyu <wangmy@...>
---
.../blueman/{blueman_2.3.2.bb => blueman_2.3.4.bb} | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
rename meta-networking/recipes-connectivity/blueman/{blueman_2.3.2.bb => blueman_2.3.4.bb} (97%)

diff --git a/meta-networking/recipes-connectivity/blueman/blueman_2.3.2.bb b/meta-networking/recipes-connectivity/blueman/blueman_2.3.4.bb
similarity index 97%
rename from meta-networking/recipes-connectivity/blueman/blueman_2.3.2.bb
rename to meta-networking/recipes-connectivity/blueman/blueman_2.3.4.bb
index eed00fce02..c3cde1f27a 100644
--- a/meta-networking/recipes-connectivity/blueman/blueman_2.3.2.bb
+++ b/meta-networking/recipes-connectivity/blueman/blueman_2.3.4.bb
@@ -13,7 +13,7 @@ SRC_URI = " \
file://0001-meson-add-pythoninstalldir-option.patch \
"
S = "${WORKDIR}/git"
-SRCREV = "4275c35ffe372c3b194080726fbe1c99f974360f"
+SRCREV = "89bb5313a7cc24ca6fdbeaf2b02f6142dc1a8e60"

EXTRA_OEMESON = "-Druntime_deps_check=false -Dpythoninstalldir=${@noprefix('PYTHON_SITEPACKAGES_DIR', d)}"

--
2.25.1


[meta-filesystems] [PATCH] xfstests: upgrade 2022.09.25 -> 2022.10.09

wangmy
 

Signed-off-by: Wang Mingyu <wangmy@...>
---
.../xfstests/{xfstests_2022.09.25.bb => xfstests_2022.10.09.bb} | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
rename meta-filesystems/recipes-utils/xfstests/{xfstests_2022.09.25.bb => xfstests_2022.10.09.bb} (97%)

diff --git a/meta-filesystems/recipes-utils/xfstests/xfstests_2022.09.25.bb b/meta-filesystems/recipes-utils/xfstests/xfstests_2022.10.09.bb
similarity index 97%
rename from meta-filesystems/recipes-utils/xfstests/xfstests_2022.09.25.bb
rename to meta-filesystems/recipes-utils/xfstests/xfstests_2022.10.09.bb
index 45a1578be7..4965d0586b 100644
--- a/meta-filesystems/recipes-utils/xfstests/xfstests_2022.09.25.bb
+++ b/meta-filesystems/recipes-utils/xfstests/xfstests_2022.10.09.bb
@@ -10,7 +10,7 @@ SRC_URI = "git://git.kernel.org/pub/scm/fs/xfs/xfstests-dev.git;branch=master;na
file://0002-Drop-detached_mounts_propagation-and-remove-sys-moun.patch \
"

-SRCREV_xfstests = "e5555e75ba199d153f4dfb81496a891263ec9bdd"
+SRCREV_xfstests = "3b5cb74c03312b5ac3349a0759c8d32bb9d0dada"
SRCREV_unionmount = "e3825b16b46f4c4574a1a69909944c059835f914"

S = "${WORKDIR}/git"
--
2.25.1


[meta-networking] [PATCH] nbdkit: upgrade 1.33.1 -> 1.33.2

wangmy
 

Signed-off-by: Wang Mingyu <wangmy@...>
---
.../nbdkit/{nbdkit_1.33.1.bb => nbdkit_1.33.2.bb} | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
rename meta-networking/recipes-support/nbdkit/{nbdkit_1.33.1.bb => nbdkit_1.33.2.bb} (95%)

diff --git a/meta-networking/recipes-support/nbdkit/nbdkit_1.33.1.bb b/meta-networking/recipes-support/nbdkit/nbdkit_1.33.2.bb
similarity index 95%
rename from meta-networking/recipes-support/nbdkit/nbdkit_1.33.1.bb
rename to meta-networking/recipes-support/nbdkit/nbdkit_1.33.2.bb
index 322f89c22b..ad7b9a6fab 100644
--- a/meta-networking/recipes-support/nbdkit/nbdkit_1.33.1.bb
+++ b/meta-networking/recipes-support/nbdkit/nbdkit_1.33.2.bb
@@ -11,7 +11,7 @@ LIC_FILES_CHKSUM = "file://LICENSE;md5=f9dcc2d8acdde215fa4bd6ac12bb14f0"

SRC_URI = "git://github.com/libguestfs/nbdkit.git;protocol=https;branch=master \
"
-SRCREV = "9ebc70dae82220f962167b1668fd2af6de886b16"
+SRCREV = "9e2fdefc1ba4c883c5e6aa4f32ab21777980a978"

S = "${WORKDIR}/git"

--
2.25.1


[meta-gnome] [PATCH] libwacom: upgrade 2.4.0 -> 2.5.0

wangmy
 

Changelog:
=========
- New Devices
- Cintiq Pro 27
- Intuos Pro Small refresh
- Dell Chromebook 11 5190 2-in-1
- Dell Inspiron 14 7425 2-in-1
- Fujitsu U729X

Signed-off-by: Wang Mingyu <wangmy@...>
---
.../libwacom/{libwacom_2.4.0.bb => libwacom_2.5.0.bb} | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
rename meta-gnome/recipes-support/libwacom/{libwacom_2.4.0.bb => libwacom_2.5.0.bb} (93%)

diff --git a/meta-gnome/recipes-support/libwacom/libwacom_2.4.0.bb b/meta-gnome/recipes-support/libwacom/libwacom_2.5.0.bb
similarity index 93%
rename from meta-gnome/recipes-support/libwacom/libwacom_2.4.0.bb
rename to meta-gnome/recipes-support/libwacom/libwacom_2.5.0.bb
index d690df9229..a290d95b71 100644
--- a/meta-gnome/recipes-support/libwacom/libwacom_2.4.0.bb
+++ b/meta-gnome/recipes-support/libwacom/libwacom_2.5.0.bb
@@ -8,7 +8,7 @@ LICENSE = "MIT"
LIC_FILES_CHKSUM = "file://COPYING;md5=40a21fffb367c82f39fd91a3b137c36e"

SRC_URI = "git://github.com/linuxwacom/libwacom.git;branch=master;protocol=https"
-SRCREV = "9fd28747534ef776ffecc245721a4faa43bdd89b"
+SRCREV = "c6c1b26ad149a88b22ff790dae377fcc935b7e08"

DEPENDS = " \
libxml2-native \
--
2.25.1


[meta-oe] [PATCH] gst-editing-services: upgrade 1.20.3 -> 1.20.4

wangmy
 

Signed-off-by: Wang Mingyu <wangmy@...>
---
...diting-services_1.20.3.bb => gst-editing-services_1.20.4.bb} | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
rename meta-oe/recipes-devtools/gst-editing-services/{gst-editing-services_1.20.3.bb => gst-editing-services_1.20.4.bb} (92%)

diff --git a/meta-oe/recipes-devtools/gst-editing-services/gst-editing-services_1.20.3.bb b/meta-oe/recipes-devtools/gst-editing-services/gst-editing-services_1.20.4.bb
similarity index 92%
rename from meta-oe/recipes-devtools/gst-editing-services/gst-editing-services_1.20.3.bb
rename to meta-oe/recipes-devtools/gst-editing-services/gst-editing-services_1.20.4.bb
index d14869b06b..37f7746846 100644
--- a/meta-oe/recipes-devtools/gst-editing-services/gst-editing-services_1.20.3.bb
+++ b/meta-oe/recipes-devtools/gst-editing-services/gst-editing-services_1.20.4.bb
@@ -18,7 +18,7 @@ inherit meson pkgconfig upstream-version-is-even gobject-introspection features_
EXTRA_OEMESON = "-Dvalidate=disabled"

SRC_URI = "http://gstreamer.freedesktop.org/src/gst-editing-services/gst-editing-services-${PV}.tar.xz"
-SRC_URI[sha256sum] = "5fd896de69fbe24421eb6b0ff8d2f8b4c3cba3f3025ceacd302172f39a8abaa2"
+SRC_URI[sha256sum] = "aa03e983af5d79c1befffe3575b034e60960619a96bf877447cb73c28016fc41"

PACKAGES += "gst-validate-launcher libges"

--
2.25.1


[meta-oe] [PATCH] freerdp: upgrade 2.8.0 -> 2.8.1

wangmy
 

Changelog:
============
Notewhorth changes:

Fixed CVE-2022-39282
Fixed CVE-2022-39283
Added missing commit for backported #8041: Remove ALAW/ULAW codecs from linux backends (unreliable)
Added hash checks for android build script dependencies
Fixed issues:

#8190: Fix build break with newer FFMPEG versions
#8234: Updated flatpak with build script
#8210: Better execinfo support check for android
#7708: Header now defines DumpThreadHandles
#8176: Check fullscreen state and not setting
#8236: Send resize on window state change
#7611: Audin macOS monterey fix
#8291: Android build script update
Fix length checks and initialization in the deprecated (disabled per default) tsmf channel

Signed-off-by: Wang Mingyu <wangmy@...>
---
.../freerdp/{freerdp_2.8.0.bb => freerdp_2.8.1.bb} | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
rename meta-oe/recipes-support/freerdp/{freerdp_2.8.0.bb => freerdp_2.8.1.bb} (98%)

diff --git a/meta-oe/recipes-support/freerdp/freerdp_2.8.0.bb b/meta-oe/recipes-support/freerdp/freerdp_2.8.1.bb
similarity index 98%
rename from meta-oe/recipes-support/freerdp/freerdp_2.8.0.bb
rename to meta-oe/recipes-support/freerdp/freerdp_2.8.1.bb
index 33782e56b7..5f539671bc 100644
--- a/meta-oe/recipes-support/freerdp/freerdp_2.8.0.bb
+++ b/meta-oe/recipes-support/freerdp/freerdp_2.8.1.bb
@@ -13,7 +13,7 @@ inherit pkgconfig cmake gitpkgv
PE = "1"
PKGV = "${GITPKGVTAG}"

-SRCREV = "e3fc97feb512053189e276b2ca79762990bb8c4c"
+SRCREV = "0ad3f49f0e7eb78586acc6bf6e4605f96f88954e"
SRC_URI = "git://github.com/FreeRDP/FreeRDP.git;branch=stable-2.0;protocol=https \
file://winpr-makecert-Build-with-install-RPATH.patch \
"
--
2.25.1


[meta-oe] [PATCH] debootstrap: upgrade 1.0.127 -> 1.0.128

wangmy
 

Signed-off-by: Wang Mingyu <wangmy@...>
---
.../{debootstrap_1.0.127.bb => debootstrap_1.0.128.bb} | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
rename meta-oe/recipes-devtools/debootstrap/{debootstrap_1.0.127.bb => debootstrap_1.0.128.bb} (89%)

diff --git a/meta-oe/recipes-devtools/debootstrap/debootstrap_1.0.127.bb b/meta-oe/recipes-devtools/debootstrap/debootstrap_1.0.128.bb
similarity index 89%
rename from meta-oe/recipes-devtools/debootstrap/debootstrap_1.0.127.bb
rename to meta-oe/recipes-devtools/debootstrap/debootstrap_1.0.128.bb
index 5e0a488429..4d13aa66c8 100644
--- a/meta-oe/recipes-devtools/debootstrap/debootstrap_1.0.127.bb
+++ b/meta-oe/recipes-devtools/debootstrap/debootstrap_1.0.128.bb
@@ -11,7 +11,7 @@ SRC_URI = "\
file://0001-do-not-hardcode-the-full-path-of-dpkg.patch \
"

-SRC_URI[sha256sum] = "45887cf0582e6d16598e50713278d16b2272d02bdd117a9876e98277300dabd4"
+SRC_URI[sha256sum] = "09e7f8795fee894b77994213ee3a588e9d8f96ddf5f93afdec91e9a137aa7866"

S = "${WORKDIR}/debootstrap"

--
2.25.1


[meta-oe] [PATCH] ctags: upgrade 5.9.20221002.0 -> 5.9.20221009.0

wangmy
 

Signed-off-by: Wang Mingyu <wangmy@...>
---
.../ctags/{ctags_5.9.20221002.0.bb => ctags_5.9.20221009.0.bb} | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
rename meta-oe/recipes-devtools/ctags/{ctags_5.9.20221002.0.bb => ctags_5.9.20221009.0.bb} (95%)

diff --git a/meta-oe/recipes-devtools/ctags/ctags_5.9.20221002.0.bb b/meta-oe/recipes-devtools/ctags/ctags_5.9.20221009.0.bb
similarity index 95%
rename from meta-oe/recipes-devtools/ctags/ctags_5.9.20221002.0.bb
rename to meta-oe/recipes-devtools/ctags/ctags_5.9.20221009.0.bb
index de9e6dbe6b..5564a9b853 100644
--- a/meta-oe/recipes-devtools/ctags/ctags_5.9.20221002.0.bb
+++ b/meta-oe/recipes-devtools/ctags/ctags_5.9.20221009.0.bb
@@ -14,7 +14,7 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=0636e73ff0215e8d672dc4c32c317bb3"

inherit autotools-brokensep pkgconfig manpages

-SRCREV = "132379f59e223696f2382a84c2e12b6e7860a7ac"
+SRCREV = "5d506a1a3b6850f05de5e785c5d14cfd6f9b1620"
SRC_URI = "git://github.com/universal-ctags/ctags;branch=master;protocol=https"

S = "${WORKDIR}/git"
--
2.25.1


[meta-oe] [PATCH] cppzmq: upgrade 4.8.1 -> 4.9.0

wangmy
 

Changelog:
==========
Type-safe socket.get(sockopt::type) #523
GCC C++14 fix #553
Support ZMQ_ONLY_FIRST_SUBSCRIBE #558
Add pkg-config file and instructions #564 #570
Fix missing include #568
Fix monitor test failures #576
Improved documentation #519 #524

Signed-off-by: Wang Mingyu <wangmy@...>
---
meta-oe/recipes-connectivity/zeromq/cppzmq_git.bb | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/meta-oe/recipes-connectivity/zeromq/cppzmq_git.bb b/meta-oe/recipes-connectivity/zeromq/cppzmq_git.bb
index 7189115092..1dbdc3e46a 100644
--- a/meta-oe/recipes-connectivity/zeromq/cppzmq_git.bb
+++ b/meta-oe/recipes-connectivity/zeromq/cppzmq_git.bb
@@ -4,8 +4,8 @@ LICENSE = "MIT"
LIC_FILES_CHKSUM = "file://LICENSE;md5=db174eaf7b55a34a7c89551197f66e94"
DEPENDS = "zeromq"

-SRCREV = "dd663fafd830466d34cba278c2cfd0f92eb67614"
-PV = "4.8.1"
+SRCREV = "d67b6352b87a238775cd17e4376b980d07fa7939"
+PV = "4.9.0"

SRC_URI = "git://github.com/zeromq/cppzmq.git;branch=master;protocol=https"

--
2.25.1


[meta-oe] [PATCH] broadcom-bt-firmware: upgrade

wangmy
 

Signed-off-by: Wang Mingyu <wangmy@...>
---
.../broadcom-bt-firmware/broadcom-bt-firmware_12.0.1.1105_p3.bb | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/meta-oe/recipes-kernel/broadcom-bt-firmware/broadcom-bt-firmware_12.0.1.1105_p3.bb b/meta-oe/recipes-kernel/broadcom-bt-firmware/broadcom-bt-firmware_12.0.1.1105_p3.bb
index f45ea5e4a9..4b6026ebc0 100644
--- a/meta-oe/recipes-kernel/broadcom-bt-firmware/broadcom-bt-firmware_12.0.1.1105_p3.bb
+++ b/meta-oe/recipes-kernel/broadcom-bt-firmware/broadcom-bt-firmware_12.0.1.1105_p3.bb
@@ -10,7 +10,7 @@ NO_GENERIC_LICENSE[Firmware-Broadcom-WIDCOMM] = "LICENSE.broadcom_bcm20702"

LIC_FILES_CHKSUM = "file://LICENSE.broadcom_bcm20702;md5=c0d5ea0502b00df74173d0f8a48b619d"
SRC_URI = "git://github.com/winterheart/broadcom-bt-firmware.git;branch=master;protocol=https"
-SRCREV = "68a7a8a4f2c4bdd3425c23653a3b9b6609e41d0b"
+SRCREV = "a0eb4805dbb232f02f156b9351a23790c1a4cec7"

PE = "1"

--
2.25.1


Re: [meta-oe][PATCH v2] syzkaller: add recipe and selftest for syzkaller fuzzing

Khem Raj
 

seeing these failures

https://errors.yoctoproject.org/Errors/Details/673021/

On Mon, Oct 17, 2022 at 10:02 AM Ovidiu Panait
<ovidiu.panait@...> wrote:

Syzkaller is a coverage-guided fuzzer that is widely used to find bugs in
the Linux kernel:
https://github.com/google/syzkaller

Add the recipe and a selftest for running the fuzzer in a qemux86-64
kvm environment. The following steps can be used to start the test:
"""
cat >> conf/local.conf <<EOF
SYZ_WORKDIR="<path>"
SYZ_FUZZTIME="30"
SYZ_QEMU_VM_COUNT="2"
SYZ_QEMU_MEM="2048"
SYZ_QEMU_CPUS="2"
EOF

oe-selftest -r syzkaller
...
loading corpus...
serving http on http://127.0.0.1:49605
serving rpc on tcp://[::]:46475
booting test machines...
wait for the connection from test machine...
vm-0: crash: KCSAN: data-race in poll_schedule_timeout.constprop.NUM / pollwake
vm-1: crash: KCSAN: data-race in mutex_spin_on_owner
machine check:
syscalls : 2227/4223
code coverage : enabled
comparison tracing : enabled
extra coverage : enabled
delay kcov mmap : mmap returned an invalid pointer
setuid sandbox : enabled
namespace sandbox : enabled
Android sandbox : /sys/fs/selinux/policy does not exist
fault injection : enabled
leak checking : enabled
net packet injection : enabled
net device setup : enabled
concurrency sanitizer : enabled
devlink PCI setup : PCI device 0000:00:10.0 is not available
USB emulation : enabled
hci packet injection : enabled
wifi device emulation : enabled
802.15.4 emulation : enabled
corpus : 0 (deleted 0 broken)
seeds : 0/0
VMs 2, executed 1, cover 0, signal 0/0, crashes 2, repro 0
vm-1: crash: KCSAN: data-race in mutex_spin_on_owner
"""

This will fuzz the yocto kernel for 30 minutes using 2 qemu VMs, each VM
getting 2048MB of memory and 2 CPUs.

The path in SYZ_WORKDIR must be an absolute path that is persistent across
oe-selftest runs, so that fuzzing does not start all over again on each
invocation. Syzkaller will save the corpus database in that directory and will
use the database to keep track of the interfaces already fuzzed.

After the test is done, <workdir>/crashes directory will contain the report
files for all the bugs found.

Signed-off-by: Ovidiu Panait <ovidiu.panait@...>
---
meta-oe/lib/oeqa/selftest/cases/syzkaller.py | 124 ++++++++++++++++++
...ets.go-allow-users-to-override-hardc.patch | 67 ++++++++++
.../recipes-test/syzkaller/syzkaller_git.bb | 85 ++++++++++++
3 files changed, 276 insertions(+)
create mode 100644 meta-oe/lib/oeqa/selftest/cases/syzkaller.py
create mode 100644 meta-oe/recipes-test/syzkaller/syzkaller/0001-sys-targets-targets.go-allow-users-to-override-hardc.patch
create mode 100644 meta-oe/recipes-test/syzkaller/syzkaller_git.bb

diff --git a/meta-oe/lib/oeqa/selftest/cases/syzkaller.py b/meta-oe/lib/oeqa/selftest/cases/syzkaller.py
new file mode 100644
index 000000000..64fc864bf
--- /dev/null
+++ b/meta-oe/lib/oeqa/selftest/cases/syzkaller.py
@@ -0,0 +1,124 @@
+#
+# SPDX-License-Identifier: MIT
+#
+
+from oeqa.selftest.case import OESelftestTestCase
+from oeqa.utils.commands import runCmd, bitbake, get_bb_var, get_bb_vars
+from oeqa.utils.network import get_free_port
+
+class TestSyzkaller(OESelftestTestCase):
+ def setUpSyzkallerConfig(self, os_arch, qemu_postfix):
+ syz_target_sysroot = get_bb_var('PKGD', 'syzkaller')
+ syz_target = os.path.join(syz_target_sysroot, 'usr')
+
+ qemu_native_bin = os.path.join(self.syz_native_sysroot, 'usr/bin/qemu-system-' + qemu_postfix)
+ kernel_cmdline = "ip=dhcp rootfs=/dev/sda dummy_hcd.num=%s" % (self.dummy_hcd_num)
+ kernel_objdir = self.deploy_dir_image
+ port = get_free_port()
+
+ if not os.path.exists(self.syz_workdir):
+ os.mkdir(self.syz_workdir)
+
+ with open(self.syz_cfg, 'w') as f:
+ f.write(
+"""
+{
+ "target": "%s",
+ "http": "127.0.0.1:%s",
+ "workdir": "%s",
+ "kernel_obj": "%s",
+ "kernel_src": "%s",
+ "image": "%s",
+ "syzkaller": "%s",
+ "type": "qemu",
+ "reproduce" : false,
+ "sandbox": "none",
+ "vm": {
+ "count": %s,
+ "kernel": "%s",
+ "cmdline": "%s",
+ "cpu": %s,
+ "mem": %s,
+ "qemu": "%s",
+ "qemu_args": "-device virtio-scsi-pci,id=scsi -device scsi-hd,drive=rootfs -enable-kvm -cpu host,migratable=off",
+ "image_device": "drive index=0,id=rootfs,if=none,media=disk,file="
+ }
+}
+"""
+% (os_arch, port, self.syz_workdir, kernel_objdir, self.kernel_src,
+ self.rootfs, syz_target, self.syz_qemu_vms, self.kernel, kernel_cmdline,
+ self.syz_qemu_cpus, self.syz_qemu_mem, qemu_native_bin))
+
+ def test_syzkallerFuzzingQemux86_64(self):
+ self.image = 'core-image-minimal'
+ self.machine = 'qemux86-64'
+ self.fstype = "ext4"
+
+ self.write_config(
+"""
+MACHINE = "%s"
+IMAGE_FSTYPES = "%s"
+KERNEL_IMAGETYPES += "vmlinux"
+EXTRA_IMAGE_FEATURES += " ssh-server-openssh"
+IMAGE_ROOTFS_EXTRA_SPACE = "512000"
+KERNEL_EXTRA_FEATURES += " \
+ cfg/debug/syzkaller/debug-syzkaller.scc \
+"
+IMAGE_INSTALL:append = " syzkaller"
+"""
+% (self.machine, self.fstype))
+
+ build_vars = ['TOPDIR', 'DEPLOY_DIR_IMAGE', 'STAGING_KERNEL_DIR']
+ syz_fuzz_vars = ['SYZ_WORKDIR', 'SYZ_FUZZTIME', 'SYZ_QEMU_MEM', 'SYZ_QEMU_CPUS', 'SYZ_QEMU_VM_COUNT']
+ syz_aux_vars = ['SYZ_DUMMY_HCD_NUM']
+
+ needed_vars = build_vars + syz_fuzz_vars + syz_aux_vars
+ bb_vars = get_bb_vars(needed_vars)
+
+ for var in syz_fuzz_vars:
+ if not bb_vars[var]:
+ self.skipTest(
+"""
+%s variable not set.
+Please configure %s fuzzing parameters to run this test.
+
+Example local.conf config:
+SYZ_WORKDIR="<path>" # syzkaller workdir location (must be persistent across os-selftest runs)
+SYZ_FUZZTIME="30" # fuzzing time in minutes
+SYZ_QEMU_VM_COUNT="1" # number of qemu VMs to be used for fuzzing
+SYZ_QEMU_MEM="2048"' # memory used by each qemu VM
+SYZ_QEMU_CPUS="2"' # number of cpus used by each qemu VM
+"""
+% (var, ', '.join(syz_fuzz_vars)))
+
+ self.topdir = bb_vars['TOPDIR']
+ self.deploy_dir_image = bb_vars['DEPLOY_DIR_IMAGE']
+ self.kernel_src = bb_vars['STAGING_KERNEL_DIR']
+
+ """
+ SYZ_WORKDIR must be set to an absolute path where syzkaller will store
+ the corpus database, config, runtime and crash data generated during
+ fuzzing. It must be persistent between oe-selftest runs, so the fuzzer
+ does not start over again on each run.
+ """
+ self.syz_workdir = bb_vars['SYZ_WORKDIR']
+ self.syz_fuzztime = int(bb_vars['SYZ_FUZZTIME']) * 60
+ self.syz_qemu_mem = int(bb_vars['SYZ_QEMU_MEM'])
+ self.syz_qemu_cpus = int(bb_vars['SYZ_QEMU_CPUS'])
+ self.syz_qemu_vms = int(bb_vars['SYZ_QEMU_VM_COUNT'])
+ self.dummy_hcd_num = int(bb_vars['SYZ_DUMMY_HCD_NUM'] or 8)
+
+ self.syz_cfg = os.path.join(self.syz_workdir, 'syzkaller.cfg')
+ self.kernel = os.path.join(self.deploy_dir_image, 'bzImage')
+ self.rootfs = os.path.join(self.deploy_dir_image, '%s-%s.%s' % (self.image, self.machine, self.fstype))
+
+ self.syz_native_sysroot = get_bb_var('RECIPE_SYSROOT_NATIVE', 'syzkaller-native')
+
+ self.setUpSyzkallerConfig("linux/amd64", "x86_64")
+
+ bitbake(self.image)
+ bitbake('syzkaller')
+ bitbake('syzkaller-native -c addto_recipe_sysroot')
+
+ cmd = "syz-manager -config %s" % self.syz_cfg
+ runCmd(cmd, native_sysroot = self.syz_native_sysroot, timeout=self.syz_fuzztime, output_log=self.logger, ignore_status=True, shell=True)
diff --git a/meta-oe/recipes-test/syzkaller/syzkaller/0001-sys-targets-targets.go-allow-users-to-override-hardc.patch b/meta-oe/recipes-test/syzkaller/syzkaller/0001-sys-targets-targets.go-allow-users-to-override-hardc.patch
new file mode 100644
index 000000000..d647b8d4a
--- /dev/null
+++ b/meta-oe/recipes-test/syzkaller/syzkaller/0001-sys-targets-targets.go-allow-users-to-override-hardc.patch
@@ -0,0 +1,67 @@
+From aca1030d29f627314d13884ebc7b2c313d718df7 Mon Sep 17 00:00:00 2001
+From: Ovidiu Panait <ovidiu.panait@...>
+Date: Wed, 13 Apr 2022 17:17:54 +0300
+Subject: [PATCH] sys/targets/targets.go: allow users to override hardcoded
+ cross-compilers
+
+Currently, cross compiler names are hardcoded for each os/arch combo. However,
+toolchain tuples differ, especially when using vendor provided toolchains.
+Allow users to specify the cross compiler for an os/arch combo using
+SYZ_CC_<os>_<arch> environment variables.
+
+Also, remove hardcoded "-march=armv6" flag to fix compilation on arm.
+
+Upstream-Status: Inappropriate [embedded specific]
+
+Signed-off-by: Ovidiu Panait <ovidiu.panait@...>
+---
+ sys/targets/targets.go | 19 +++++++++++--------
+ 1 file changed, 11 insertions(+), 8 deletions(-)
+
+diff --git a/sys/targets/targets.go b/sys/targets/targets.go
+index f3be708f3..19a8bb681 100644
+--- a/sys/targets/targets.go
++++ b/sys/targets/targets.go
+@@ -258,7 +258,6 @@ var List = map[string]map[string]*Target{
+ PtrSize: 4,
+ PageSize: 4 << 10,
+ LittleEndian: true,
+- CFlags: []string{"-D__LINUX_ARM_ARCH__=6", "-march=armv6"},
+ Triple: "arm-linux-gnueabi",
+ KernelArch: "arm",
+ KernelHeaderArch: "arm",
+@@ -670,12 +669,16 @@ func initTarget(target *Target, OS, arch string) {
+ for i := range target.CFlags {
+ target.replaceSourceDir(&target.CFlags[i], sourceDir)
+ }
+- if OS == Linux && arch == runtime.GOARCH {
+- // Don't use cross-compiler for native compilation, there are cases when this does not work:
+- // https://github.com/google/syzkaller/pull/619
+- // https://github.com/google/syzkaller/issues/387
+- // https://github.com/google/syzkaller/commit/06db3cec94c54e1cf720cdd5db72761514569d56
+- target.Triple = ""
++ if OS == Linux {
++ if cc := os.Getenv("SYZ_CC_" + OS + "_" + arch); cc != "" {
++ target.CCompiler = cc
++ } else if arch == runtime.GOARCH {
++ // Don't use cross-compiler for native compilation, there are cases when this does not work:
++ // https://github.com/google/syzkaller/pull/619
++ // https://github.com/google/syzkaller/issues/387
++ // https://github.com/google/syzkaller/commit/06db3cec94c54e1cf720cdd5db72761514569d56
++ target.Triple = ""
++ }
+ }
+ if target.CCompiler == "" {
+ target.setCompiler(useClang)
+@@ -803,7 +806,7 @@ func (target *Target) lazyInit() {
+ // On CI we want to fail loudly if cross-compilation breaks.
+ // Also fail if SOURCEDIR_GOOS is set b/c in that case user probably assumes it will work.
+ if (target.OS != runtime.GOOS || !runningOnCI) && os.Getenv("SOURCEDIR_"+strings.ToUpper(target.OS)) == "" {
+- if _, err := exec.LookPath(target.CCompiler); err != nil {
++ if _, err := exec.LookPath(strings.Fields(target.CCompiler)[0]); err != nil {
+ target.BrokenCompiler = fmt.Sprintf("%v is missing (%v)", target.CCompiler, err)
+ return
+ }
+--
+2.25.1
+
diff --git a/meta-oe/recipes-test/syzkaller/syzkaller_git.bb b/meta-oe/recipes-test/syzkaller/syzkaller_git.bb
new file mode 100644
index 000000000..ffa472426
--- /dev/null
+++ b/meta-oe/recipes-test/syzkaller/syzkaller_git.bb
@@ -0,0 +1,85 @@
+DESCRIPTION = "syzkaller is an unsupervised coverage-guided kernel fuzzer"
+LICENSE = "Apache-2.0"
+LIC_FILES_CHKSUM = "file://src/${GO_IMPORT}/LICENSE;md5=5335066555b14d832335aa4660d6c376"
+
+inherit go-mod
+
+GO_IMPORT = "github.com/google/syzkaller"
+
+SRC_URI = "git://${GO_IMPORT};protocol=https;destsuffix=${BPN}-${PV}/src/${GO_IMPORT};branch=master \
+ file://0001-sys-targets-targets.go-allow-users-to-override-hardc.patch;patchdir=src/${GO_IMPORT} \
+ "
+SRCREV = "67cb024cd1a3c95e311263a5c95e957f9abfd8ca"
+
+COMPATIBLE_HOST = "(x86_64|i.86|arm|aarch64).*-linux"
+
+B = "${S}/src/${GO_IMPORT}/bin"
+
+GO_EXTRA_LDFLAGS += ' -X ${GO_IMPORT}/prog.GitRevision=${SRCREV}'
+
+export GOHOSTFLAGS="${GO_LINKSHARED} ${GOBUILDFLAGS}"
+export GOTARGETFLAGS="${GO_LINKSHARED} ${GOBUILDFLAGS}"
+export TARGETOS = '${GOOS}'
+export TARGETARCH = '${GOARCH}'
+export TARGETVMARCH = '${GOARCH}'
+
+CGO_ENABLED = "0"
+
+DEPENDS:class-native += "qemu-system-native"
+
+do_compile:class-native() {
+ export HOSTOS="${GOHOSTOS}"
+ export HOSTARCH="${GOHOSTARCH}"
+
+ oe_runmake HOSTGO="${GO}" host
+}
+
+do_compile:class-target() {
+ export HOSTOS="${GOOS}"
+ export HOSTARCH="${GOARCH}"
+ export SYZ_CC_${TARGETOS}_${TARGETARCH}="${CC}"
+
+ # Unset GOOS and GOARCH so that the correct syz-sysgen binary can be
+ # generated. Fixes:
+ # go install: cannot install cross-compiled binaries when GOBIN is set
+ unset GOOS
+ unset GOARCH
+
+ oe_runmake GO="${GO}" CC="${CC}" CFLAGS="${CFLAGS} ${LDFLAGS}" REV=${SRCREV} target
+}
+
+do_install:class-native() {
+ SYZ_BINS_NATIVE="\
+ syz-manager \
+ syz-runtest \
+ syz-repro \
+ syz-mutate \
+ syz-prog2c \
+ syz-db \
+ syz-upgrade \
+ "
+
+ install -d ${D}${bindir}
+
+ for i in ${SYZ_BINS_NATIVE}; do
+ install -m 0755 ${B}/${i} ${D}${bindir}
+ done
+}
+
+do_install:class-target() {
+ SYZ_TARGET_DIR="${TARGETOS}_${TARGETARCH}"
+ SYZ_BINS_TARGET=" \
+ syz-fuzzer \
+ syz-execprog \
+ syz-stress \
+ syz-executor \
+ "
+
+ install -d ${D}${bindir}/${SYZ_TARGET_DIR}
+
+ for i in ${SYZ_BINS_TARGET}; do
+ install -m 0755 ${B}/${SYZ_TARGET_DIR}/${i} ${D}${bindir}/${SYZ_TARGET_DIR}
+ done
+}
+
+BBCLASSEXTEND += "native"
--
2.37.3




[meta-oe][PATCH] uriparser: Upgrade 0.9.6 -> 0.9.7

Alex Kiernan
 

Update to use github-releases for upstream tracking.

Changelog:

2022-10-05 -- 0.9.7

* Fixed: Multiple issues with IPv6 and IPvFuture literal parsing
(GitHub #146, GitHub #150)
Thanks to Scallop Ye for the report and the pull request!
* Fixed: Fix symbol visibility for -DBUILD_SHARED_LIBS=OFF (GitHub #139,
GitHub #141); thanks to Mariusz Zaborski for the report!
* Fixed: For MinGW, use size_t for inet_ntop declaration and fix macro
checks for both MinGW and mingw-w64 (GitHub #131)
* Fixed: Compiler warnings (GitHub #132, GitHub #152)
* Improved: Use name UriConfig.h rather than generic config.h for the
config header file to avoid name clashes and also include it through
"UriConfig.h" with quotes rather than <UriConfig.h> so that it is found
in quote path locations (GitHub #149)
Thanks to Gaspard Petit for bringing this up!
* Improved: Document need for UriConfig.h in UriMemory.c (GitHub #136)
* Infrastructure: Add (support for) Visual Studio 17/2022 (GitHub #152)
* Infrastructure: Drop (support for) Visual Studio <=14/2015 (GitHub #152)
* Infrastructure: Update Clang from 13 to 15 (GitHub #143, GitHub #151)
* Infrastructure: Make MinGW with 32bit Wine on Ubuntu 20.04 possible
(GitHub #142, GitHub #144, GitHub #145)
* Soname: 1:30:0 — see https://verbump.de/ for what these numbers do

Signed-off-by: Alex Kiernan <alex.kiernan@...>
---
.../uriparser/{uriparser_0.9.6.bb => uriparser_0.9.7.bb} | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
rename meta-oe/recipes-support/uriparser/{uriparser_0.9.6.bb => uriparser_0.9.7.bb} (67%)

diff --git a/meta-oe/recipes-support/uriparser/uriparser_0.9.6.bb b/meta-oe/recipes-support/uriparser/uriparser_0.9.7.bb
similarity index 67%
rename from meta-oe/recipes-support/uriparser/uriparser_0.9.6.bb
rename to meta-oe/recipes-support/uriparser/uriparser_0.9.7.bb
index 0d45a155954c..421263e62b72 100644
--- a/meta-oe/recipes-support/uriparser/uriparser_0.9.6.bb
+++ b/meta-oe/recipes-support/uriparser/uriparser_0.9.7.bb
@@ -5,11 +5,11 @@ LICENSE = "BSD-3-Clause"
LIC_FILES_CHKSUM = "file://COPYING;md5=fcc5a53146c2401f4b4f6a3bdf3f0168"

SRC_URI = "https://github.com/${BPN}/${BPN}/releases/download/${BP}/${BP}.tar.gz"
-SRC_URI[sha256sum] = "10e6f90d359c1087c45f907f95e527a8aca84422251081d1533231e031a084ff"
+SRC_URI[sha256sum] = "11553b2abd2b5728a6c88e35ab08e807d0a0f23c44920df937778ce8cc4d40ff"

-UPSTREAM_CHECK_URI = "https://github.com/${BPN}/${BPN}/releases"
+inherit cmake github-releases

-inherit cmake
+UPSTREAM_CHECK_REGEX = "releases/tag/${BPN}-(?P<pver>\d+(\.\d+)+)"

EXTRA_OECMAKE += "-DURIPARSER_BUILD_DOCS:BOOL=OFF -DURIPARSER_BUILD_TESTS:BOOL=OFF"

--
2.35.1


Re: [meta-oe][PATCHv2] perfetto: build libperfetto

Markus Volk
 

v2 adds meson.project_version() to fix 'version: undefined' in the pc file

Am Mo, 17. Okt 2022 um 19:30:21 +0200 schrieb Markus Volk <f_l_k@...>:

- Mesa has support for perfetto, but the libperfetto library is needed - Only v27 seems to be supported for now. Update perfetto accordingly - Make sure perfetto and libperfetto share the same codebase - Patch meson.build to allow shared build - Add a version number to avoid having a non symlink so file packaged into dev package. - Create a PC file for libperfetto to allow mesa to find it using pkgconfig. - Add nobranch=1 for the git repos to silence warnings about missing default branch Signed-off-by: Markus Volk <f_l_k@...> --- ...1-meson-add-pc-file-for-lib_perfetto.patch | 52 +++++++++++++++++++ .../recipes-devtools/perfetto/libperfetto.bb | 11 ++++ meta-oe/recipes-devtools/perfetto/perfetto.bb | 14 ++--- .../recipes-devtools/perfetto/perfetto.inc | 9 ++++ 4 files changed, 79 insertions(+), 7 deletions(-) create mode 100644 meta-oe/recipes-devtools/perfetto/files/0001-meson-add-pc-file-for-lib_perfetto.patch create mode 100644 meta-oe/recipes-devtools/perfetto/libperfetto.bb create mode 100644 meta-oe/recipes-devtools/perfetto/perfetto.inc diff --git a/meta-oe/recipes-devtools/perfetto/files/0001-meson-add-pc-file-for-lib_perfetto.patch b/meta-oe/recipes-devtools/perfetto/files/0001-meson-add-pc-file-for-lib_perfetto.patch new file mode 100644 index 000000000..70de44173 --- /dev/null +++ b/meta-oe/recipes-devtools/perfetto/files/0001-meson-add-pc-file-for-lib_perfetto.patch @@ -0,0 +1,52 @@ +From 027f90dc9386ec08f2a5107025683e5fed6f3444 Mon Sep 17 00:00:00 2001 +From: Markus Volk <f_l_k@...> +Date: Mon, 17 Oct 2022 19:20:53 +0200 +Subject: [PATCH] meson: add PC file for lib_perfetto + +--- + meson.build | 12 ++++++++++-- + 1 file changed, 10 insertions(+), 2 deletions(-) + +diff --git a/meson.build b/meson.build +index 06015141c..752b4d928 100644 +--- a/meson.build ++++ b/meson.build +@@ -19,9 +19,12 @@ + project( + 'perfetto', + ['c','cpp'], +- default_options: ['c_std=c99', 'cpp_std=c++11'] ++ default_options: ['c_std=c99', 'cpp_std=c++11'], ++ version: '27.1' + ) + ++soversion = meson.project_version() ++ + fs = import('fs') + + if not fs.is_dir('sdk') +@@ -30,8 +33,9 @@ endif + + dep_threads = dependency('threads') + +-lib_perfetto = static_library( ++lib_perfetto = shared_library( + 'perfetto', ++ version: soversion, + sources: 'sdk/perfetto.cc', + dependencies: dep_threads, + install: true, +@@ -39,6 +43,10 @@ lib_perfetto = static_library( + + inc_perfetto = include_directories('sdk') + ++install_headers('sdk/perfetto.h') ++pkg = import('pkgconfig') ++pkg.generate(lib_perfetto) ++ + dep_perfetto = declare_dependency( + link_with: lib_perfetto, + include_directories: inc_perfetto, +-- +2.34.1 + diff --git a/meta-oe/recipes-devtools/perfetto/libperfetto.bb b/meta-oe/recipes-devtools/perfetto/libperfetto.bb new file mode 100644 index 000000000..d58e31414 --- /dev/null +++ b/meta-oe/recipes-devtools/perfetto/libperfetto.bb @@ -0,0 +1,11 @@ +LICENSE = "Apache-2.0" +LIC_FILES_CHKSUM = "file://LICENSE;md5=f87516e0b698007e9e75a1fe1012b390" + +require perfetto.inc + +inherit meson + +SRC_URI:append = " file://0001-meson-add-pc-file-for-lib_perfetto.patch" + +FILES:${PN} += "${datadir}" +BBCLASSEXTEND = "native nativesdk" diff --git a/meta-oe/recipes-devtools/perfetto/perfetto.bb b/meta-oe/recipes-devtools/perfetto/perfetto.bb index 94c39e9cc..c1b099430 100644 --- a/meta-oe/recipes-devtools/perfetto/perfetto.bb +++ b/meta-oe/recipes-devtools/perfetto/perfetto.bb @@ -10,16 +10,15 @@ LIC_FILES_CHKSUM = "file://LICENSE;md5=f87516e0b698007e9e75a1fe1012b390 \ file://debian/copyright;md5=4e08364c82141f181de69d0a2b89d612 \ file://python/LICENSE;md5=c602a632c34ade9c78a976734077bce7" -SRC_URI = "git://github.com/google/perfetto.git;protocol=https;name=perfetto \ +SRC_URI:append = " \ git://github.com/protocolbuffers/protobuf.git;branch=3.9.x;protocol=https;destsuffix=git/buildtools/protobuf;name=protobuf \ - git://chromium.googlesource.com/external/github.com/llvm/llvm-project/libcxx.git;protocol=https;destsuffix=git/buildtools/libcxx;name=libcxx \ - git://chromium.googlesource.com/external/github.com/llvm/llvm-project/libcxxabi.git;protocol=https;destsuffix=git/buildtools/libcxxabi;name=libcxxabi \ - git://chromium.googlesource.com/external/github.com/llvm/llvm-project/libunwind.git;protocol=https;destsuffix=git/buildtools/libunwind;name=libunwind \ - git://android.googlesource.com/platform/external/zlib.git;branch=master;protocol=https;destsuffix=git/buildtools/zlib;name=zlib \ + git://chromium.googlesource.com/external/github.com/llvm/llvm-project/libcxx.git;protocol=https;destsuffix=git/buildtools/libcxx;name=libcxx;nobranch=1 \ + git://chromium.googlesource.com/external/github.com/llvm/llvm-project/libcxxabi.git;protocol=https;destsuffix=git/buildtools/libcxxabi;name=libcxxabi;nobranch=1 \ + git://chromium.googlesource.com/external/github.com/llvm/llvm-project/libunwind.git;protocol=https;destsuffix=git/buildtools/libunwind;name=libunwind;nobranch=1 \ + git://android.googlesource.com/platform/external/zlib.git;branch=master;protocol=https;destsuffix=git/buildtools/zlib;name=zlib;nobranch=1 \ https://storage.googleapis.com/perfetto/gn-linux64-1968-0725d782;subdir=git/buildtools/;name=gn \ file://0001-Remove-check_build_deps-build-steps.patch " -SRCREV_perfetto = "5bd3f582c075d0d026c5fe0b5e291d34dee0d976" SRCREV_protobuf = "6a59a2ad1f61d9696092f79b6d74368b4d7970a3" SRCREV_libcxx = "d9040c75cfea5928c804ab7c235fed06a63f743a" SRCREV_libcxxabi = "196ba1aaa8ac285d94f4ea8d9836390a45360533" @@ -27,6 +26,8 @@ SRCREV_libunwind = "d999d54f4bca789543a2eb6c995af2d9b5a1f3ed" SRCREV_zlib = "5c85a2da4c13eda07f69d81a1579a5afddd35f59" SRC_URI[gn.sha256sum] = "f706aaa0676e3e22f5fc9ca482295d7caee8535d1869f99efa2358177b64f5cd" +require perfetto.inc + DEPENDS += " ninja-native" COMPATIBLE_HOST = "(i.86|x86_64|aarch64|arm).*-linux*" @@ -35,7 +36,6 @@ FILES:${PN}:append = " \ ${bindir}/tracebox \ " -S = "${WORKDIR}/git" B = "${WORKDIR}/build" CXXFLAGS:append:arm = "${@bb.utils.contains('TUNE_FEATURES', 'callconvention-hard', ' -mfloat-abi=hard', '', d)}" diff --git a/meta-oe/recipes-devtools/perfetto/perfetto.inc b/meta-oe/recipes-devtools/perfetto/perfetto.inc new file mode 100644 index 000000000..5cb6f8bb3 --- /dev/null +++ b/meta-oe/recipes-devtools/perfetto/perfetto.inc @@ -0,0 +1,9 @@ +SUMMARY = "Perfetto - System profiling, app tracing and trace analysis." +HOMEPAGE = "https://github.com/google/perfetto" + +SRC_URI = "git://github.com/google/perfetto.git;protocol=https;name=perfetto;nobranch=1" + +SRCREV_perfetto = "1c52b5e132312aeb007ed180d4ba1d8d66227923" +PV = "27.1" + +S = "${WORKDIR}/git"
--
2.34.1


[meta-oe][PATCHv2] perfetto: build libperfetto

Markus Volk
 

- Mesa has support for perfetto, but the libperfetto library is needed
- Only v27 seems to be supported for now. Update perfetto accordingly
- Make sure perfetto and libperfetto share the same codebase
- Patch meson.build to allow shared build
- Add a version number to avoid having a non symlink so file packaged int=
o dev package.
- Create a PC file for libperfetto to allow mesa to find it using pkgconf=
ig.
- Add nobranch=3D1 for the git repos to silence warnings about missing de=
fault branch

Signed-off-by: Markus Volk <f_l_k@...>
---
...1-meson-add-pc-file-for-lib_perfetto.patch | 52 +++++++++++++++++++
.../recipes-devtools/perfetto/libperfetto.bb | 11 ++++
meta-oe/recipes-devtools/perfetto/perfetto.bb | 14 ++---
.../recipes-devtools/perfetto/perfetto.inc | 9 ++++
4 files changed, 79 insertions(+), 7 deletions(-)
create mode 100644 meta-oe/recipes-devtools/perfetto/files/0001-meson-ad=
d-pc-file-for-lib_perfetto.patch
create mode 100644 meta-oe/recipes-devtools/perfetto/libperfetto.bb
create mode 100644 meta-oe/recipes-devtools/perfetto/perfetto.inc

diff --git a/meta-oe/recipes-devtools/perfetto/files/0001-meson-add-pc-fi=
le-for-lib_perfetto.patch b/meta-oe/recipes-devtools/perfetto/files/0001-=
meson-add-pc-file-for-lib_perfetto.patch
new file mode 100644
index 000000000..70de44173
--- /dev/null
+++ b/meta-oe/recipes-devtools/perfetto/files/0001-meson-add-pc-file-for-=
lib_perfetto.patch
@@ -0,0 +1,52 @@
+From 027f90dc9386ec08f2a5107025683e5fed6f3444 Mon Sep 17 00:00:00 2001
+From: Markus Volk <f_l_k@...>
+Date: Mon, 17 Oct 2022 19:20:53 +0200
+Subject: [PATCH] meson: add PC file for lib_perfetto
+
+---
+ meson.build | 12 ++++++++++--
+ 1 file changed, 10 insertions(+), 2 deletions(-)
+
+diff --git a/meson.build b/meson.build
+index 06015141c..752b4d928 100644
+--- a/meson.build
++++ b/meson.build
+@@ -19,9 +19,12 @@
+ project(
+ 'perfetto',
+ ['c','cpp'],
+- default_options: ['c_std=3Dc99', 'cpp_std=3Dc++11']
++ default_options: ['c_std=3Dc99', 'cpp_std=3Dc++11'],
++ version: '27.1'
+ )
+=20
++soversion =3D meson.project_version()
++
+ fs =3D import('fs')
+=20
+ if not fs.is_dir('sdk')
+@@ -30,8 +33,9 @@ endif
+=20
+ dep_threads =3D dependency('threads')
+=20
+-lib_perfetto =3D static_library(
++lib_perfetto =3D shared_library(
+ 'perfetto',
++ version: soversion,
+ sources: 'sdk/perfetto.cc',
+ dependencies: dep_threads,
+ install: true,
+@@ -39,6 +43,10 @@ lib_perfetto =3D static_library(
+=20
+ inc_perfetto =3D include_directories('sdk')
+=20
++install_headers('sdk/perfetto.h')
++pkg =3D import('pkgconfig')
++pkg.generate(lib_perfetto)
++
+ dep_perfetto =3D declare_dependency(
+ link_with: lib_perfetto,
+ include_directories: inc_perfetto,
+--=20
+2.34.1
+
diff --git a/meta-oe/recipes-devtools/perfetto/libperfetto.bb b/meta-oe/r=
ecipes-devtools/perfetto/libperfetto.bb
new file mode 100644
index 000000000..d58e31414
--- /dev/null
+++ b/meta-oe/recipes-devtools/perfetto/libperfetto.bb
@@ -0,0 +1,11 @@
+LICENSE =3D "Apache-2.0"
+LIC_FILES_CHKSUM =3D "file://LICENSE;md5=3Df87516e0b698007e9e75a1fe1012b=
390"
+
+require perfetto.inc
+
+inherit meson
+
+SRC_URI:append =3D " file://0001-meson-add-pc-file-for-lib_perfetto.patc=
h"
+
+FILES:${PN} +=3D "${datadir}"
+BBCLASSEXTEND =3D "native nativesdk"
diff --git a/meta-oe/recipes-devtools/perfetto/perfetto.bb b/meta-oe/reci=
pes-devtools/perfetto/perfetto.bb
index 94c39e9cc..c1b099430 100644
--- a/meta-oe/recipes-devtools/perfetto/perfetto.bb
+++ b/meta-oe/recipes-devtools/perfetto/perfetto.bb
@@ -10,16 +10,15 @@ LIC_FILES_CHKSUM =3D "file://LICENSE;md5=3Df87516e0b6=
98007e9e75a1fe1012b390 \
file://debian/copyright;md5=3D4e08364c82141f181de69d=
0a2b89d612 \
file://python/LICENSE;md5=3Dc602a632c34ade9c78a97673=
4077bce7"
=20
-SRC_URI =3D "git://github.com/google/perfetto.git;protocol=3Dhttps;name=3D=
perfetto \
+SRC_URI:append =3D " \
git://github.com/protocolbuffers/protobuf.git;branch=3D3.9.x;=
protocol=3Dhttps;destsuffix=3Dgit/buildtools/protobuf;name=3Dprotobuf \
- git://chromium.googlesource.com/external/github.com/llvm/llvm=
-project/libcxx.git;protocol=3Dhttps;destsuffix=3Dgit/buildtools/libcxx;n=
ame=3Dlibcxx \
- git://chromium.googlesource.com/external/github.com/llvm/llvm=
-project/libcxxabi.git;protocol=3Dhttps;destsuffix=3Dgit/buildtools/libcx=
xabi;name=3Dlibcxxabi \
- git://chromium.googlesource.com/external/github.com/llvm/llvm=
-project/libunwind.git;protocol=3Dhttps;destsuffix=3Dgit/buildtools/libun=
wind;name=3Dlibunwind \
- git://android.googlesource.com/platform/external/zlib.git;bra=
nch=3Dmaster;protocol=3Dhttps;destsuffix=3Dgit/buildtools/zlib;name=3Dzli=
b \
+ git://chromium.googlesource.com/external/github.com/llvm/llvm=
-project/libcxx.git;protocol=3Dhttps;destsuffix=3Dgit/buildtools/libcxx;n=
ame=3Dlibcxx;nobranch=3D1 \
+ git://chromium.googlesource.com/external/github.com/llvm/llvm=
-project/libcxxabi.git;protocol=3Dhttps;destsuffix=3Dgit/buildtools/libcx=
xabi;name=3Dlibcxxabi;nobranch=3D1 \
+ git://chromium.googlesource.com/external/github.com/llvm/llvm=
-project/libunwind.git;protocol=3Dhttps;destsuffix=3Dgit/buildtools/libun=
wind;name=3Dlibunwind;nobranch=3D1 \
+ git://android.googlesource.com/platform/external/zlib.git;bra=
nch=3Dmaster;protocol=3Dhttps;destsuffix=3Dgit/buildtools/zlib;name=3Dzli=
b;nobranch=3D1 \
https://storage.googleapis.com/perfetto/gn-linux64-1968-0725d=
782;subdir=3Dgit/buildtools/;name=3Dgn \
file://0001-Remove-check_build_deps-build-steps.patch "
=20
-SRCREV_perfetto =3D "5bd3f582c075d0d026c5fe0b5e291d34dee0d976"
SRCREV_protobuf =3D "6a59a2ad1f61d9696092f79b6d74368b4d7970a3"
SRCREV_libcxx =3D "d9040c75cfea5928c804ab7c235fed06a63f743a"
SRCREV_libcxxabi =3D "196ba1aaa8ac285d94f4ea8d9836390a45360533"
@@ -27,6 +26,8 @@ SRCREV_libunwind =3D "d999d54f4bca789543a2eb6c995af2d9b=
5a1f3ed"
SRCREV_zlib =3D "5c85a2da4c13eda07f69d81a1579a5afddd35f59"
SRC_URI[gn.sha256sum] =3D "f706aaa0676e3e22f5fc9ca482295d7caee8535d1869f=
99efa2358177b64f5cd"
=20
+require perfetto.inc
+
DEPENDS +=3D " ninja-native"
=20
COMPATIBLE_HOST =3D "(i.86|x86_64|aarch64|arm).*-linux*"
@@ -35,7 +36,6 @@ FILES:${PN}:append =3D " \
${bindir}/tracebox \
"
=20
-S =3D "${WORKDIR}/git"
B =3D "${WORKDIR}/build"
=20
CXXFLAGS:append:arm =3D "${@bb.utils.contains('TUNE_FEATURES', 'callconv=
ention-hard', ' -mfloat-abi=3Dhard', '', d)}"
diff --git a/meta-oe/recipes-devtools/perfetto/perfetto.inc b/meta-oe/rec=
ipes-devtools/perfetto/perfetto.inc
new file mode 100644
index 000000000..5cb6f8bb3
--- /dev/null
+++ b/meta-oe/recipes-devtools/perfetto/perfetto.inc
@@ -0,0 +1,9 @@
+SUMMARY =3D "Perfetto - System profiling, app tracing and trace analysis=
."
+HOMEPAGE =3D "https://github.com/google/perfetto"
+
+SRC_URI =3D "git://github.com/google/perfetto.git;protocol=3Dhttps;name=3D=
perfetto;nobranch=3D1"
+
+SRCREV_perfetto =3D "1c52b5e132312aeb007ed180d4ba1d8d66227923"
+PV =3D "27.1"
+
+S =3D "${WORKDIR}/git"
--=20
2.34.1


Yocto Project Summit: 2011.11

Armin Kuster
 

Hello,

This is a reminder that the Yocto Project Summit is scheduled for November 29th to December. Registration is open.

The CFP still open and will close in 12 days from now on Oct 28th.


For more information see: https://www.yoctoproject.org/yocto-project-summit-2022-11/

regards,
Armin


[meta-oe][PATCH v2] syzkaller: add recipe and selftest for syzkaller fuzzing

Ovidiu Panait
 

Syzkaller is a coverage-guided fuzzer that is widely used to find bugs in
the Linux kernel:
https://github.com/google/syzkaller

Add the recipe and a selftest for running the fuzzer in a qemux86-64
kvm environment. The following steps can be used to start the test:
"""
cat >> conf/local.conf <<EOF
SYZ_WORKDIR="<path>"
SYZ_FUZZTIME="30"
SYZ_QEMU_VM_COUNT="2"
SYZ_QEMU_MEM="2048"
SYZ_QEMU_CPUS="2"
EOF

oe-selftest -r syzkaller
...
loading corpus...
serving http on http://127.0.0.1:49605
serving rpc on tcp://[::]:46475
booting test machines...
wait for the connection from test machine...
vm-0: crash: KCSAN: data-race in poll_schedule_timeout.constprop.NUM / pollwake
vm-1: crash: KCSAN: data-race in mutex_spin_on_owner
machine check:
syscalls : 2227/4223
code coverage : enabled
comparison tracing : enabled
extra coverage : enabled
delay kcov mmap : mmap returned an invalid pointer
setuid sandbox : enabled
namespace sandbox : enabled
Android sandbox : /sys/fs/selinux/policy does not exist
fault injection : enabled
leak checking : enabled
net packet injection : enabled
net device setup : enabled
concurrency sanitizer : enabled
devlink PCI setup : PCI device 0000:00:10.0 is not available
USB emulation : enabled
hci packet injection : enabled
wifi device emulation : enabled
802.15.4 emulation : enabled
corpus : 0 (deleted 0 broken)
seeds : 0/0
VMs 2, executed 1, cover 0, signal 0/0, crashes 2, repro 0
vm-1: crash: KCSAN: data-race in mutex_spin_on_owner
"""

This will fuzz the yocto kernel for 30 minutes using 2 qemu VMs, each VM
getting 2048MB of memory and 2 CPUs.

The path in SYZ_WORKDIR must be an absolute path that is persistent across
oe-selftest runs, so that fuzzing does not start all over again on each
invocation. Syzkaller will save the corpus database in that directory and will
use the database to keep track of the interfaces already fuzzed.

After the test is done, <workdir>/crashes directory will contain the report
files for all the bugs found.

Signed-off-by: Ovidiu Panait <ovidiu.panait@...>
---
meta-oe/lib/oeqa/selftest/cases/syzkaller.py | 124 ++++++++++++++++++
...ets.go-allow-users-to-override-hardc.patch | 67 ++++++++++
.../recipes-test/syzkaller/syzkaller_git.bb | 85 ++++++++++++
3 files changed, 276 insertions(+)
create mode 100644 meta-oe/lib/oeqa/selftest/cases/syzkaller.py
create mode 100644 meta-oe/recipes-test/syzkaller/syzkaller/0001-sys-targets-targets.go-allow-users-to-override-hardc.patch
create mode 100644 meta-oe/recipes-test/syzkaller/syzkaller_git.bb

diff --git a/meta-oe/lib/oeqa/selftest/cases/syzkaller.py b/meta-oe/lib/oeqa/selftest/cases/syzkaller.py
new file mode 100644
index 000000000..64fc864bf
--- /dev/null
+++ b/meta-oe/lib/oeqa/selftest/cases/syzkaller.py
@@ -0,0 +1,124 @@
+#
+# SPDX-License-Identifier: MIT
+#
+
+from oeqa.selftest.case import OESelftestTestCase
+from oeqa.utils.commands import runCmd, bitbake, get_bb_var, get_bb_vars
+from oeqa.utils.network import get_free_port
+
+class TestSyzkaller(OESelftestTestCase):
+ def setUpSyzkallerConfig(self, os_arch, qemu_postfix):
+ syz_target_sysroot = get_bb_var('PKGD', 'syzkaller')
+ syz_target = os.path.join(syz_target_sysroot, 'usr')
+
+ qemu_native_bin = os.path.join(self.syz_native_sysroot, 'usr/bin/qemu-system-' + qemu_postfix)
+ kernel_cmdline = "ip=dhcp rootfs=/dev/sda dummy_hcd.num=%s" % (self.dummy_hcd_num)
+ kernel_objdir = self.deploy_dir_image
+ port = get_free_port()
+
+ if not os.path.exists(self.syz_workdir):
+ os.mkdir(self.syz_workdir)
+
+ with open(self.syz_cfg, 'w') as f:
+ f.write(
+"""
+{
+ "target": "%s",
+ "http": "127.0.0.1:%s",
+ "workdir": "%s",
+ "kernel_obj": "%s",
+ "kernel_src": "%s",
+ "image": "%s",
+ "syzkaller": "%s",
+ "type": "qemu",
+ "reproduce" : false,
+ "sandbox": "none",
+ "vm": {
+ "count": %s,
+ "kernel": "%s",
+ "cmdline": "%s",
+ "cpu": %s,
+ "mem": %s,
+ "qemu": "%s",
+ "qemu_args": "-device virtio-scsi-pci,id=scsi -device scsi-hd,drive=rootfs -enable-kvm -cpu host,migratable=off",
+ "image_device": "drive index=0,id=rootfs,if=none,media=disk,file="
+ }
+}
+"""
+% (os_arch, port, self.syz_workdir, kernel_objdir, self.kernel_src,
+ self.rootfs, syz_target, self.syz_qemu_vms, self.kernel, kernel_cmdline,
+ self.syz_qemu_cpus, self.syz_qemu_mem, qemu_native_bin))
+
+ def test_syzkallerFuzzingQemux86_64(self):
+ self.image = 'core-image-minimal'
+ self.machine = 'qemux86-64'
+ self.fstype = "ext4"
+
+ self.write_config(
+"""
+MACHINE = "%s"
+IMAGE_FSTYPES = "%s"
+KERNEL_IMAGETYPES += "vmlinux"
+EXTRA_IMAGE_FEATURES += " ssh-server-openssh"
+IMAGE_ROOTFS_EXTRA_SPACE = "512000"
+KERNEL_EXTRA_FEATURES += " \
+ cfg/debug/syzkaller/debug-syzkaller.scc \
+"
+IMAGE_INSTALL:append = " syzkaller"
+"""
+% (self.machine, self.fstype))
+
+ build_vars = ['TOPDIR', 'DEPLOY_DIR_IMAGE', 'STAGING_KERNEL_DIR']
+ syz_fuzz_vars = ['SYZ_WORKDIR', 'SYZ_FUZZTIME', 'SYZ_QEMU_MEM', 'SYZ_QEMU_CPUS', 'SYZ_QEMU_VM_COUNT']
+ syz_aux_vars = ['SYZ_DUMMY_HCD_NUM']
+
+ needed_vars = build_vars + syz_fuzz_vars + syz_aux_vars
+ bb_vars = get_bb_vars(needed_vars)
+
+ for var in syz_fuzz_vars:
+ if not bb_vars[var]:
+ self.skipTest(
+"""
+%s variable not set.
+Please configure %s fuzzing parameters to run this test.
+
+Example local.conf config:
+SYZ_WORKDIR="<path>" # syzkaller workdir location (must be persistent across os-selftest runs)
+SYZ_FUZZTIME="30" # fuzzing time in minutes
+SYZ_QEMU_VM_COUNT="1" # number of qemu VMs to be used for fuzzing
+SYZ_QEMU_MEM="2048"' # memory used by each qemu VM
+SYZ_QEMU_CPUS="2"' # number of cpus used by each qemu VM
+"""
+% (var, ', '.join(syz_fuzz_vars)))
+
+ self.topdir = bb_vars['TOPDIR']
+ self.deploy_dir_image = bb_vars['DEPLOY_DIR_IMAGE']
+ self.kernel_src = bb_vars['STAGING_KERNEL_DIR']
+
+ """
+ SYZ_WORKDIR must be set to an absolute path where syzkaller will store
+ the corpus database, config, runtime and crash data generated during
+ fuzzing. It must be persistent between oe-selftest runs, so the fuzzer
+ does not start over again on each run.
+ """
+ self.syz_workdir = bb_vars['SYZ_WORKDIR']
+ self.syz_fuzztime = int(bb_vars['SYZ_FUZZTIME']) * 60
+ self.syz_qemu_mem = int(bb_vars['SYZ_QEMU_MEM'])
+ self.syz_qemu_cpus = int(bb_vars['SYZ_QEMU_CPUS'])
+ self.syz_qemu_vms = int(bb_vars['SYZ_QEMU_VM_COUNT'])
+ self.dummy_hcd_num = int(bb_vars['SYZ_DUMMY_HCD_NUM'] or 8)
+
+ self.syz_cfg = os.path.join(self.syz_workdir, 'syzkaller.cfg')
+ self.kernel = os.path.join(self.deploy_dir_image, 'bzImage')
+ self.rootfs = os.path.join(self.deploy_dir_image, '%s-%s.%s' % (self.image, self.machine, self.fstype))
+
+ self.syz_native_sysroot = get_bb_var('RECIPE_SYSROOT_NATIVE', 'syzkaller-native')
+
+ self.setUpSyzkallerConfig("linux/amd64", "x86_64")
+
+ bitbake(self.image)
+ bitbake('syzkaller')
+ bitbake('syzkaller-native -c addto_recipe_sysroot')
+
+ cmd = "syz-manager -config %s" % self.syz_cfg
+ runCmd(cmd, native_sysroot = self.syz_native_sysroot, timeout=self.syz_fuzztime, output_log=self.logger, ignore_status=True, shell=True)
diff --git a/meta-oe/recipes-test/syzkaller/syzkaller/0001-sys-targets-targets.go-allow-users-to-override-hardc.patch b/meta-oe/recipes-test/syzkaller/syzkaller/0001-sys-targets-targets.go-allow-users-to-override-hardc.patch
new file mode 100644
index 000000000..d647b8d4a
--- /dev/null
+++ b/meta-oe/recipes-test/syzkaller/syzkaller/0001-sys-targets-targets.go-allow-users-to-override-hardc.patch
@@ -0,0 +1,67 @@
+From aca1030d29f627314d13884ebc7b2c313d718df7 Mon Sep 17 00:00:00 2001
+From: Ovidiu Panait <ovidiu.panait@...>
+Date: Wed, 13 Apr 2022 17:17:54 +0300
+Subject: [PATCH] sys/targets/targets.go: allow users to override hardcoded
+ cross-compilers
+
+Currently, cross compiler names are hardcoded for each os/arch combo. However,
+toolchain tuples differ, especially when using vendor provided toolchains.
+Allow users to specify the cross compiler for an os/arch combo using
+SYZ_CC_<os>_<arch> environment variables.
+
+Also, remove hardcoded "-march=armv6" flag to fix compilation on arm.
+
+Upstream-Status: Inappropriate [embedded specific]
+
+Signed-off-by: Ovidiu Panait <ovidiu.panait@...>
+---
+ sys/targets/targets.go | 19 +++++++++++--------
+ 1 file changed, 11 insertions(+), 8 deletions(-)
+
+diff --git a/sys/targets/targets.go b/sys/targets/targets.go
+index f3be708f3..19a8bb681 100644
+--- a/sys/targets/targets.go
++++ b/sys/targets/targets.go
+@@ -258,7 +258,6 @@ var List = map[string]map[string]*Target{
+ PtrSize: 4,
+ PageSize: 4 << 10,
+ LittleEndian: true,
+- CFlags: []string{"-D__LINUX_ARM_ARCH__=6", "-march=armv6"},
+ Triple: "arm-linux-gnueabi",
+ KernelArch: "arm",
+ KernelHeaderArch: "arm",
+@@ -670,12 +669,16 @@ func initTarget(target *Target, OS, arch string) {
+ for i := range target.CFlags {
+ target.replaceSourceDir(&target.CFlags[i], sourceDir)
+ }
+- if OS == Linux && arch == runtime.GOARCH {
+- // Don't use cross-compiler for native compilation, there are cases when this does not work:
+- // https://github.com/google/syzkaller/pull/619
+- // https://github.com/google/syzkaller/issues/387
+- // https://github.com/google/syzkaller/commit/06db3cec94c54e1cf720cdd5db72761514569d56
+- target.Triple = ""
++ if OS == Linux {
++ if cc := os.Getenv("SYZ_CC_" + OS + "_" + arch); cc != "" {
++ target.CCompiler = cc
++ } else if arch == runtime.GOARCH {
++ // Don't use cross-compiler for native compilation, there are cases when this does not work:
++ // https://github.com/google/syzkaller/pull/619
++ // https://github.com/google/syzkaller/issues/387
++ // https://github.com/google/syzkaller/commit/06db3cec94c54e1cf720cdd5db72761514569d56
++ target.Triple = ""
++ }
+ }
+ if target.CCompiler == "" {
+ target.setCompiler(useClang)
+@@ -803,7 +806,7 @@ func (target *Target) lazyInit() {
+ // On CI we want to fail loudly if cross-compilation breaks.
+ // Also fail if SOURCEDIR_GOOS is set b/c in that case user probably assumes it will work.
+ if (target.OS != runtime.GOOS || !runningOnCI) && os.Getenv("SOURCEDIR_"+strings.ToUpper(target.OS)) == "" {
+- if _, err := exec.LookPath(target.CCompiler); err != nil {
++ if _, err := exec.LookPath(strings.Fields(target.CCompiler)[0]); err != nil {
+ target.BrokenCompiler = fmt.Sprintf("%v is missing (%v)", target.CCompiler, err)
+ return
+ }
+--
+2.25.1
+
diff --git a/meta-oe/recipes-test/syzkaller/syzkaller_git.bb b/meta-oe/recipes-test/syzkaller/syzkaller_git.bb
new file mode 100644
index 000000000..ffa472426
--- /dev/null
+++ b/meta-oe/recipes-test/syzkaller/syzkaller_git.bb
@@ -0,0 +1,85 @@
+DESCRIPTION = "syzkaller is an unsupervised coverage-guided kernel fuzzer"
+LICENSE = "Apache-2.0"
+LIC_FILES_CHKSUM = "file://src/${GO_IMPORT}/LICENSE;md5=5335066555b14d832335aa4660d6c376"
+
+inherit go-mod
+
+GO_IMPORT = "github.com/google/syzkaller"
+
+SRC_URI = "git://${GO_IMPORT};protocol=https;destsuffix=${BPN}-${PV}/src/${GO_IMPORT};branch=master \
+ file://0001-sys-targets-targets.go-allow-users-to-override-hardc.patch;patchdir=src/${GO_IMPORT} \
+ "
+SRCREV = "67cb024cd1a3c95e311263a5c95e957f9abfd8ca"
+
+COMPATIBLE_HOST = "(x86_64|i.86|arm|aarch64).*-linux"
+
+B = "${S}/src/${GO_IMPORT}/bin"
+
+GO_EXTRA_LDFLAGS += ' -X ${GO_IMPORT}/prog.GitRevision=${SRCREV}'
+
+export GOHOSTFLAGS="${GO_LINKSHARED} ${GOBUILDFLAGS}"
+export GOTARGETFLAGS="${GO_LINKSHARED} ${GOBUILDFLAGS}"
+export TARGETOS = '${GOOS}'
+export TARGETARCH = '${GOARCH}'
+export TARGETVMARCH = '${GOARCH}'
+
+CGO_ENABLED = "0"
+
+DEPENDS:class-native += "qemu-system-native"
+
+do_compile:class-native() {
+ export HOSTOS="${GOHOSTOS}"
+ export HOSTARCH="${GOHOSTARCH}"
+
+ oe_runmake HOSTGO="${GO}" host
+}
+
+do_compile:class-target() {
+ export HOSTOS="${GOOS}"
+ export HOSTARCH="${GOARCH}"
+ export SYZ_CC_${TARGETOS}_${TARGETARCH}="${CC}"
+
+ # Unset GOOS and GOARCH so that the correct syz-sysgen binary can be
+ # generated. Fixes:
+ # go install: cannot install cross-compiled binaries when GOBIN is set
+ unset GOOS
+ unset GOARCH
+
+ oe_runmake GO="${GO}" CC="${CC}" CFLAGS="${CFLAGS} ${LDFLAGS}" REV=${SRCREV} target
+}
+
+do_install:class-native() {
+ SYZ_BINS_NATIVE="\
+ syz-manager \
+ syz-runtest \
+ syz-repro \
+ syz-mutate \
+ syz-prog2c \
+ syz-db \
+ syz-upgrade \
+ "
+
+ install -d ${D}${bindir}
+
+ for i in ${SYZ_BINS_NATIVE}; do
+ install -m 0755 ${B}/${i} ${D}${bindir}
+ done
+}
+
+do_install:class-target() {
+ SYZ_TARGET_DIR="${TARGETOS}_${TARGETARCH}"
+ SYZ_BINS_TARGET=" \
+ syz-fuzzer \
+ syz-execprog \
+ syz-stress \
+ syz-executor \
+ "
+
+ install -d ${D}${bindir}/${SYZ_TARGET_DIR}
+
+ for i in ${SYZ_BINS_TARGET}; do
+ install -m 0755 ${B}/${SYZ_TARGET_DIR}/${i} ${D}${bindir}/${SYZ_TARGET_DIR}
+ done
+}
+
+BBCLASSEXTEND += "native"
--
2.37.3


Re: [meta-oe][PATCH] perfetto: build libperfetto

Markus Volk
 

sent again because of mail delivery error

Am Mo, 17. Okt 2022 um 16:53:39 +0200 schrieb Markus Volk <f_l_k@...>:

- Mesa has support for perfetto, but the libperfetto library is needed - Only v27 seems to be supported for now. Update perfetto accordingly - Make sure perfetto and libperfetto share the same codebase - Patch meson.build to allow shared build - Add a version number to avoid having a non symlink so file packaged into dev package. - Create a PC file for libperfetto to allow mesa to find it using pkgconfig. - Add nobranch=1 for the git repos to silence warnings about missing default branch Signed-off-by: Markus Volk <f_l_k@...> --- ...1-meson-add-pc-file-for-lib_perfetto.patch | 38 +++++++++++++++++++ .../recipes-devtools/perfetto/libperfetto.bb | 11 ++++++ meta-oe/recipes-devtools/perfetto/perfetto.bb | 14 +++---- .../recipes-devtools/perfetto/perfetto.inc | 9 +++++ 4 files changed, 65 insertions(+), 7 deletions(-) create mode 100644 meta-oe/recipes-devtools/perfetto/files/0001-meson-add-pc-file-for-lib_perfetto.patch create mode 100644 meta-oe/recipes-devtools/perfetto/libperfetto.bb create mode 100644 meta-oe/recipes-devtools/perfetto/perfetto.inc diff --git a/meta-oe/recipes-devtools/perfetto/files/0001-meson-add-pc-file-for-lib_perfetto.patch b/meta-oe/recipes-devtools/perfetto/files/0001-meson-add-pc-file-for-lib_perfetto.patch new file mode 100644 index 000000000..056382156 --- /dev/null +++ b/meta-oe/recipes-devtools/perfetto/files/0001-meson-add-pc-file-for-lib_perfetto.patch @@ -0,0 +1,38 @@ +From 4712b1252ecf6270b5bb2931358b4a368351eaa3 Mon Sep 17 00:00:00 2001 +From: Markus Volk <f_l_k@...> +Date: Mon, 17 Oct 2022 15:39:26 +0200 +Subject: [PATCH] meson: add PC file for lib_perfetto + +--- + meson.build | 7 ++++++- + 1 file changed, 6 insertions(+), 1 deletion(-) + +diff --git a/meson.build b/meson.build +index 06015141c..c67358cae 100644 +--- a/meson.build ++++ b/meson.build +@@ -30,8 +30,9 @@ endif + + dep_threads = dependency('threads') + +-lib_perfetto = static_library( ++lib_perfetto = shared_library( + 'perfetto', ++ version: '27.1', + sources: 'sdk/perfetto.cc', + dependencies: dep_threads, + install: true, +@@ -39,6 +40,10 @@ lib_perfetto = static_library( + + inc_perfetto = include_directories('sdk') + ++install_headers('sdk/perfetto.h') ++pkg = import('pkgconfig') ++pkg.generate(lib_perfetto) ++ + dep_perfetto = declare_dependency( + link_with: lib_perfetto, + include_directories: inc_perfetto, +-- +2.34.1 + diff --git a/meta-oe/recipes-devtools/perfetto/libperfetto.bb b/meta-oe/recipes-devtools/perfetto/libperfetto.bb new file mode 100644 index 000000000..d58e31414 --- /dev/null +++ b/meta-oe/recipes-devtools/perfetto/libperfetto.bb @@ -0,0 +1,11 @@ +LICENSE = "Apache-2.0" +LIC_FILES_CHKSUM = "file://LICENSE;md5=f87516e0b698007e9e75a1fe1012b390" + +require perfetto.inc + +inherit meson + +SRC_URI:append = " file://0001-meson-add-pc-file-for-lib_perfetto.patch" + +FILES:${PN} += "${datadir}" +BBCLASSEXTEND = "native nativesdk" diff --git a/meta-oe/recipes-devtools/perfetto/perfetto.bb b/meta-oe/recipes-devtools/perfetto/perfetto.bb index 94c39e9cc..c1b099430 100644 --- a/meta-oe/recipes-devtools/perfetto/perfetto.bb +++ b/meta-oe/recipes-devtools/perfetto/perfetto.bb @@ -10,16 +10,15 @@ LIC_FILES_CHKSUM = "file://LICENSE;md5=f87516e0b698007e9e75a1fe1012b390 \ file://debian/copyright;md5=4e08364c82141f181de69d0a2b89d612 \ file://python/LICENSE;md5=c602a632c34ade9c78a976734077bce7" -SRC_URI = "git://github.com/google/perfetto.git;protocol=https;name=perfetto \ +SRC_URI:append = " \ git://github.com/protocolbuffers/protobuf.git;branch=3.9.x;protocol=https;destsuffix=git/buildtools/protobuf;name=protobuf \ - git://chromium.googlesource.com/external/github.com/llvm/llvm-project/libcxx.git;protocol=https;destsuffix=git/buildtools/libcxx;name=libcxx \ - git://chromium.googlesource.com/external/github.com/llvm/llvm-project/libcxxabi.git;protocol=https;destsuffix=git/buildtools/libcxxabi;name=libcxxabi \ - git://chromium.googlesource.com/external/github.com/llvm/llvm-project/libunwind.git;protocol=https;destsuffix=git/buildtools/libunwind;name=libunwind \ - git://android.googlesource.com/platform/external/zlib.git;branch=master;protocol=https;destsuffix=git/buildtools/zlib;name=zlib \ + git://chromium.googlesource.com/external/github.com/llvm/llvm-project/libcxx.git;protocol=https;destsuffix=git/buildtools/libcxx;name=libcxx;nobranch=1 \ + git://chromium.googlesource.com/external/github.com/llvm/llvm-project/libcxxabi.git;protocol=https;destsuffix=git/buildtools/libcxxabi;name=libcxxabi;nobranch=1 \ + git://chromium.googlesource.com/external/github.com/llvm/llvm-project/libunwind.git;protocol=https;destsuffix=git/buildtools/libunwind;name=libunwind;nobranch=1 \ + git://android.googlesource.com/platform/external/zlib.git;branch=master;protocol=https;destsuffix=git/buildtools/zlib;name=zlib;nobranch=1 \ https://storage.googleapis.com/perfetto/gn-linux64-1968-0725d782;subdir=git/buildtools/;name=gn \ file://0001-Remove-check_build_deps-build-steps.patch " -SRCREV_perfetto = "5bd3f582c075d0d026c5fe0b5e291d34dee0d976" SRCREV_protobuf = "6a59a2ad1f61d9696092f79b6d74368b4d7970a3" SRCREV_libcxx = "d9040c75cfea5928c804ab7c235fed06a63f743a" SRCREV_libcxxabi = "196ba1aaa8ac285d94f4ea8d9836390a45360533" @@ -27,6 +26,8 @@ SRCREV_libunwind = "d999d54f4bca789543a2eb6c995af2d9b5a1f3ed" SRCREV_zlib = "5c85a2da4c13eda07f69d81a1579a5afddd35f59" SRC_URI[gn.sha256sum] = "f706aaa0676e3e22f5fc9ca482295d7caee8535d1869f99efa2358177b64f5cd" +require perfetto.inc + DEPENDS += " ninja-native" COMPATIBLE_HOST = "(i.86|x86_64|aarch64|arm).*-linux*" @@ -35,7 +36,6 @@ FILES:${PN}:append = " \ ${bindir}/tracebox \ " -S = "${WORKDIR}/git" B = "${WORKDIR}/build" CXXFLAGS:append:arm = "${@bb.utils.contains('TUNE_FEATURES', 'callconvention-hard', ' -mfloat-abi=hard', '', d)}" diff --git a/meta-oe/recipes-devtools/perfetto/perfetto.inc b/meta-oe/recipes-devtools/perfetto/perfetto.inc new file mode 100644 index 000000000..5cb6f8bb3 --- /dev/null +++ b/meta-oe/recipes-devtools/perfetto/perfetto.inc @@ -0,0 +1,9 @@ +SUMMARY = "Perfetto - System profiling, app tracing and trace analysis." +HOMEPAGE = "https://github.com/google/perfetto" + +SRC_URI = "git://github.com/google/perfetto.git;protocol=https;name=perfetto;nobranch=1" + +SRCREV_perfetto = "1c52b5e132312aeb007ed180d4ba1d8d66227923" +PV = "27.1" + +S = "${WORKDIR}/git"
--
2.34.1


[meta-oe][PATCH] perfetto: build libperfetto

Markus Volk
 

- Mesa has support for perfetto, but the libperfetto library is needed
- Only v27 seems to be supported for now. Update perfetto accordingly
- Make sure perfetto and libperfetto share the same codebase
- Patch meson.build to allow shared build
- Add a version number to avoid having a non symlink so file packaged int=
o dev package.
- Create a PC file for libperfetto to allow mesa to find it using pkgconf=
ig.
- Add nobranch=3D1 for the git repos to silence warnings about missing de=
fault branch

Signed-off-by: Markus Volk <f_l_k@...>
---
...1-meson-add-pc-file-for-lib_perfetto.patch | 38 +++++++++++++++++++
.../recipes-devtools/perfetto/libperfetto.bb | 11 ++++++
meta-oe/recipes-devtools/perfetto/perfetto.bb | 14 +++----
.../recipes-devtools/perfetto/perfetto.inc | 9 +++++
4 files changed, 65 insertions(+), 7 deletions(-)
create mode 100644 meta-oe/recipes-devtools/perfetto/files/0001-meson-ad=
d-pc-file-for-lib_perfetto.patch
create mode 100644 meta-oe/recipes-devtools/perfetto/libperfetto.bb
create mode 100644 meta-oe/recipes-devtools/perfetto/perfetto.inc

diff --git a/meta-oe/recipes-devtools/perfetto/files/0001-meson-add-pc-fi=
le-for-lib_perfetto.patch b/meta-oe/recipes-devtools/perfetto/files/0001-=
meson-add-pc-file-for-lib_perfetto.patch
new file mode 100644
index 000000000..056382156
--- /dev/null
+++ b/meta-oe/recipes-devtools/perfetto/files/0001-meson-add-pc-file-for-=
lib_perfetto.patch
@@ -0,0 +1,38 @@
+From 4712b1252ecf6270b5bb2931358b4a368351eaa3 Mon Sep 17 00:00:00 2001
+From: Markus Volk <f_l_k@...>
+Date: Mon, 17 Oct 2022 15:39:26 +0200
+Subject: [PATCH] meson: add PC file for lib_perfetto
+
+---
+ meson.build | 7 ++++++-
+ 1 file changed, 6 insertions(+), 1 deletion(-)
+
+diff --git a/meson.build b/meson.build
+index 06015141c..c67358cae 100644
+--- a/meson.build
++++ b/meson.build
+@@ -30,8 +30,9 @@ endif
+=20
+ dep_threads =3D dependency('threads')
+=20
+-lib_perfetto =3D static_library(
++lib_perfetto =3D shared_library(
+ 'perfetto',
++ version: '27.1',
+ sources: 'sdk/perfetto.cc',
+ dependencies: dep_threads,
+ install: true,
+@@ -39,6 +40,10 @@ lib_perfetto =3D static_library(
+=20
+ inc_perfetto =3D include_directories('sdk')
+=20
++install_headers('sdk/perfetto.h')
++pkg =3D import('pkgconfig')
++pkg.generate(lib_perfetto)
++
+ dep_perfetto =3D declare_dependency(
+ link_with: lib_perfetto,
+ include_directories: inc_perfetto,
+--=20
+2.34.1
+
diff --git a/meta-oe/recipes-devtools/perfetto/libperfetto.bb b/meta-oe/r=
ecipes-devtools/perfetto/libperfetto.bb
new file mode 100644
index 000000000..d58e31414
--- /dev/null
+++ b/meta-oe/recipes-devtools/perfetto/libperfetto.bb
@@ -0,0 +1,11 @@
+LICENSE =3D "Apache-2.0"
+LIC_FILES_CHKSUM =3D "file://LICENSE;md5=3Df87516e0b698007e9e75a1fe1012b=
390"
+
+require perfetto.inc
+
+inherit meson
+
+SRC_URI:append =3D " file://0001-meson-add-pc-file-for-lib_perfetto.patc=
h"
+
+FILES:${PN} +=3D "${datadir}"
+BBCLASSEXTEND =3D "native nativesdk"
diff --git a/meta-oe/recipes-devtools/perfetto/perfetto.bb b/meta-oe/reci=
pes-devtools/perfetto/perfetto.bb
index 94c39e9cc..c1b099430 100644
--- a/meta-oe/recipes-devtools/perfetto/perfetto.bb
+++ b/meta-oe/recipes-devtools/perfetto/perfetto.bb
@@ -10,16 +10,15 @@ LIC_FILES_CHKSUM =3D "file://LICENSE;md5=3Df87516e0b6=
98007e9e75a1fe1012b390 \
file://debian/copyright;md5=3D4e08364c82141f181de69d=
0a2b89d612 \
file://python/LICENSE;md5=3Dc602a632c34ade9c78a97673=
4077bce7"
=20
-SRC_URI =3D "git://github.com/google/perfetto.git;protocol=3Dhttps;name=3D=
perfetto \
+SRC_URI:append =3D " \
git://github.com/protocolbuffers/protobuf.git;branch=3D3.9.x;=
protocol=3Dhttps;destsuffix=3Dgit/buildtools/protobuf;name=3Dprotobuf \
- git://chromium.googlesource.com/external/github.com/llvm/llvm=
-project/libcxx.git;protocol=3Dhttps;destsuffix=3Dgit/buildtools/libcxx;n=
ame=3Dlibcxx \
- git://chromium.googlesource.com/external/github.com/llvm/llvm=
-project/libcxxabi.git;protocol=3Dhttps;destsuffix=3Dgit/buildtools/libcx=
xabi;name=3Dlibcxxabi \
- git://chromium.googlesource.com/external/github.com/llvm/llvm=
-project/libunwind.git;protocol=3Dhttps;destsuffix=3Dgit/buildtools/libun=
wind;name=3Dlibunwind \
- git://android.googlesource.com/platform/external/zlib.git;bra=
nch=3Dmaster;protocol=3Dhttps;destsuffix=3Dgit/buildtools/zlib;name=3Dzli=
b \
+ git://chromium.googlesource.com/external/github.com/llvm/llvm=
-project/libcxx.git;protocol=3Dhttps;destsuffix=3Dgit/buildtools/libcxx;n=
ame=3Dlibcxx;nobranch=3D1 \
+ git://chromium.googlesource.com/external/github.com/llvm/llvm=
-project/libcxxabi.git;protocol=3Dhttps;destsuffix=3Dgit/buildtools/libcx=
xabi;name=3Dlibcxxabi;nobranch=3D1 \
+ git://chromium.googlesource.com/external/github.com/llvm/llvm=
-project/libunwind.git;protocol=3Dhttps;destsuffix=3Dgit/buildtools/libun=
wind;name=3Dlibunwind;nobranch=3D1 \
+ git://android.googlesource.com/platform/external/zlib.git;bra=
nch=3Dmaster;protocol=3Dhttps;destsuffix=3Dgit/buildtools/zlib;name=3Dzli=
b;nobranch=3D1 \
https://storage.googleapis.com/perfetto/gn-linux64-1968-0725d=
782;subdir=3Dgit/buildtools/;name=3Dgn \
file://0001-Remove-check_build_deps-build-steps.patch "
=20
-SRCREV_perfetto =3D "5bd3f582c075d0d026c5fe0b5e291d34dee0d976"
SRCREV_protobuf =3D "6a59a2ad1f61d9696092f79b6d74368b4d7970a3"
SRCREV_libcxx =3D "d9040c75cfea5928c804ab7c235fed06a63f743a"
SRCREV_libcxxabi =3D "196ba1aaa8ac285d94f4ea8d9836390a45360533"
@@ -27,6 +26,8 @@ SRCREV_libunwind =3D "d999d54f4bca789543a2eb6c995af2d9b=
5a1f3ed"
SRCREV_zlib =3D "5c85a2da4c13eda07f69d81a1579a5afddd35f59"
SRC_URI[gn.sha256sum] =3D "f706aaa0676e3e22f5fc9ca482295d7caee8535d1869f=
99efa2358177b64f5cd"
=20
+require perfetto.inc
+
DEPENDS +=3D " ninja-native"
=20
COMPATIBLE_HOST =3D "(i.86|x86_64|aarch64|arm).*-linux*"
@@ -35,7 +36,6 @@ FILES:${PN}:append =3D " \
${bindir}/tracebox \
"
=20
-S =3D "${WORKDIR}/git"
B =3D "${WORKDIR}/build"
=20
CXXFLAGS:append:arm =3D "${@bb.utils.contains('TUNE_FEATURES', 'callconv=
ention-hard', ' -mfloat-abi=3Dhard', '', d)}"
diff --git a/meta-oe/recipes-devtools/perfetto/perfetto.inc b/meta-oe/rec=
ipes-devtools/perfetto/perfetto.inc
new file mode 100644
index 000000000..5cb6f8bb3
--- /dev/null
+++ b/meta-oe/recipes-devtools/perfetto/perfetto.inc
@@ -0,0 +1,9 @@
+SUMMARY =3D "Perfetto - System profiling, app tracing and trace analysis=
."
+HOMEPAGE =3D "https://github.com/google/perfetto"
+
+SRC_URI =3D "git://github.com/google/perfetto.git;protocol=3Dhttps;name=3D=
perfetto;nobranch=3D1"
+
+SRCREV_perfetto =3D "1c52b5e132312aeb007ed180d4ba1d8d66227923"
+PV =3D "27.1"
+
+S =3D "${WORKDIR}/git"
--=20
2.34.1