diff options
| author | Aleksandr Nogikh <nogikh@google.com> | 2024-01-22 12:09:32 +0100 |
|---|---|---|
| committer | Aleksandr Nogikh <nogikh@google.com> | 2024-01-22 18:19:36 +0000 |
| commit | ef01311589507ea3919e3804f43781eeb0ca9777 (patch) | |
| tree | c55a9742423f78afcaaf6af2eeb37d8f75830804 /vm/vmimpl | |
| parent | 9bd8dcda8c7c494d59bd3132a668f4784ea835c6 (diff) | |
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.
Diffstat (limited to 'vm/vmimpl')
| -rw-r--r-- | vm/vmimpl/vmimpl.go | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/vm/vmimpl/vmimpl.go b/vm/vmimpl/vmimpl.go index 8b63ca77e..a9afdc1f1 100644 --- a/vm/vmimpl/vmimpl.go +++ b/vm/vmimpl/vmimpl.go @@ -67,6 +67,11 @@ type Infoer interface { Info() ([]byte, error) } +// PprofPortProvider is used when the instance wants to define a custom pprof port. +type PprofPortProvider interface { + PprofPort() int +} + // Env contains global constant parameters for a pool of VMs. type Env struct { // Unique name |
