From c35c26ec6312219507c518bae2e56c1ea46a5f36 Mon Sep 17 00:00:00 2001 From: Aleksandr Nogikh Date: Fri, 16 Feb 2024 22:47:59 +0100 Subject: pkg/fuzzer: factor out the fuzzing engine This is the first step for #1541. Move the fuzzing engine that used to be interleaved with other syz-fuzzer code into a separate package. For now, the algorithm is more or less the same as it was, the only difference is that a pkg/fuzzer instance scales to the available computing power. Add an executor-based test that performs real fuzzing. --- sys/targets/targets.go | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'sys/targets') diff --git a/sys/targets/targets.go b/sys/targets/targets.go index 40fc40991..840c1febf 100644 --- a/sys/targets/targets.go +++ b/sys/targets/targets.go @@ -141,6 +141,7 @@ const ( S390x = "s390x" RiscV64 = "riscv64" TestArch64 = "64" + TestArch64Fuzz = "64_fuzz" TestArch64Fork = "64_fork" TestArch32Shmem = "32_shmem" TestArch32ForkShmem = "32_fork_shmem" @@ -189,6 +190,18 @@ var List = map[string]map[string]*Target{ ExecutorUsesForkServer: false, }, }, + TestArch64Fuzz: { + PtrSize: 8, + PageSize: 8 << 10, + // -fsanitize=address causes SIGSEGV. + CFlags: []string{"-no-pie"}, + osCommon: osCommon{ + SyscallNumbers: true, + SyscallPrefix: "SYS_", + ExecutorUsesShmem: true, + ExecutorUsesForkServer: true, + }, + }, TestArch64Fork: { PtrSize: 8, PageSize: 8 << 10, -- cgit mrf-deployment