syzkaller: github.com/google/syzkaller/dashboard/dashapi Index | Files

package dashapi

import "github.com/google/syzkaller/dashboard/dashapi"

Package dashapi defines data structures used in dashboard communication and provides client interface.

Index

Package Files

dashapi.go

type BisectResult Uses

type BisectResult struct {
    Commit          *Commit   // for conclusive bisection
    Commits         []*Commit // for inconclusive bisection
    LogLink         string
    CrashLogLink    string
    CrashReportLink string
    Fix             bool
}

type BugListResp Uses

type BugListResp struct {
    List []string
}

type BugNotif Uses

type BugNotif int
const (
    // Upstream bug into next reporting.
    // If the action succeeds, reporting sends BugStatusUpstream update.
    BugNotifUpstream BugNotif = iota
    // Bug needs to be closed as obsoleted.
    // If the action succeeds, reporting sends BugStatusInvalid update.
    BugNotifObsoleted
    // Bug fixing commit can't be discovered (wrong commit title).
    BugNotifBadCommit
)

type BugNotification Uses

type BugNotification struct {
    Type        BugNotif
    Namespace   string
    Config      []byte
    ID          string
    ExtID       string // arbitrary reporting ID forwarded from BugUpdate.ExtID
    Title       string
    Text        string   // meaning depends on Type
    CC          []string // additional CC emails
    Maintainers []string
    // Public is what we want all involved people to see (e.g. if we notify about a wrong commit title,
    // people need to see it and provide the right title). Not public is what we want to send only
    // to a minimal set of recipients (our mailing list) (e.g. notification about an obsoleted bug
    // is mostly "for the record").
    Public bool
}

type BugReport Uses

type BugReport struct {
    Type              ReportType
    Namespace         string
    Config            []byte
    ID                string
    JobID             string
    ExtID             string // arbitrary reporting ID forwarded from BugUpdate.ExtID
    First             bool   // Set for first report for this bug (Type == ReportNew).
    Moderation        bool
    Title             string
    Link              string // link to the bug on dashboard
    CreditEmail       string // email for the Reported-by tag
    Maintainers       []string
    CC                []string // additional CC emails
    OS                string
    Arch              string
    VMArch            string
    UserSpaceArch     string // user-space arch as kernel developers know it (rather than Go names)
    CompilerID        string
    KernelRepo        string
    KernelRepoAlias   string
    KernelBranch      string
    KernelCommit      string
    KernelCommitTitle string
    KernelCommitDate  time.Time
    KernelConfig      []byte
    KernelConfigLink  string
    Log               []byte
    LogLink           string
    Report            []byte
    ReportLink        string
    ReproC            []byte
    ReproCLink        string
    ReproSyz          []byte
    ReproSyzLink      string
    CrashID           int64 // returned back in BugUpdate
    NumCrashes        int64
    HappenedOn        []string // list of kernel repo aliases

    CrashTitle     string // job execution crash title
    Error          []byte // job execution error
    ErrorLink      string
    ErrorTruncated bool // full Error text is too large and was truncated
    PatchLink      string
    BisectCause    *BisectResult
    BisectFix      *BisectResult
}

BugReport describes a single bug. Used by dashboard external reporting.

type BugStatus Uses

type BugStatus int
const (
    BugStatusOpen BugStatus = iota
    BugStatusUpstream
    BugStatusInvalid
    BugStatusDup
    BugStatusUpdate // aux info update (i.e. ExtID/Link/CC)
    BugStatusUnCC   // don't CC sender on any future communication
)

type BugUpdate Uses

type BugUpdate struct {
    ID           string // copied from BugReport
    JobID        string // copied from BugReport
    ExtID        string
    Link         string
    Status       BugStatus
    ReproLevel   ReproLevel
    DupOf        string
    OnHold       bool     // If set for open bugs, don't upstream this bug.
    Notification bool     // Reply to a notification.
    FixCommits   []string // Titles of commits that fix this bug.
    CC           []string // Additional emails to add to CC list in future emails.
    CrashID      int64
}

type BugUpdateReply Uses

type BugUpdateReply struct {
    // Bug update can fail for 2 reason:
    //  - update does not pass logical validataion, in this case OK=false
    //  - internal/datastore error, in this case Error=true
    OK    bool
    Error bool
    Text  string
}

type Build Uses

type Build struct {
    Manager             string
    ID                  string
    OS                  string
    Arch                string
    VMArch              string
    SyzkallerCommit     string
    SyzkallerCommitDate time.Time
    CompilerID          string
    KernelRepo          string
    KernelBranch        string
    KernelCommit        string
    KernelCommitTitle   string
    KernelCommitDate    time.Time
    KernelConfig        []byte
    Commits             []string // see BuilderPoll
    FixCommits          []Commit
}

Build describes all aspects of a kernel build.

type BuildErrorReq Uses

type BuildErrorReq struct {
    Build Build
    Crash Crash
}

type BuilderPollReq Uses

type BuilderPollReq struct {
    Manager string
}

type BuilderPollResp Uses

type BuilderPollResp struct {
    PendingCommits []string
    ReportEmail    string
}

type Commit Uses

type Commit struct {
    Hash       string
    Title      string
    Author     string
    AuthorName string
    CC         []string
    BugIDs     []string // ID's extracted from Reported-by tags
    Date       time.Time
}

type CommitPollResp Uses

type CommitPollResp struct {
    ReportEmail string
    Repos       []Repo
    Commits     []string
}

type CommitPollResultReq Uses

type CommitPollResultReq struct {
    Commits []Commit
}

type Crash Uses

type Crash struct {
    BuildID     string // refers to Build.ID
    Title       string
    Corrupted   bool // report is corrupted (corrupted title, no stacks, etc)
    Maintainers []string
    Log         []byte
    Report      []byte
    // The following is optional and is filled only after repro.
    ReproOpts []byte
    ReproSyz  []byte
    ReproC    []byte
}

Crash describes a single kernel crash (potentially with repro).

type CrashID Uses

type CrashID struct {
    BuildID   string
    Title     string
    Corrupted bool
}

CrashID is a short summary of a crash for repro queries.

type Dashboard Uses

type Dashboard struct {
    Client string
    Addr   string
    Key    string
    // contains filtered or unexported fields
}

func New Uses

func New(client, addr, key string) *Dashboard

func NewCustom Uses

func NewCustom(client, addr, key string, ctor RequestCtor, doer RequestDoer,
    logger RequestLogger, errorHandler func(error)) *Dashboard

func (*Dashboard) BugList Uses

func (dash *Dashboard) BugList() (*BugListResp, error)

func (*Dashboard) BuilderPoll Uses

func (dash *Dashboard) BuilderPoll(manager string) (*BuilderPollResp, error)

func (*Dashboard) CommitPoll Uses

func (dash *Dashboard) CommitPoll() (*CommitPollResp, error)

func (*Dashboard) JobDone Uses

func (dash *Dashboard) JobDone(req *JobDoneReq) error

func (*Dashboard) JobPoll Uses

func (dash *Dashboard) JobPoll(req *JobPollReq) (*JobPollResp, error)

func (*Dashboard) LoadBug Uses

func (dash *Dashboard) LoadBug(id string) (*LoadBugResp, error)

func (*Dashboard) LogError Uses

func (dash *Dashboard) LogError(name, msg string, args ...interface{})

Centralized logging on dashboard.

func (*Dashboard) NeedRepro Uses

func (dash *Dashboard) NeedRepro(crash *CrashID) (bool, error)

NeedRepro checks if dashboard needs a repro for this crash or not.

func (*Dashboard) Query Uses

func (dash *Dashboard) Query(method string, req, reply interface{}) error

func (*Dashboard) ReportBuildError Uses

func (dash *Dashboard) ReportBuildError(req *BuildErrorReq) error

func (*Dashboard) ReportCrash Uses

func (dash *Dashboard) ReportCrash(crash *Crash) (*ReportCrashResp, error)

func (*Dashboard) ReportFailedRepro Uses

func (dash *Dashboard) ReportFailedRepro(crash *CrashID) error

ReportFailedRepro notifies dashboard about a failed repro attempt for the crash.

func (*Dashboard) ReportingPollBugs Uses

func (dash *Dashboard) ReportingPollBugs(typ string) (*PollBugsResponse, error)

func (*Dashboard) ReportingPollClosed Uses

func (dash *Dashboard) ReportingPollClosed(ids []string) ([]string, error)

func (*Dashboard) ReportingPollNotifications Uses

func (dash *Dashboard) ReportingPollNotifications(typ string) (*PollNotificationsResponse, error)

func (*Dashboard) ReportingUpdate Uses

func (dash *Dashboard) ReportingUpdate(upd *BugUpdate) (*BugUpdateReply, error)

func (*Dashboard) UploadBuild Uses

func (dash *Dashboard) UploadBuild(build *Build) error

func (*Dashboard) UploadCommits Uses

func (dash *Dashboard) UploadCommits(commits []Commit) error

func (*Dashboard) UploadManagerStats Uses

func (dash *Dashboard) UploadManagerStats(req *ManagerStatsReq) error

type JobDoneFlags Uses

type JobDoneFlags int64
const (
    BisectResultMerge   JobDoneFlags = 1 << iota // bisected to a merge commit
    BisectResultNoop                             // commit does not affect resulting kernel binary
    BisectResultRelease                          // commit is a kernel release
)

type JobDoneReq Uses

type JobDoneReq struct {
    ID          string
    Build       Build
    Error       []byte
    Log         []byte // bisection log
    CrashTitle  string
    CrashLog    []byte
    CrashReport []byte
    // Bisection results:
    // If there is 0 commits:
    //  - still happens on HEAD for fix bisection
    //  - already happened on the oldest release
    // If there is 1 commits: bisection result (cause or fix).
    // If there are more than 1: suspected commits due to skips (broken build/boot).
    Commits []Commit
    Flags   JobDoneFlags
}

type JobPollReq Uses

type JobPollReq struct {
    Managers map[string]ManagerJobs
}

type JobPollResp Uses

type JobPollResp struct {
    ID                string
    Type              JobType
    Manager           string
    KernelRepo        string
    KernelBranch      string
    KernelCommit      string
    KernelCommitTitle string
    KernelCommitDate  time.Time
    KernelConfig      []byte
    SyzkallerCommit   string
    Patch             []byte
    ReproOpts         []byte
    ReproSyz          []byte
    ReproC            []byte
}

type JobType Uses

type JobType int
const (
    JobTestPatch JobType = iota
    JobBisectCause
    JobBisectFix
)

type LoadBugReq Uses

type LoadBugReq struct {
    ID string
}

type LoadBugResp Uses

type LoadBugResp struct {
    ID              string
    Title           string
    Status          string
    SyzkallerCommit string
    Arch            string
    ReproOpts       []byte
    ReproSyz        []byte
    ReproC          []byte
}

type LogEntry Uses

type LogEntry struct {
    Name string
    Text string
}

type ManagerJobs Uses

type ManagerJobs struct {
    TestPatches bool
    BisectCause bool
    BisectFix   bool
}

type ManagerStatsReq Uses

type ManagerStatsReq struct {
    Name string
    Addr string

    // Current level:
    UpTime time.Duration
    Corpus uint64
    Cover  uint64

    // Delta since last sync:
    FuzzingTime time.Duration
    Crashes     uint64
    Execs       uint64
}

type NeedReproResp Uses

type NeedReproResp struct {
    NeedRepro bool
}

type PollBugsRequest Uses

type PollBugsRequest struct {
    Type string
}

type PollBugsResponse Uses

type PollBugsResponse struct {
    Reports []*BugReport
}

type PollClosedRequest Uses

type PollClosedRequest struct {
    IDs []string
}

type PollClosedResponse Uses

type PollClosedResponse struct {
    IDs []string
}

type PollNotificationsRequest Uses

type PollNotificationsRequest struct {
    Type string
}

type PollNotificationsResponse Uses

type PollNotificationsResponse struct {
    Notifications []*BugNotification
}

type Repo Uses

type Repo struct {
    URL    string
    Branch string
}

type ReportCrashResp Uses

type ReportCrashResp struct {
    NeedRepro bool
}

type ReportType Uses

type ReportType int
const (
    ReportNew         ReportType = iota // First report for this bug in the reporting stage.
    ReportRepro                         // Found repro for an already reported bug.
    ReportTestPatch                     // Patch testing result.
    ReportBisectCause                   // Cause bisection result for an already reported bug.
    ReportBisectFix                     // Fix bisection result for an already reported bug.
)

type ReproLevel Uses

type ReproLevel int
const (
    ReproLevelNone ReproLevel = iota
    ReproLevelSyz
    ReproLevelC
)

type RequestCtor Uses

type RequestCtor func(method, url string, body io.Reader) (*http.Request, error)

type RequestDoer Uses

type RequestDoer func(req *http.Request) (*http.Response, error)

type RequestLogger Uses

type RequestLogger func(msg string, args ...interface{})

Package dashapi imports 11 packages (graph) and is imported by 7 packages. Updated 2019-12-06. Refresh now. Tools for package owners.