Documentation ¶
Index ¶
- Constants
- Variables
- type APIHandler
- type APINamespaceHandler
- type AccessLevel
- type Bug
- type BugReporting
- type Build
- type BuildType
- type Config
- type ConfigManager
- type Crash
- type EmailConfig
- type ErrDontLog
- type ExternalConfig
- type FilterResult
- type GlobalConfig
- type JSONHandler
- type Job
- type KernelRepo
- type Manager
- type ManagerStats
- type Reporting
- type ReportingFilter
- type ReportingState
- type ReportingStateEntry
- type ReportingType
- type Text
Constants ¶
const ( BugStatusFixed = 1000 + iota BugStatusInvalid BugStatusDup )
const ( ReproLevelNone = dashapi.ReproLevelNone ReproLevelSyz = dashapi.ReproLevelSyz ReproLevelC = dashapi.ReproLevelC )
const (
BugStatusOpen = iota
)
const (
MaxStringLen = 1024
)
Variables ¶
var ErrAccess = errors.New("unauthorized")
Functions ¶
This section is empty.
Types ¶
type APIHandler ¶
type APINamespaceHandler ¶
type AccessLevel ¶
type AccessLevel int
const ( AccessPublic AccessLevel = iota + 1 AccessUser AccessAdmin )
type Bug ¶
type Bug struct { Namespace string Seq int64 // sequences of the bug with the same title Title string Status int DupOf string NumCrashes int64 NumRepro int64 ReproLevel dashapi.ReproLevel HasReport bool FirstTime time.Time LastTime time.Time LastSavedCrash time.Time LastReproTime time.Time Closed time.Time Reporting []BugReporting Commits []string HappenedOn []string `datastore:",noindex"` // list of managers PatchedOn []string `datastore:",noindex"` // list of managers }
type BugReporting ¶
type BugReporting struct { Name string // refers to Reporting.Name ID string // unique ID per BUG/BugReporting used in commucation with external systems ExtID string // arbitrary reporting ID that is passed back in dashapi.BugReport Link string CC string // additional emails added to CC list (|-delimited list) CrashID int64 // crash that we've last reported in this reporting ReproLevel dashapi.ReproLevel Reported time.Time Closed time.Time }
type Build ¶
type Build struct { Namespace string Manager string ID string // unique ID generated by syz-ci Type BuildType Time time.Time OS string Arch string VMArch string SyzkallerCommit string CompilerID string KernelRepo string KernelBranch string KernelCommit string KernelCommitTitle string `datastore:",noindex"` KernelCommitDate time.Time `datastore:",noindex"` KernelConfig int64 // reference to KernelConfig text entity }
type Config ¶
type Config struct { // See GlobalConfig.AccessLevel. AccessLevel AccessLevel // Name used in UI. DisplayTitle string // URL of a source coverage report for this namespace // (uploading/updating the report is out of scope of the system for now). CoverLink string // Per-namespace clients that act only on a particular namespace. Clients map[string]string // A unique key for hashing, can be anything. Key string // Mail bugs without reports (e.g. "no output"). MailWithoutReport bool // How long should we wait before reporting a bug. ReportingDelay time.Duration // How long should we wait for a C repro before reporting a bug. WaitForRepro time.Duration // Managers contains some special additional info about syz-manager instances. Managers map[string]ConfigManager // Reporting config. Reporting []Reporting }
Per-namespace config.
func (*Config) ReportingByName ¶
type ConfigManager ¶
type ConfigManager struct { Decommissioned bool // The instance is no longer active. DelegatedTo string // If Decommissioned, test requests should go to this instance instead. // Normally instances can test patches on any tree. // However, some (e.g. non-upstreamed KMSAN) can test only on a fixed tree. // RestrictedTestingRepo contains the repo for such instances // and RestrictedTestingReason contains a human readable reason for the restriction. RestrictedTestingRepo string RestrictedTestingReason string }
ConfigManager describes a single syz-manager instance. Dashboard does not generally need to know about all of them, but in some special cases it needs to know some additional information.
type Crash ¶
type Crash struct { Manager string BuildID string Time time.Time Reported time.Time // set if this crash was ever reported Maintainers []string `datastore:",noindex"` Log int64 // reference to CrashLog text entity Report int64 // reference to CrashReport text entity ReproOpts []byte `datastore:",noindex"` ReproSyz int64 // reference to ReproSyz text entity ReproC int64 // reference to ReproC text entity // Custom crash priority for reporting (greater values are higher priority). // For example, a crash in mainline kernel has higher priority than a crash in a side branch. // For historical reasons this is called ReportLen. ReportLen int64 }
type EmailConfig ¶
type EmailConfig struct { Email string Moderation bool MailMaintainers bool DefaultMaintainers []string }
func (*EmailConfig) NeedMaintainers ¶
func (cfg *EmailConfig) NeedMaintainers() bool
func (*EmailConfig) Type ¶
func (cfg *EmailConfig) Type() string
func (*EmailConfig) Validate ¶
func (cfg *EmailConfig) Validate() error
type ErrDontLog ¶
type ErrDontLog error
type ExternalConfig ¶
type ExternalConfig struct {
ID string
}
func (*ExternalConfig) Type ¶
func (cfg *ExternalConfig) Type() string
type FilterResult ¶
type FilterResult int
const ( FilterReport FilterResult = iota // Report bug in this reporting (default). FilterSkip // Skip this reporting and proceed to the next one. FilterHold // Hold off with reporting this bug. )
type GlobalConfig ¶
type GlobalConfig struct { // Min access levels specified hierarchically throughout the config. AccessLevel AccessLevel // Email suffix of authorized users (e.g. "@foobar.com"). AuthDomain string // Google Analytics Tracking ID. AnalyticsTrackingID string // Global API clients that work across namespaces (e.g. external reporting). Clients map[string]string // List of emails blacklisted from issuing test requests. EmailBlacklist []string // Per-namespace config. // Namespaces are a mechanism to separate groups of different kernels. // E.g. Debian 4.4 kernels and Ubuntu 4.9 kernels. // Each namespace has own reporting config, own API clients // and bugs are not merged across namespaces. Namespaces map[string]*Config // Maps full repository address/branch to description of this repo. KernelRepos map[string]KernelRepo }
There are multiple configurable aspects of the app (namespaces, reporting, API clients, etc). The exact config is stored in a global config variable and is read-only. Also see config_stub.go.
type Job ¶
type Job struct { Created time.Time User string CC []string Reporting string ExtID string // email Message-ID Link string // web link for the job (e.g. email in the group) Namespace string Manager string BugTitle string CrashID int64 // Provided by user: KernelRepo string KernelBranch string Patch int64 // reference to Patch text entity Attempts int // number of times we tried to execute this job Started time.Time Finished time.Time // if set, job is finished // Result of execution: CrashTitle string // if empty, we did not hit crash during testing CrashLog int64 // reference to CrashLog text entity CrashReport int64 // reference to CrashReport text entity BuildID string Error int64 // reference to Error text entity, if set job failed Reported bool // have we reported result back to user? }
Job represent a single patch testing job for syz-ci. Later we may want to extend this to other types of jobs (hense the generic name):
- test of a committed fix
- reproduce crash
- test that crash still happens on HEAD
- crash bisect
Job has Bug as parent entity.
type KernelRepo ¶
type ManagerStats ¶
type ManagerStats struct { Date int // YYYYMMDD MaxCorpus int64 MaxCover int64 TotalFuzzingTime time.Duration TotalCrashes int64 TotalExecs int64 }
ManagerStats holds per-day manager runtime stats. Has Manager as parent entity. Keyed by Date.
type Reporting ¶
type Reporting struct { // See GlobalConfig.AccessLevel. AccessLevel AccessLevel // A unique name (the app does not care about exact contents). Name string // Name used in UI. DisplayTitle string // Filter can be used to conditionally skip this reporting or hold off reporting. Filter ReportingFilter // How many new bugs report per day. DailyLimit int // Type of reporting and its configuration. // The app has one built-in type, EmailConfig, which reports bugs by email. // And ExternalConfig which can be used to attach any external reporting system (e.g. Bugzilla). Config ReportingType }
One reporting stage.
type ReportingFilter ¶
type ReportingFilter func(bug *Bug) FilterResult
type ReportingState ¶
type ReportingState struct {
Entries []ReportingStateEntry
}
ReportingState holds dynamic info associated with reporting.
type ReportingStateEntry ¶
type ReportingType ¶
type ReportingType interface { // Type returns a unique string that identifies this reporting type (e.g. "email"). Type() string // NeedMaintainers says if this reporting requires non-empty maintainers list. NeedMaintainers() bool // Validate validates the current object, this is called only during init. Validate() error }