syzkaller: Upgrade to latest tip of trunk
PATCH v3 1/2 syzkaller: Upgrade to latest tip of trunk
- All patches have been upstreamed
- Add Go module dependencies to allow offline builds since upstream does not vendor them into the repo anymore
- In accordance to upstream, disable cgo as we are unable to compile with it on all supported architectures; in addition, remove -linkshared and -buildmode=pie as it requires external (cgo) linking (the latter only on ARM and x86). Binary size hardly matters here as syzkaller is unlikely to be shipped in a production environment.
- Add missing metadata and comply with style guide
- Mark musl as incompatible as it does not provide the Memory Protection Keys API; in addition, there seems to be no intention from upstream to support anything besides glibc
---
changes in v3:
- mark musl as incompatible as it does not provide the Memory Protection Keys API; in addition, there seems to be no intention from upstream to support anything besides glibc
changes in v2:
- update to latest tip of trunk, which includes an upstreamed fix for the Go module cache being partially non-writeable/deletable
(https://github.com/google/syzkaller/pull/6269)
--- .../syzkaller/syzkaller-go-mods.inc | 76 ++++++++++++++++++ .../syzkaller/syzkaller-licenses.inc | 80 +++++++++++++++++++ ...cutor-Include-missing-linux-falloc.h.patch | 37 --------- ...ve-including-error.h-in-test_linux.h.patch | 29 ------- ...ets.go-allow-users-to-override-hardc.patch | 62 -------------- .../recipes-test/syzkaller/syzkaller_git.bb | 42 +++++----- 6 files changed, 180 insertions(+), 146 deletions(-) create mode 100644 meta-oe/recipes-test/syzkaller/syzkaller-go-mods.inc create mode 100644 meta-oe/recipes-test/syzkaller/syzkaller-licenses.inc delete mode 100644 meta-oe/recipes-test/syzkaller/syzkaller/0001-executor-Include-missing-linux-falloc.h.patch delete mode 100644 meta-oe/recipes-test/syzkaller/syzkaller/0001-executor-Remove-including-error.h-in-test_linux.h.patch delete mode 100644 meta-oe/recipes-test/syzkaller/syzkaller/0001-sys-targets-targets.go-allow-users-to-override-hardc.patch
meta-oe/recipes-test/syzkaller/syzkaller-go-mods.inc new file +76 -0
@@ -0,0 +1,76 @@ +SRC_URI += "\ + gomod://cel.dev/expr;version=v0.24.0;sha256sum=4456189315133136b72bfb40312d731c8957cce38a2807ac21d09f5158259bb7 \ + gomod://cloud.google.com/go;version=v0.121.3;sha256sum=ebd16ecd4637745c842ecc337241a4d77cd9cdb1a2f422c7f9cabc477ae5da25 \ + gomod://cloud.google.com/go/auth;version=v0.16.2;sha256sum=38f4f9fb94b864bff2e7852c826ae6605a9fda6510cc6b6b3e02a047dd4243cd \ + gomod://cloud.google.com/go/auth/oauth2adapt;version=v0.2.8;sha256sum=4cd64264bafc4dd05f645452d6e1485adf92309130bd82b4c595db10cd534963 \ + gomod://cloud.google.com/go/bigquery;version=v1.69.0;sha256sum=fea7514e6dde4d4c9bd1d334034d89c980759afa303f020c3a273f7d9f3c095d \ + gomod://cloud.google.com/go/compute/metadata;version=v0.7.0;sha256sum=89c19841bf87fe53034aed53505c527fe6674d3bf0f21c0e972374f94fb08eb4 \ + gomod://cloud.google.com/go/iam;version=v1.5.2;sha256sum=5ef0d3a00d72b44c498688551616bce430386bbfc99b5a7f76c0788a92733984 \ + gomod://cloud.google.com/go/monitoring;version=v1.24.2;sha256sum=d93cb9138747418f2e2731c2312c4dc1a75daf3c2a35be7a337901c5c7251381 \ + gomod://cloud.google.com/go/spanner;version=v1.82.0;sha256sum=6c997bbf50a2d9dee4094bf13cc0440d6ee7ec707c681ecbc58097bf99e3fb86 \ + gomod://cloud.google.com/go/storage;version=v1.55.0;sha256sum=b14ef810eb8117e7c8a7e3478b7d48434929264d89d62640e08b05c48b3cfcc6 \ + gomod://github.com/GoogleCloudPlatform/grpc-gcp-go/grpcgcp;version=v1.5.2;sha256sum=d5c597a20d3a7057a9c3b3ada021930351247baf5e65f08996cecc84027446b1 \ + gomod://github.com/GoogleCloudPlatform/opentelemetry-operations-go/detectors/gcp;version=v1.28.0;sha256sum=9fa827784e2495cd18f204e06abbd109a9dbe1a3b330bf82294b8aac7285ad3b \ + gomod://github.com/GoogleCloudPlatform/opentelemetry-operations-go/exporter/metric;version=v0.52.0;sha256sum=999dd61d8aa7b61f89b547ad271c4597bddd3de3c4e9801a672fe2d759ff5c3a \ + gomod://github.com/GoogleCloudPlatform/opentelemetry-operations-go/internal/resourcemapping;version=v0.52.0;sha256sum=2d0f67011ae88b29113717680c240c02ef3c3c84ab74868b11fcc831c59fcc17 \ + gomod://github.com/VividCortex/gohistogram;version=v1.0.0;sha256sum=16ebeceeb7e4066f90edbfb90282cd90d4dad0f71339199551de3fbdc7e8c545 \ + gomod://github.com/apache/arrow/go/v15;version=v15.0.2;sha256sum=87b75aac27b395f651f232b4b89c184a6ab23a65596acc46b4efacb116f98adf \ + gomod://github.com/beorn7/perks;version=v1.0.1;sha256sum=25bd9e2d94aca770e6dbc1f53725f84f6af4432f631d35dd2c46f96ef0512f1a \ + gomod://github.com/cespare/xxhash/v2;version=v2.3.0;sha256sum=145a26cdc7c49db566017b807c4989ee7f7ddeb569423e9cb99f995fac3621d3 \ + gomod://github.com/cncf/xds/go;version=v0.0.0-20250501225837-2ac532fd4443;sha256sum=c7b36d6c805ab8718fa8700f69bee29c225f10258fd29315683b102398c013a8 \ + gomod://github.com/envoyproxy/go-control-plane/envoy;version=v1.32.4;sha256sum=6baebcc1f441672ade0dacb4ca553a3d857f915590ca07bbe79314ddf62e6fae \ + gomod://github.com/envoyproxy/protoc-gen-validate;version=v1.2.1;sha256sum=ad9d2639aff17db6be291069c5463c46ed8ac37a0c6c1b57fae5465c5effb567 \ + gomod://github.com/felixge/httpsnoop;version=v1.0.4;sha256sum=75aa471311265e9860df0e523400b4650ed0c1a33262786a421f07226792e494 \ + gomod://github.com/go-jose/go-jose/v4;version=v4.1.0;sha256sum=27274e6a0878655e62a8c042934dfbb33c6db5992bc31b21df5df6c1cb944e58 \ + gomod://github.com/go-logr/logr;version=v1.4.3;sha256sum=523d7a3587fe73f61ef41c8bc627f7d7f38de8104d46278154b307e60770ad70 \ + gomod://github.com/go-logr/stdr;version=v1.2.2;sha256sum=9dd6893bf700198485ae699640b49bc1efbc6c73b37cb5792a0476e1fd8f7fef \ + gomod://github.com/goccy/go-json;version=v0.10.5;sha256sum=96e417d4493705f470f7f29858a09cdbe68330f2d7e74cd024fbace4745c0615 \ + gomod://github.com/golang/groupcache;version=v0.0.0-20241129210726-2c02b8208cf8;sha256sum=163367355442a630b12b0b452892cd98e99fcfdf7e40b68d358be73479cc1c23 \ + gomod://github.com/golang/protobuf;version=v1.5.4;sha256sum=9a2f43d3eac8ceda506ebbeb4f229254b87235ce90346692a0e233614182190b \ + gomod://github.com/google/flatbuffers;version=v25.1.24+incompatible;sha256sum=925600f16ce3b62c77aff5a662435984ed37af7cc05577169564e902e0c31c29 \ + gomod://github.com/google/s2a-go;version=v0.1.9;sha256sum=bf8f4b159d3fc201477822ed2514e4f05f58c764b78ffed73ec0accce5fb7f07 \ + gomod://github.com/google/uuid;version=v1.6.0;sha256sum=d0f02f377217f42702e259684e06441edbf5140dddcc34ba9bea56038b38a6ed \ + gomod://github.com/googleapis/enterprise-certificate-proxy;version=v0.3.6;sha256sum=6c44108f588c97a6a08b5ed907c3cc47dce31913f219a6d02b13e463d355603c \ + gomod://github.com/googleapis/gax-go/v2;version=v2.14.2;sha256sum=1cd109cf4d1a81363f956885d1f7e7086bf9805122dbcf9382ca0c54a21979d5 \ + gomod://github.com/gorilla/handlers;version=v1.5.2;sha256sum=7a69a0605890d69e91404e46b2d2063ef3c5c4e05c844ea154ef95d3479d7b7b \ + gomod://github.com/ianlancetaylor/demangle;version=v0.0.0-20250625212726-86fd2c0a1a74;sha256sum=7ad8b2ba609745ed4b8923c0c2e8ab44acf7386eb0d6fd7ad7bf6da962bd0743 \ + gomod://github.com/klauspost/compress;version=v1.18.0;sha256sum=c4679e4cbc820a21758199d985be754abf5eb2a38e6f1de95cd70b2e7ef06905 \ + gomod://github.com/klauspost/cpuid/v2;version=v2.2.10;sha256sum=db89665fa22cef477dc551b72d49707c516b749c17ed154bf67eb8081ee08dff \ + gomod://github.com/munnerz/goautoneg;version=v0.0.0-20191010083416-a7dc8b61c822;sha256sum=3d7ce17916779890be02ea6b3dd6345c3c30c1df502ad9d8b5b9b310e636afd9 \ + gomod://github.com/pierrec/lz4/v4;version=v4.1.18;sha256sum=b397db34ff05610125e7c9de6de067a174a70ba3ba7dac81ba8ce4f22b1c0933 \ + gomod://github.com/prometheus/client_golang;version=v1.23.0;sha256sum=f104d43e35b9217845792ec8eabbde59e31a11aaba64c47408cff8bafde2aa9e \ + gomod://github.com/prometheus/client_model;version=v0.6.2;sha256sum=67017b19f220c6ab91ecfdd10a93824e2a8b09fcb6390054dbdc49df3354a9ca \ + gomod://github.com/prometheus/common;version=v0.65.0;sha256sum=c97b1ab4d2c723923b367dbe48c283eafc0b94eb14faf8c98d81746b015242a9 \ + gomod://github.com/prometheus/procfs;version=v0.16.1;sha256sum=e4b74815566cbf5aa372d23e1de32f16ac5c3c4c80bc94a31fdee60a1de6074a \ + gomod://github.com/sergi/go-diff;version=v1.4.0;sha256sum=63aef1860b251af1421ba0a014a6bb08a60833f13f948f3d88d66754bb484f53 \ + gomod://github.com/spiffe/go-spiffe/v2;version=v2.5.0;sha256sum=3b96ee2cef9a550ec779125216a03225fff44d3d702d51b6ef21e2202d2517d6 \ + gomod://github.com/ulikunitz/xz;version=v0.5.12;sha256sum=0cba3268140e7c112c329b19ce3d4c8d4768a784fe0c80112bfa7bf43ace1a4a \ + gomod://github.com/zeebo/errs;version=v1.4.0;sha256sum=5b7fb5cbe6bbd36933e8c98572f85121994e9842aefc90986f8d3a192cb69257 \ + gomod://github.com/zeebo/xxh3;version=v1.0.2;sha256sum=190e5ef1f672e9321a1580bdd31c6440fde6044ca8168d2b489cf50cdc4f58a6 \ + gomod://go.opencensus.io;version=v0.24.0;sha256sum=203a767d7f8e7c1ebe5588220ad168d1e15b14ae70a636de7ca9a4a88a7e0d0c \ + gomod://go.opentelemetry.io/auto/sdk;version=v1.1.0;sha256sum=006d3a5a7292d11f093ce65fcd5a15d15fb7bd11d0e066503f91bd64c4bffe2c \ + gomod://go.opentelemetry.io/contrib/detectors/gcp;version=v1.36.0;sha256sum=67e381df5c7e78edda7b773ebdef6e5dad42486e87eec838329ade6919985119 \ + gomod://go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc;version=v0.61.0;sha256sum=9812bf570350cd1377bf458b71ea5d9fffe44733fc2dccbcfd1f5c564a6b27b7 \ + gomod://go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp;version=v0.61.0;sha256sum=0009120ed94c4279573eea0f01841f7c9ff51cafd1c9559fc09820c9f870f399 \ + gomod://go.opentelemetry.io/otel;version=v1.36.0;sha256sum=f3cdc5d41b3056ab4fa95ee1145708d12e5a5fd0106f79c3f0133a7f5f1ef799 \ + gomod://go.opentelemetry.io/otel/metric;version=v1.36.0;sha256sum=a4ff3b88cca25a317752193a65547250822cdd6acfa08d9cbb57071d1e1c4951 \ + gomod://go.opentelemetry.io/otel/sdk;version=v1.36.0;sha256sum=d16c77fb714cca3036530fddba0baf5f1ad21a6de8dffd73130668807c61b01a \ + gomod://go.opentelemetry.io/otel/sdk/metric;version=v1.36.0;sha256sum=946a0d0d2b5ab3636a848a3041f8b7bd91e505cd563dc9907a3836076c9e214f \ + gomod://go.opentelemetry.io/otel/trace;version=v1.36.0;sha256sum=f8877234c555f5f793fed92b17e2bf6744f6c504871eb713fa1e916ba0b6c6b6 \ + gomod://golang.org/x/crypto;version=v0.40.0;sha256sum=6a55423d327359615db923c5f17e5f10c4c7d91c39ef8d0b7f6e0876f89ff9da \ + gomod://golang.org/x/exp;version=v0.0.0-20250711185948-6ae5c78190dc;sha256sum=01d8fecd44e904b86e66c78cf6b403b27312513c0534455ee7b9c86600d9b7aa \ + gomod://golang.org/x/net;version=v0.42.0;sha256sum=cc9f79d1c8a796c756b636cee007b4ac5eba7b1f3276cd42658f4ac4a28cfbc1 \ + gomod://golang.org/x/oauth2;version=v0.30.0;sha256sum=1e1028d0b190948f0cd44229bfa298440cb2481f601f992e12424bc6fa1f183c \ + gomod://golang.org/x/sync;version=v0.16.0;sha256sum=ca43984183eb14f7f50d33da350312fed1c42e106dceac2437bfd5084b497dcd \ + gomod://golang.org/x/sys;version=v0.34.0;sha256sum=27d5489227865ffffc3fbbbaf6100952ca2925eba19cfdff01e6e76b986b4bb4 \ + gomod://golang.org/x/text;version=v0.27.0;sha256sum=1230ce66d74ed4510f1578f25b4e53beee00926dc24c86fab7242637f8415ea8 \ + gomod://golang.org/x/time;version=v0.12.0;sha256sum=cdcb04c43b112919c5e0d0fa1d90769124ad56918a44e6cb0747876ed7e5015c \ + gomod://golang.org/x/xerrors;version=v0.0.0-20240903120638-7835f813f4da;sha256sum=07ee9f680118861ee732ce0df4553b834383b87e0519fb9a0990c51d7abd6885 \ + gomod://google.golang.org/api;version=v0.237.0;sha256sum=944b38303416810562a220f444ec7c0c13834793a9e7e46ce0f644c3c5b478e0 \ + gomod://google.golang.org/appengine/v2;version=v2.0.6;sha256sum=9eab40689a66240d1132f31d2418a03776221ed07c3f72e22e9527ad063c9dde \ + gomod://google.golang.org/genproto;version=v0.0.0-20250603155806-513f23925822;sha256sum=631efdcf106cc5af4bb1e3298a40eedebe8a023a408b0465a5cb3ee486a57879 \ + gomod://google.golang.org/genproto/googleapis/api;version=v0.0.0-20250603155806-513f23925822;sha256sum=ec9d0cf0e96082fc6eef3a8beeb4cb74951294a57dac0d501b25a37e64df2594 \ + gomod://google.golang.org/genproto/googleapis/rpc;version=v0.0.0-20250603155806-513f23925822;sha256sum=3b43fafd95300765d08eb0d0137b699c5ee9c105b6af93c4916e7081c97b3a75 \ + gomod://google.golang.org/grpc;version=v1.73.0;sha256sum=7d628abd6c4c133205db6b72e374bbd2f438b12a2a5f838f34fd8d95d91f8c0b \ + gomod://google.golang.org/protobuf;version=v1.36.6;sha256sum=3294ac8ea5089b3c231351afaea4f012e8027a9beeb523bbf31dcb383cc0ab99 \ +"
meta-oe/recipes-test/syzkaller/syzkaller-licenses.inc new file +80 -0
80 lines not on this page · raw message
meta-oe/recipes-test/syzkaller/syzkaller/0001-executor-Include-missing-linux-falloc.h.patch deleted +0 -37
@@ -1,37 +0,0 @@ -From 9db789b4498d4130450e988757914c03e42b40f5 Mon Sep 17 00:00:00 2001 -From: Khem Raj <[email protected]> -Date: Mon, 19 Jun 2023 18:33:36 -0700 -Subject: [PATCH] executor: Include missing linux/falloc.h - -Its needed for FALLOC_FL_ZERO_RANGE which needs this header, it works -with glibc because fcntl.h includes this header indirectly, however the -failure comes to fore with musl C library where this header is not -included indirectly by other system headers, therefore include it as -required. - -Fixes -In file included from executor/common.h:505: -executor/common_linux.h:5604:16: error: use of undeclared identifier 'FALLOC_FL_ZERO_RANGE' - fallocate(fd, FALLOC_FL_ZERO_RANGE, 0, SWAP_FILE_SIZE); - ^ -Upstream-Status: Submitted [https://github.com/google/syzkaller/pull/3974] -Signed-off-by: Khem Raj <[email protected]> ---- - executor/common_linux.h | 1 + - 1 file changed, 1 insertion(+) - -diff --git a/executor/common_linux.h b/executor/common_linux.h -index d5152e058..9ae3fb159 100644 ---- a/executor/common_linux.h -+++ b/executor/common_linux.h -@@ -5585,6 +5585,7 @@ static long syz_pkey_set(volatile long pkey, volatile long val) - #include <sys/stat.h> - #include <sys/swap.h> - #include <sys/types.h> -+#include <linux/falloc.h> - - #define SWAP_FILE "./swap-file" - #define SWAP_FILE_SIZE (128 * 1000 * 1000) // 128 MB. --- -2.41.0 -
meta-oe/recipes-test/syzkaller/syzkaller/0001-executor-Remove-including-error.h-in-test_linux.h.patch deleted +0 -29
@@ -1,29 +0,0 @@ -From 648868595cf290e77aab1f271db2a57e1f791301 Mon Sep 17 00:00:00 2001 -From: Khem Raj <[email protected]> -Date: Mon, 20 May 2024 20:37:07 -0700 -Subject: [PATCH] executor: Remove including <error.h> in test_linux.h - -it seems to be redundant and moreover it lets us compile on musl which -does not provide this system header - -Upstream-Status: Submitted [https://github.com/google/syzkaller/pull/4822] -Signed-off-by: Khem Raj <[email protected]> ---- - executor/test_linux.h | 1 - - 1 file changed, 1 deletion(-) - -diff --git a/executor/test_linux.h b/executor/test_linux.h -index 7cf459569..8c9493539 100644 ---- a/executor/test_linux.h -+++ b/executor/test_linux.h -@@ -1,7 +1,6 @@ - // Copyright 2017 syzkaller project authors. All rights reserved. - // Use of this source code is governed by Apache 2 LICENSE that can be found in the LICENSE file. - --#include <error.h> - #include <stdint.h> - #include <sys/utsname.h> - --- -2.45.1 -
meta-oe/recipes-test/syzkaller/syzkaller/0001-sys-targets-targets.go-allow-users-to-override-hardc.patch deleted +0 -62
62 lines not on this page · raw message
meta-oe/recipes-test/syzkaller/syzkaller_git.bb +24 -18
85 lines not on this page · raw message
Signature · 1 line
2.49.0
PATCH v3 2/2 syzkaller: Add nativesdk
--- .../syzkaller/syzkaller-licenses.inc | 5 ++++- .../recipes-test/syzkaller/syzkaller_git.bb | 22 ++++++++++++++++--- 2 files changed, 23 insertions(+), 4 deletions(-)
meta-oe/recipes-test/syzkaller/syzkaller-licenses.inc +4 -1
@@ -73,8 +73,11 @@ LIC_FILES_CHKSUM += "\ file://pkg/mod/google.golang.org/[email protected]/LICENSE;md5=02d4002e9171d41a8fad93aa7faf3956;spdx=BSD-3-Clause \ " -LIC_FILES_CHKSUM:class-native += "\ +LIC_FILES_CHKSUM_HOST = "\ file://pkg/mod/github.com/golang/[email protected]/LICENSE;md5=939cce1ec101726fa754e698ac871622;spdx=BSD-3-Clause \ file://pkg/mod/github.com/gorilla/[email protected]/LICENSE;md5=c30eee78985cf2584cded5f89ba3d787;spdx=Unknown \ file://pkg/mod/google.golang.org/appengine/[email protected]/LICENSE;md5=3b83ef96387f14655fc854ddc3c6bd57;spdx=Apache-2.0 \ " + +LIC_FILES_CHKSUM:class-native += "${LIC_FILES_CHKSUM_HOST}" +LIC_FILES_CHKSUM:class-nativesdk += "${LIC_FILES_CHKSUM_HOST}"
meta-oe/recipes-test/syzkaller/syzkaller_git.bb +19 -3
@@ -41,13 +41,21 @@ LDFLAGS:append:class-target = "${@bb.utils.contains_any("TC_CXX_RUNTIME", "llvm DEPENDS:class-native += "qemu-system-native" -do_compile:class-native() { +compile_native() { export HOSTOS="${GOHOSTOS}" export HOSTARCH="${GOHOSTARCH}" oe_runmake HOSTGO="${GO}" host } +do_compile:class-native() { + compile_native +} + +do_compile:class-nativesdk() { + compile_native +} + do_compile:class-target() { export HOSTOS="${GOOS}" export HOSTARCH="${GOARCH}"
@@ -63,7 +71,7 @@ do_compile:class-target() { oe_runmake GO="${GO}" REV=${SRCREV} target } -do_install:class-native() { +install_native() { SYZ_BINS_NATIVE="syz-manager syz-repro syz-mutate syz-prog2c syz-db \ syz-upgrade"
@@ -74,6 +82,14 @@ do_install:class-native() { done } +do_install:class-native() { + install_native +} + +do_install:class-nativesdk() { + install_native +} + do_install:class-target() { SYZ_TARGET_DIR="${TARGETOS}_${TARGETARCH}" SYZ_BINS_TARGET="syz-execprog syz-executor"
@@ -85,4 +101,4 @@ do_install:class-target() { done } -BBCLASSEXTEND += "native" +BBCLASSEXTEND += "native nativesdk"
Signature · 1 line
2.49.0