diff options
| author | Andrey Konovalov <andreyknvl@google.com> | 2019-05-08 15:51:59 +0200 |
|---|---|---|
| committer | Dmitry Vyukov <dvyukov@google.com> | 2019-05-08 16:50:27 +0200 |
| commit | f8f0147ff731cd582e6222d953d076bb8cf4c52b (patch) | |
| tree | 623b9ea4966582ae07d229c3a5e6e6d35a33faff /pkg | |
| parent | 1bb034d08992cc3f635e33d41085da8e4c5f1157 (diff) | |
pkg/report: don't mark unknown oopses as corrupted
Diffstat (limited to 'pkg')
| -rw-r--r-- | pkg/report/linux.go | 39 | ||||
| -rw-r--r-- | pkg/report/testdata/linux/report/129 | 2 | ||||
| -rw-r--r-- | pkg/report/testdata/linux/report/344 | 4 | ||||
| -rw-r--r-- | pkg/report/testdata/linux/report/381 | 14 | ||||
| -rw-r--r-- | pkg/report/testdata/linux/report/6 | 1 |
5 files changed, 55 insertions, 5 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{}, }, diff --git a/pkg/report/testdata/linux/report/129 b/pkg/report/testdata/linux/report/129 index 665ecf08d..011909f9a 100644 --- a/pkg/report/testdata/linux/report/129 +++ b/pkg/report/testdata/linux/report/129 @@ -1,4 +1,4 @@ -TITLE: INFO: +TITLE: INFO: corrupted CORRUPTED: Y INFO:
\ No newline at end of file diff --git a/pkg/report/testdata/linux/report/344 b/pkg/report/testdata/linux/report/344 index f3c84c9c0..192bba9a1 100644 --- a/pkg/report/testdata/linux/report/344 +++ b/pkg/report/testdata/linux/report/344 @@ -1,6 +1,4 @@ -# TODO: this is not corrupted (maybe) -TITLE: BUG: stack guard page was hit at ADDR (stack is ADDR..ADDR) -CORRUPTED: Y +TITLE: BUG: stack guard page was hit in __udp6_lib_lookup [ 760.482711] BUG: stack guard page was hit at 00000000397c6d92 (stack is 00000000a0f6b86a..000000000e6f9570) [ 760.492602] kernel stack overflow (double-fault): 0000 [#1] PREEMPT SMP diff --git a/pkg/report/testdata/linux/report/381 b/pkg/report/testdata/linux/report/381 new file mode 100644 index 000000000..563e5449e --- /dev/null +++ b/pkg/report/testdata/linux/report/381 @@ -0,0 +1,14 @@ +TITLE: WARNING: ath10k USB support is incomplete, don't expect anything to work! + +usb 5-1: config 0 has no interface number 0 +usb 5-1: config 0 interface 24 altsetting 0 has an invalid endpoint with address 0x0, skipping +usb 5-1: New USB device found, idVendor=13b1, idProduct=0042, bcdDevice=b7.f3 +usb 5-1: New USB device strings: Mfr=0, Product=0, SerialNumber=0 +usb 5-1: config 0 descriptor?? +usb 5-1: WARNING: ath10k USB support is incomplete, don't expect anything to work! +usb 5-1: new high-speed USB device number 109 using dummy_hcd +usb 5-1: Using ep0 maxpacket: 8 +usb 5-1: config 0 has an invalid interface number: 24 but max is 0 +usb 5-1: config 0 has an invalid descriptor of length 255, skipping remainder of the config +usb 5-1: config 0 has no interface number 0 +usb 5-1: config 0 interface 24 altsetting 0 has an invalid endpoint with address 0x0, skipping diff --git a/pkg/report/testdata/linux/report/6 b/pkg/report/testdata/linux/report/6 index df323eafc..113600b99 100644 --- a/pkg/report/testdata/linux/report/6 +++ b/pkg/report/testdata/linux/report/6 @@ -1,6 +1,5 @@ # Raw 'dmesg -r' and /proc/kmsg output. TITLE: WARNING: foo -CORRUPTED: Y <6>[ 85.501187] WARNING: foo <6>[ 85.501187] nouveau [ DRM] suspending kernel object tree... |
