[google/syzkaller] 5e8ac3: pkg/report: improve guilty file identification

1 view
Skip to first unread message

Hrutvik Kanabar

unread,
Sep 30, 2022, 9:43:40 AM9/30/22
to syzk...@googlegroups.com
Branch: refs/heads/master
Home: https://github.com/google/syzkaller
Commit: 5e8ac358946b8898e30bb3d9642a1ce5e5b15a5a
https://github.com/google/syzkaller/commit/5e8ac358946b8898e30bb3d9642a1ce5e5b15a5a
Author: Hrutvik Kanabar <hru...@google.com>
Date: 2022-09-30 (Fri, 30 Sep 2022)

Changed paths:
M pkg/report/linux.go
M pkg/report/report.go
M pkg/report/testdata/linux/guilty/36
A pkg/report/testdata/linux/guilty/54
A pkg/report/testdata/linux/guilty/55
A pkg/report/testdata/linux/guilty/56

Log Message:
-----------
pkg/report: improve guilty file identification

Previously we would pick the first non-ignored file. Now instead,
continue searching the stack trace for more specific files.

A "more specific" file wrt the first non-ignored file has:
- the same directory prefix
- a deeper directory nesting
E.g. `fs/ntfs3/*.c` is "more specific" than "fs/*.c".
We search for the most specific file (i.e. the deepest nesting), and
take the first most specific if there are multiple files with the same
nesting.

This commit also adds three tests for this behaviour, taken from
recent `syzbot` bugs which identified the wrong file. Now the desired
file is identified.

Only one existing test shows different output with the new behaviour.

Updates #3393.


Reply all
Reply to author
Forward
0 new messages