From ef01311589507ea3919e3804f43781eeb0ca9777 Mon Sep 17 00:00:00 2001 From: Aleksandr Nogikh Date: Mon, 22 Jan 2024 12:09:32 +0100 Subject: all: refactor pprof endpoint configuration In some cases (e.g. gVisor instances using host's network namespace) attempts to bind() all syz-fuzzer processes to the same port result in conflicts and fuzzing breakages. Refactor the code to enable custom pprof configuration depending on the vm type. For now, just disable pprof endpoints for gVisor VMs. Once we actually need the feature there, we can generate custom ports for every gVisor VM. --- pkg/instance/instance.go | 2 ++ 1 file changed, 2 insertions(+) (limited to 'pkg/instance/instance.go') diff --git a/pkg/instance/instance.go b/pkg/instance/instance.go index 7696a945d..2f48cdbc7 100644 --- a/pkg/instance/instance.go +++ b/pkg/instance/instance.go @@ -459,6 +459,7 @@ type OptionalFuzzerArgs struct { Slowdown int RawCover bool SandboxArg int + PprofPort int } type FuzzerCmdArgs struct { @@ -500,6 +501,7 @@ func FuzzerCmd(args *FuzzerCmdArgs) string { {Name: "slowdown", Value: fmt.Sprint(args.Optional.Slowdown)}, {Name: "raw_cover", Value: fmt.Sprint(args.Optional.RawCover)}, {Name: "sandbox_arg", Value: fmt.Sprint(args.Optional.SandboxArg)}, + {Name: "pprof_port", Value: fmt.Sprint(args.Optional.PprofPort)}, } optionalArg = " " + tool.OptionalFlags(flags) } -- cgit mrf-deployment