aboutsummaryrefslogtreecommitdiffstats
path: root/pkg/report/linux.go
diff options
context:
space:
mode:
authorDmitry Vyukov <dvyukov@google.com>2018-06-21 14:38:08 +0200
committerDmitry Vyukov <dvyukov@google.com>2018-06-22 16:40:45 +0200
commit2a075d57ab619ae5333c823cc260a722ab0c47fe (patch)
tree0877143833caae9b98744a237b0e3a3694348a6b /pkg/report/linux.go
parentc31f96a8c65c0757078ea77218905c73fc1068d4 (diff)
pkg/report: allow to specify suppressions per OS
Currently all (linux-specific) suppressions are hardcoded in mgrconfig. This is very wrong. Move them to pkg/report and allow to specify per OS. Add gvisor-specific suppressions. This required a bit of refactoring. Introduce mgrconfig.KernelObj finally. Make report.NewReporter and vm.Create accept mgrconfig directly instead of passing it as multiple scattered args. Remove tools/syz-parse and it always did the same as tools/syz-symbolize. Simplify global vars in syz-manager/cover.go. Create reporter eagerly in manager. Use sort.Slice more. Overall -90 lines removed.
Diffstat (limited to 'pkg/report/linux.go')
-rw-r--r--pkg/report/linux.go32
1 files changed, 23 insertions, 9 deletions
diff --git a/pkg/report/linux.go b/pkg/report/linux.go
index 0fc67f80d..f29235b69 100644
--- a/pkg/report/linux.go
+++ b/pkg/report/linux.go
@@ -32,17 +32,15 @@ type linux struct {
eoi []byte
}
-func ctorLinux(kernelSrc, kernelObj string, symbols map[string][]symbolizer.Symbol,
- ignores []*regexp.Regexp) (Reporter, error) {
+func ctorLinux(kernelSrc, kernelObj string, ignores []*regexp.Regexp) (Reporter, []string, error) {
vmlinux := ""
+ var symbols map[string][]symbolizer.Symbol
if kernelObj != "" {
vmlinux = filepath.Join(kernelObj, "vmlinux")
- if symbols == nil {
- var err error
- symbols, err = symbolizer.ReadSymbols(vmlinux)
- if err != nil {
- return nil, err
- }
+ var err error
+ symbols, err = symbolizer.ReadSymbols(vmlinux)
+ if err != nil {
+ return nil, nil, err
}
}
ctx := &linux{
@@ -95,7 +93,23 @@ func ctorLinux(kernelSrc, kernelObj string, symbols map[string][]symbolizer.Symb
[]byte("FAULT_INJECTION: forcing a failure"),
[]byte("FAULT_FLAG_ALLOW_RETRY missing"),
}
- return ctx, nil
+ suppressions := []string{
+ "fatal error: runtime: out of memory",
+ "fatal error: runtime: cannot allocate memory",
+ "panic: failed to start executor binary",
+ "panic: executor failed: pthread_create failed",
+ "panic: failed to create temp dir",
+ "fatal error: unexpected signal during runtime execution", // presubmably OOM turned into SIGBUS
+ "signal SIGBUS: bus error", // presubmably OOM turned into SIGBUS
+ "Out of memory: Kill process .* \\(syz-fuzzer\\)",
+ "Out of memory: Kill process .* \\(sshd\\)",
+ "Killed process .* \\(syz-fuzzer\\)",
+ "Killed process .* \\(sshd\\)",
+ "lowmemorykiller: Killing 'syz-fuzzer'",
+ "lowmemorykiller: Killing 'sshd'",
+ "INIT: PANIC: segmentation violation!",
+ }
+ return ctx, suppressions, nil
}
func (ctx *linux) ContainsCrash(output []byte) bool {