diff options
| author | Taras Madan <tarasmadan@google.com> | 2025-07-03 16:14:42 +0200 |
|---|---|---|
| committer | Taras Madan <tarasmadan@google.com> | 2025-07-03 14:33:57 +0000 |
| commit | bc0864f30bea915b77f6850a384665e2cd0c417f (patch) | |
| tree | 7ef601b33d6fd4eb3caf458138c372c726fd7a01 | |
| parent | 6970315defc5435bd2f01a60ee4a9a1d1f834d11 (diff) | |
pkg/report: split crash.KCSAN
Introduce crash.KCSANAssert.
Introduce crash.KCSANUnknown.
| -rw-r--r-- | pkg/report/crash/types.go | 7 | ||||
| -rw-r--r-- | pkg/report/testdata/linux/report/427 | 2 | ||||
| -rw-r--r-- | pkg/report/testdata/linux/report/428 | 2 | ||||
| -rw-r--r-- | pkg/report/testdata/linux/report/449 | 2 | ||||
| -rw-r--r-- | pkg/report/testdata/linux/report/750 | 33 | ||||
| -rw-r--r-- | pkg/report/title_to_type.go | 8 |
6 files changed, 48 insertions, 6 deletions
diff --git a/pkg/report/crash/types.go b/pkg/report/crash/types.go index 21bc472a2..1b9457d1d 100644 --- a/pkg/report/crash/types.go +++ b/pkg/report/crash/types.go @@ -20,8 +20,9 @@ const ( KASANUseAfterFreeRead = Type("KASAN-USE-AFTER-FREE-READ") KASANUseAfterFreeWrite = Type("KASAN-USE-AFTER-FREE-WRITE") KASANWrite = Type("KASAN-WRITE") - KCSAN = Type("KCSAN") - KCSANDataRace = Type("DATARACE") + KCSANAssert = Type("KCSAN-ASSERT") + KCSANDataRace = Type("KCSAN-DATARACE") + KCSANUnknown = Type("KCSAN-UNKNOWN") KFENCE = Type("KFENCE") KMSANInfoLeak = Type("KMSAN-INFO-LEAK") KMSANUninitValue = Type("KMSAN-UNINIT-VALUE") @@ -60,7 +61,7 @@ func (t Type) IsKMSAN() bool { } func (t Type) IsKCSAN() bool { - return t == KCSANDataRace || t == KCSAN + return t == KCSANDataRace || t == KCSANAssert || t == KCSANUnknown } func (t Type) IsUBSAN() bool { diff --git a/pkg/report/testdata/linux/report/427 b/pkg/report/testdata/linux/report/427 index 0364e06b2..dd4f2a55b 100644 --- a/pkg/report/testdata/linux/report/427 +++ b/pkg/report/testdata/linux/report/427 @@ -1,5 +1,5 @@ TITLE: KCSAN: data-race in find_next_bit / rcu_report_exp_cpu_mult -TYPE: DATARACE +TYPE: KCSAN-DATARACE FRAME: find_next_bit [ 44.377931][ C4] ================================================================== diff --git a/pkg/report/testdata/linux/report/428 b/pkg/report/testdata/linux/report/428 index 48f5a69f9..0c40f6233 100644 --- a/pkg/report/testdata/linux/report/428 +++ b/pkg/report/testdata/linux/report/428 @@ -1,5 +1,5 @@ TITLE: KCSAN: data-race in e1000_clean_rx_irq -TYPE: DATARACE +TYPE: KCSAN-DATARACE FRAME: e1000_clean_rx_irq [ 44.381409][ C4] ================================================================== diff --git a/pkg/report/testdata/linux/report/449 b/pkg/report/testdata/linux/report/449 index 5c4e9fc91..e5edcab41 100644 --- a/pkg/report/testdata/linux/report/449 +++ b/pkg/report/testdata/linux/report/449 @@ -1,5 +1,5 @@ TITLE: KCSAN: data-race in netlink_recvmsg / netlink_recvmsg -TYPE: DATARACE +TYPE: KCSAN-DATARACE [ 472.478762][T19789] ================================================================== [ 472.486894][T19789] BUG: KCSAN: data-race in netlink_recvmsg / netlink_recvmsg diff --git a/pkg/report/testdata/linux/report/750 b/pkg/report/testdata/linux/report/750 new file mode 100644 index 000000000..ebed9c884 --- /dev/null +++ b/pkg/report/testdata/linux/report/750 @@ -0,0 +1,33 @@ +TITLE: KCSAN: assert: race in dequeue_entities +TYPE: KCSAN-ASSERT +FRAME: dequeue_entities +EXECUTOR: proc=2, id=327 + +[ 67.053553][ T4926] ================================================================== +[ 67.061656][ T4926] BUG: KCSAN: assert: race in dequeue_entities+0x6df/0x760 +[ 67.068875][ T4926] +[ 67.071200][ T4926] race at unknown origin, with assert no writes to 0xffff8881001cb1e8 of 4 bytes by task 4926 on cpu 0: +[ 67.082412][ T4926] dequeue_entities+0x6df/0x760 +[ 67.087294][ T4926] pick_next_task_fair+0x7d/0x410 +[ 67.092327][ T4926] __schedule+0x284/0x940 +[ 67.096845][ T4926] schedule+0x55/0xc0 +[ 67.100839][ T4926] synchronize_rcu_expedited+0x611/0x7a0 +[ 67.106511][ T4926] synchronize_rcu+0x46/0x320 +[ 67.111209][ T4926] nf_tables_abort+0x38f5/0x4340 +[ 67.116168][ T4926] nfnetlink_rcv+0x10ce/0x15c0 +[ 67.120941][ T4926] netlink_unicast+0x599/0x670 +[ 67.125722][ T4926] netlink_sendmsg+0x5cc/0x6e0 +[ 67.130506][ T4926] __sock_sendmsg+0x140/0x180 +[ 67.135224][ T4926] ____sys_sendmsg+0x312/0x410 +[ 67.140036][ T4926] __sys_sendmsg+0x1d9/0x270 +[ 67.144649][ T4926] __x64_sys_sendmsg+0x46/0x50 +[ 67.149433][ T4926] x64_sys_call+0x2689/0x2d60 +[ 67.154132][ T4926] do_syscall_64+0xc9/0x1c0 +[ 67.158645][ T4926] entry_SYSCALL_64_after_hwframe+0x77/0x7f +[ 67.164576][ T4926] +[ 67.166912][ T4926] value changed: 0x00000000 -> 0x00000001 +[ 67.172634][ T4926] +[ 67.174965][ T4926] Reported by Kernel Concurrency Sanitizer on: +[ 67.181139][ T4926] CPU: 0 UID: 0 PID: 4926 Comm: syz.2.327 Not tainted 6.12.0-rc5-syzkaller-00299-g11066801dd4b #0 +[ 67.191741][ T4926] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 09/13/2024 +[ 67.202164][ T4926] ================================================================== diff --git a/pkg/report/title_to_type.go b/pkg/report/title_to_type.go index e5c212fe3..72540b6c2 100644 --- a/pkg/report/title_to_type.go +++ b/pkg/report/title_to_type.go @@ -117,6 +117,10 @@ var titleToType = []struct { crashType: crash.KCSANDataRace, }, { + includePrefixes: []string{"KCSAN: assert: race in"}, + crashType: crash.KCSANAssert, + }, + { includePrefixes: []string{ // keep-sorted start "BUG: bad unlock balance in", @@ -252,4 +256,8 @@ var titleToType = []struct { includePrefixes: []string{"UBSAN:"}, crashType: crash.UBSAN, }, + { + includePrefixes: []string{"KCSAN:"}, + crashType: crash.KCSANUnknown, + }, } |
