pkg/report: detect suspicious RCU usage report corruption

This commit is contained in:
Andrey Konovalov 2017-11-29 13:45:22 +01:00 committed by Andrey Konovalov
parent 4263b2afbe
commit 19d272a98f
2 changed files with 54 additions and 0 deletions

View File

@ -567,6 +567,11 @@ var linuxOopses = []*oops{
title: compile("WARNING: suspicious RCU usage(?:.*\n)+?.*?{{SRC}}"),
fmt: "suspicious RCU usage at %[1]v",
},
{
title: compile("WARNING: suspicious RCU usage"),
fmt: "suspicious RCU usage",
corrupted: true,
},
{
title: compile("WARNING: kernel stack regs at [0-9a-f]+ in [^ ]* has bad '([^']+)' value"),
fmt: "WARNING: kernel stack regs has bad '%[1]v' value",
@ -661,6 +666,11 @@ var linuxOopses = []*oops{
title: compile("INFO: suspicious RCU usage(?:.*\n)+?.*?{{SRC}}"),
fmt: "suspicious RCU usage at %[1]v",
},
{
title: compile("INFO: suspicious RCU usage"),
fmt: "suspicious RCU usage",
corrupted: true,
},
{
title: compile("INFO: task .* blocked for more than [0-9]+ seconds"),
fmt: "INFO: task hung",

View File

@ -1418,6 +1418,50 @@ r0 = ioctl$KVM_CREATE_VM(0xffffffffffffffff, 0xae01, 0x0)
[ 293.236495] RIP: skb_pull+0xd5/0xf0 RSP: ffff8801d9fdf270
[ 293.242035] ---[ end trace d2d6da9d918cb453 ]---
`, `kernel BUG at ./include/linux/skbuff.h:LINE!`, false,
}, {
`
[ 161.498638] =============================
[ 161.506098] device gre0 entered promiscuous mode
[ 161.575261] WARNING: suspicious RCU usage
[ 161.587306] 4.14.0-next-20171127+ #53 Not tainted
[ 161.631389] BUG: unable to handle kernel NULL pointer dereference at 0000000000000074
[ 161.631414] IP: kfree+0xb2/0x250
[ 161.631417] PGD 1cd9be067 P4D 1cd9be067 PUD 1c646d067 PMD 0
[ 161.631433] Oops: 0000 [#1] SMP KASAN
[ 161.631440] Dumping ftrace buffer:
[ 161.631445] (ftrace buffer empty)
[ 161.631448] Modules linked in:
[ 161.631459] CPU: 1 PID: 17319 Comm: syz-executor7 Not tainted 4.14.0-next-20171127+ #53
[ 161.631463] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
[ 161.631468] task: ffff8801c5442040 task.stack: ffff8801c7ed8000
[ 161.631478] RIP: 0010:kfree+0xb2/0x250
[ 161.631482] RSP: 0018:ffff8801c7edf780 EFLAGS: 00010046
[ 161.631489] RAX: 0000000000000000 RBX: ffff8801c7edf948 RCX: ffffffffffffffff
[ 161.631494] RDX: ffffea00071fb7c0 RSI: 0000000000000000 RDI: ffff8801c7edf948
[ 161.631499] RBP: ffff8801c7edf7a0 R08: ffffed003b02866c R09: 0000000000000000
[ 161.631503] R10: 0000000000000001 R11: ffffed003b02866b R12: 0000000000000286
[ 161.631508] R13: 0000000000000000 R14: ffff8801c7edf948 R15: ffff8801c7edf8b0
[ 161.631514] FS: 00007ff14d179700(0000) GS:ffff8801db500000(0000) knlGS:0000000000000000
[ 161.631519] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[ 161.631524] CR2: 0000000000000074 CR3: 00000001c6768000 CR4: 00000000001426e0
[ 161.631529] Call Trace:
[ 161.631545] blkcipher_walk_done+0x72b/0xde0
[ 161.631565] encrypt+0x50a/0xaf0
...
[ 161.631991] SyS_recvmsg+0x2d/0x50
[ 161.632001] entry_SYSCALL_64_fastpath+0x1f/0x96
[ 161.632007] RIP: 0033:0x4529d9
[ 161.632011] RSP: 002b:00007ff14d178c58 EFLAGS: 00000212 ORIG_RAX: 000000000000002f
[ 161.632018] RAX: ffffffffffffffda RBX: 0000000000758190 RCX: 00000000004529d9
[ 161.632022] RDX: 0000000000010000 RSI: 0000000020d63fc8 RDI: 0000000000000018
[ 161.632026] RBP: 0000000000000086 R08: 0000000000000000 R09: 0000000000000000
[ 161.632031] R10: 0000000000000000 R11: 0000000000000212 R12: 00000000006f2728
[ 161.632035] R13: 00000000ffffffff R14: 00007ff14d1796d4 R15: 0000000000000000
[ 161.632057] Code: c2 48 b8 00 00 00 00 00 ea ff ff 48 89 df 48 c1 ea 0c 48 c1 e2 06 48 01 c2 48 8b 42 20 48 8d 48 ff a8 01 48 0f 45 d1 4c 8b 6a 30 <49> 63 75 74 e8 b5 5c af ff 48 89 de 4c 89 ef 4c 8b 75 08 e8 76
[ 161.632230] RIP: kfree+0xb2/0x250 RSP: ffff8801c7edf780
[ 161.632233] CR2: 0000000000000074
[ 161.632243] ---[ end trace e3c719a9c9d01886 ]---
`, `suspicious RCU usage`, true,
},
}
testParse(t, "linux", tests)