aboutsummaryrefslogtreecommitdiffstats
path: root/pkg/report/linux.go
diff options
context:
space:
mode:
authorAndrey Konovalov <andreyknvl@google.com>2019-05-08 15:51:59 +0200
committerDmitry Vyukov <dvyukov@google.com>2019-05-08 16:50:27 +0200
commitf8f0147ff731cd582e6222d953d076bb8cf4c52b (patch)
tree623b9ea4966582ae07d229c3a5e6e6d35a33faff /pkg/report/linux.go
parent1bb034d08992cc3f635e33d41085da8e4c5f1157 (diff)
pkg/report: don't mark unknown oopses as corrupted
Diffstat (limited to 'pkg/report/linux.go')
-rw-r--r--pkg/report/linux.go39
1 files changed, 39 insertions, 0 deletions
diff --git a/pkg/report/linux.go b/pkg/report/linux.go
index a0f7656f9..8e56367a9 100644
--- a/pkg/report/linux.go
+++ b/pkg/report/linux.go
@@ -508,6 +508,10 @@ func (ctx *linux) isCorrupted(title string, report []byte, format oopsFormat) (b
return true, "title matches corrupted regexp"
}
}
+ // If the report hasn't matched any of the oops titles, don't mark it as corrupted.
+ if format.title == nil {
+ return false, ""
+ }
// Check if the report contains stack trace.
if !format.noStackTrace && !bytes.Contains(report, []byte("Call Trace")) &&
!bytes.Contains(report, []byte("backtrace")) {
@@ -991,6 +995,21 @@ var linuxOopses = []*oops{
"pcpu_create", "strdup", "strndup", "memdup"},
},
},
+ {
+ title: compile("BUG: stack guard page was hit at"),
+ fmt: "BUG: stack guard page was hit in %[1]v",
+ stack: &stackFmt{
+ parts: []*regexp.Regexp{
+ linuxRipFrame,
+ },
+ },
+ noStackTrace: true,
+ },
+ {
+ title: compile(`BUG:[[:space:]]*(?:\n|$)`),
+ fmt: "BUG: corrupted",
+ corrupted: true,
+ },
},
[]*regexp.Regexp{
// CONFIG_DEBUG_OBJECTS output.
@@ -1123,6 +1142,11 @@ var linuxOopses = []*oops{
fmt: "WARNING: kernel stack regs has bad value",
noStackTrace: true,
},
+ {
+ title: compile(`WARNING:[[:space:]]*(?:\n|$)`),
+ fmt: "WARNING: corrupted",
+ corrupted: true,
+ },
},
[]*regexp.Regexp{
compile("WARNING: /etc/ssh/moduli does not exist, using fixed modulus"), // printed by sshd
@@ -1215,6 +1239,11 @@ var linuxOopses = []*oops{
fmt: "INFO: %[1]v in %[2]v",
corrupted: true,
},
+ {
+ title: compile(`INFO:[[:space:]]*(?:\n|$)`),
+ fmt: "INFO: corrupted",
+ corrupted: true,
+ },
},
[]*regexp.Regexp{
compile("INFO: lockdep is turned off"),
@@ -1363,6 +1392,16 @@ var linuxOopses = []*oops{
},
},
},
+ {
+ title: compile("kernel BUG at (.*)"),
+ fmt: "kernel BUG at %[1]v",
+ stack: &stackFmt{
+ parts: []*regexp.Regexp{
+ compile("Call Trace:"),
+ parseStackTrace,
+ },
+ },
+ },
},
[]*regexp.Regexp{},
},