diff options
author | Khem Raj <raj.khem@gmail.com> | 2023-06-15 10:26:58 -0700 |
---|---|---|
committer | Khem Raj <raj.khem@gmail.com> | 2023-06-19 18:41:18 -0700 |
commit | 63b1dbd093c8efc13ad8fd0b58401fe8d91603e9 (patch) | |
tree | 65f44f998aa718e5f1557fbba69846e6912b4860 /meta-oe/recipes-test/syzkaller/syzkaller | |
parent | 39dfcaceba360374ada6aac7d8979c67752e9ba3 (diff) | |
download | meta-openembedded-contrib-63b1dbd093c8efc13ad8fd0b58401fe8d91603e9.tar.gz |
syzkaller: Upgrade to latest tip of trunk
- Enable cgo with this version
- Fix build with musl
Signed-off-by: Khem Raj <raj.khem@gmail.com>
Diffstat (limited to 'meta-oe/recipes-test/syzkaller/syzkaller')
2 files changed, 41 insertions, 9 deletions
diff --git a/meta-oe/recipes-test/syzkaller/syzkaller/0001-executor-Include-missing-linux-falloc.h.patch b/meta-oe/recipes-test/syzkaller/syzkaller/0001-executor-Include-missing-linux-falloc.h.patch new file mode 100644 index 0000000000..23bfb9a5e2 --- /dev/null +++ b/meta-oe/recipes-test/syzkaller/syzkaller/0001-executor-Include-missing-linux-falloc.h.patch @@ -0,0 +1,37 @@ +From 9db789b4498d4130450e988757914c03e42b40f5 Mon Sep 17 00:00:00 2001 +From: Khem Raj <raj.khem@gmail.com> +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 <raj.khem@gmail.com> +--- + 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 + 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 index d647b8d4a0..61f4351651 100644 --- 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 @@ -18,11 +18,9 @@ Signed-off-by: Ovidiu Panait <ovidiu.panait@windriver.com> 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{ +@@ -262,7 +262,6 @@ var List = map[string]map[string]*Target PtrSize: 4, PageSize: 4 << 10, LittleEndian: true, @@ -30,7 +28,7 @@ index f3be708f3..19a8bb681 100644 Triple: "arm-linux-gnueabi", KernelArch: "arm", KernelHeaderArch: "arm", -@@ -670,12 +669,16 @@ func initTarget(target *Target, OS, arch string) { +@@ -700,12 +699,16 @@ func initTarget(target *Target, OS, arch for i := range target.CFlags { target.replaceSourceDir(&target.CFlags[i], sourceDir) } @@ -53,15 +51,12 @@ index f3be708f3..19a8bb681 100644 } if target.CCompiler == "" { target.setCompiler(useClang) -@@ -803,7 +806,7 @@ func (target *Target) lazyInit() { +@@ -839,7 +842,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 (target.OS != runtime.GOOS || !runningOnCI) && getSourceDir(target) == "" { - 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 - |