rpcserver

package
v0.0.0-...-4b25d55 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 20, 2024 License: Apache-2.0 Imports: 27 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func PrependExecuting

func PrependExecuting(rep *report.Report, lastExec []ExecRecord)

func RunLocal

func RunLocal(cfg *LocalConfig) error

Types

type Config

type Config struct {
	vminfo.Config
	Stats

	VMArch string
	VMType string
	RPC    string
	VMLess bool
	// Hash adjacent PCs to form fuzzing feedback signal (otherwise just use coverage PCs as signal).
	UseCoverEdges bool
	// Filter signal/comparisons against target kernel text/data ranges.
	// Disabled for gVisor/Starnix which are not Linux.
	FilterSignal      bool
	PrintMachineCheck bool
	// Abort early on syz-executor not replying to requests and print extra debugging information.
	DebugTimeouts bool
	Procs         int
	Slowdown      int
	// contains filtered or unexported fields
}

type ExecRecord

type ExecRecord struct {
	ID   int
	Proc int
	Prog []byte
	Time time.Duration
}

type LastExecuting

type LastExecuting struct {
	// contains filtered or unexported fields
}

LastExecuting keeps the given number of last executed programs for each proc in a VM, and allows to query this set after a crash.

func MakeLastExecuting

func MakeLastExecuting(procs, count int) *LastExecuting

func (*LastExecuting) Collect

func (last *LastExecuting) Collect() []ExecRecord

Returns a sorted set of last executing programs. The records are sorted by time in ascending order. ExecRecord.Time is the difference in start executing time between this program and the program that started executing last.

func (*LastExecuting) Hanged

func (last *LastExecuting) Hanged(id, proc int, progData []byte, now time.Duration)

Note a hanged program.

func (*LastExecuting) Note

func (last *LastExecuting) Note(id, proc int, progData []byte, now time.Duration)

Note execution of the 'prog' on 'proc' at time 'now'.

type LocalConfig

type LocalConfig struct {
	Config
	// syz-executor binary.
	Executor string
	// Temp dir where to run executor process, it's up to the caller to clean it up if necessary.
	Dir string
	// Handle ctrl+C and exit.
	HandleInterrupts bool
	// Run executor under gdb.
	GDB         bool
	MaxSignal   []uint64
	CoverFilter []uint64
	// RunLocal exits when the context is cancelled.
	Context        context.Context
	MachineChecked func(features flatrpc.Feature, syscalls map[*prog.Syscall]bool) queue.Source
}

type Manager

type Manager interface {
	MaxSignal() signal.Signal
	BugFrames() (leaks []string, races []string)
	MachineChecked(features flatrpc.Feature, syscalls map[*prog.Syscall]bool) queue.Source
	CoverageFilter(modules []*vminfo.KernelModule) []uint64
}

type Runner

type Runner struct {
	// contains filtered or unexported fields
}

func (*Runner) Alive

func (runner *Runner) Alive() bool

func (*Runner) ConnectionLoop

func (runner *Runner) ConnectionLoop() error

func (*Runner) Handshake

func (runner *Runner) Handshake(conn *flatrpc.Conn, cfg *handshakeConfig) error

func (*Runner) MachineInfo

func (runner *Runner) MachineInfo() []byte

func (*Runner) QueryStatus

func (runner *Runner) QueryStatus() []byte

func (*Runner) SendCorpusTriaged

func (runner *Runner) SendCorpusTriaged() error

func (*Runner) SendSignalUpdate

func (runner *Runner) SendSignalUpdate(plus []uint64) error

func (*Runner) Shutdown

func (runner *Runner) Shutdown(crashed bool, extraExecs ...report.ExecutorInfo) []ExecRecord

func (*Runner) Stop

func (runner *Runner) Stop()

type Server

type Server interface {
	Listen() error
	Close() error
	Port() int
	TriagedCorpus()
	CreateInstance(id int, injectExec chan<- bool, updInfo dispatcher.UpdateInfo) chan error
	ShutdownInstance(id int, crashed bool, extraExecs ...report.ExecutorInfo) ([]ExecRecord, []byte)
	StopFuzzing(id int)
	DistributeSignalDelta(plus signal.Signal)
}

func New

func New(cfg *mgrconfig.Config, mgr Manager, stats Stats, debug bool) (Server, error)

type Stats

type Stats struct {
	StatExecs      *stat.Val
	StatNumFuzzing *stat.Val
	StatVMRestarts *stat.Val
	StatModules    *stat.Val
}

func NewNamedStats

func NewNamedStats(name string) Stats

func NewStats

func NewStats() Stats

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL