| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
|
| |
Parse and assemble Linux backtrace lines independently of whether
vmlinux is present.
Refactor the code to make it easier to insert more postprocessing
actions.
|
| |
|
|
| |
It allows to reduce parameters count for some functions.
|
| | |
|
| |
|
|
|
| |
Call trace can have line like below printed by %pSb:
func_name+0x254/0x5f0 [module_name b31b29679ab712c360bddd861f655ab24898b4db]
|
| | |
|
| | |
|
| |
|
|
|
| |
Fix checking of Logf, it has string in 0-th arg.
Add checking of t.Errorf/Fatalf.
|
| | |
|
| |
|
|
|
|
|
| |
It doesn't bring any extra value and only makes the reports bigger.
Don't do such decompilation for hang-related reports. Refactor the
opcode tests to rely more on the more generic NewReporter constructor.
|
| |
|
|
|
|
|
|
| |
Let decompiler also parse the exact command name. Perform right trim on
the full output line, as it may contain tabs and spaces at the end.
Introduce an "-update" flag to facilitate mass updating of opcode
decompilation tests after changes to this functionality.
|
| |
|
|
|
| |
Restrict TestDisassemblyInReports from running on OSes other than
Linux, as the exact resulting disassembly is dependent on that.
|
| |
|
|
|
|
|
|
|
|
|
| |
Improve Linux reports quality by decompiling "Code: " descriptions.
As that line of opcodes is not guaranteed to begin at the boundary of an
instruction, try to find the right boundary.
Handle the cases of multiple "Code: ..." lines by only decompiling the
first one. In most cases the last such line shows user-space bytes,
which is usually not of great importance.
|
| |
|
|
|
|
| |
Users should not be concerned with the internal derived fields.
Move all derived fields into a separate struct before adding more.
This leaves config.go as a better documentation for end users.
|
| |
|
|
|
|
|
|
|
|
|
|
| |
We use strings to identify OS/Arch.
These strings are duplicated throughout the code base massively.
golangci-lint points to possiblity of typos and duplication.
We already had to define these names in pkg/csource
and disable checking for prog package. A future change triggers
such warnings in another package.
Add OS/Arch name consts to sys/targets so that they can be used
to refer to OS/Arch. Use the consts everywhere.
|
| |
|
|
|
|
|
|
|
|
| |
After f613a7c4 ("pkg/cover: fix prefix computation") we stopped trimming
starting "/" from linux path names. This broke get_maintainers.pl script
which is now given non-existent absolute paths (e.g. "/mm/mmap.c"),
as the result syzbot can't find any maintainers for bug reports
and mails them into lkml limbo.
Trim starting slashes and dots. Extend tests for catch this.
|
| |
|
|
|
|
| |
Don't subtract 1 for RIP lines.
Fixes #361
|
| |
|
|
|
| |
In order to use the already defined kernel name in sys/targets to reduce
duplications.
|
| |
|
|
|
|
|
|
| |
mgrconfig was used only by syz-manager initially,
but now it's used by a dozen of packages and it's
weird to import from under a binary dir.
pkg/ is much more reasonable dir for a widely used
helper package.
|
| |
|
|
|
|
|
| |
The part that we want from gofmt is simplify (-s).
Fix all code that needs fixing.
Update #538
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
Currently all (linux-specific) suppressions are hardcoded in mgrconfig.
This is very wrong. Move them to pkg/report and allow to specify per OS.
Add gvisor-specific suppressions.
This required a bit of refactoring. Introduce mgrconfig.KernelObj finally.
Make report.NewReporter and vm.Create accept mgrconfig directly
instead of passing it as multiple scattered args.
Remove tools/syz-parse and it always did the same as tools/syz-symbolize.
Simplify global vars in syz-manager/cover.go.
Create reporter eagerly in manager. Use sort.Slice more.
Overall -90 lines removed.
|
| |
|
|
|
| |
For the case when VM type affects output.
Will be needed for gvisor. It is kinda linux, but kinda not.
|
| |
|
|
|
|
|
|
| |
That was the last test that used inline input data.
Merge it into TestParse.
Test Output for all crashes in TestParse.
Support multiple oopes in crash
Add more test cases for start/end line.
|
| |
|
|
|
|
|
|
| |
linux_test.go is total mess and very hard to work with.
Turns out we had 2 tests that do exactly the same
(verify Report), but nobody ever noticed.
Move all test data to testdir/. One file per crash.
|
| |
|
|
|
|
|
|
| |
linux_test.go is total mess and very hard to work with.
Turns out we had 2 tests that do exactly the same
(verify Report), but nobody ever noticed.
Move all test data to testdir/. One file per crash.
|
| | |
|
| | |
|
| |
|
|
|
| |
We may find stack frames from the second stack trace in a report when
searching from frames of the first one.
|
| |
|
|
|
|
|
|
| |
Allow stack traces to be intermixed with random kernel messages that don't
start with a ' ' char (all frames in a stack trace do).
Also improve report headers for BUGs from mm/usercopy.c, as we get quite a
lot of those.
|
| |
|
|
|
| |
linuxSymbolizeRe can match "IP: depot_fetch_stack+0x11/0x40", which is not
part of the call stack trace. Add another regexp that only matches frames.
|
| | |
|
| |
|
|
|
|
|
|
|
|
|
| |
Try extracting report from console output only first. If that doesn't work,
try extracting it from the whole log.
Add regexp for executor printed BUGs.
Optimize regexps for rcu detected stalls.
Update rep.StartPos and rep.EndPos in vm/vm.go as well as rep.Output.
|
| | |
|
| | |
|
| |
|
|
| |
Update #457
|
| |
|
|
|
|
|
| |
We see panic during report parsing as in #457.
This does not really fix them, but should stop managers crashing.
Update #457
|
| | |
|
| | |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Currently getting a complete report requires a complex,
multi-step dance (including getting information that
external users are not interested in -- guilty file).
Simplify interface down to 2 functions: Parse and Symbolize.
Parse does what it did before, Symbolize symbolizes report
and fills in maintainers. This simplifies both implementations
of Reporter interface and all users of the interface.
Potentially we could get this down to 1 function Parse
that does everything. However, (1) Symbolize can fail,
while Parse cannot, (2) usually we want to ignore (log)
Symbolize errors, but otherwise proceed with the report,
(3) repro does not need symbolization for all but the
last report.
|
| | |
|
| | |
|
| | |
|
| |
|
|
| |
Look for stack frames in the next 10 lines after 'Call Trace' instead of 3.
|
| | |
|
| |
|
|
|
| |
Add another regexp to oopses that should match the whole report.
Report is considered corrupted when it doesn't.
|
| |
|
|
| |
KASAN report might not have Allocated or Freed stack traces at all.
|
| | |
|
| |
|
|
|
|
|
|
|
| |
We currently have several names for crash attributes, which is disturbing.
E.g. crash title is called "Title" or "Desc". Name them consistently.
Title - single line bug identity.
Report - whole crash text.
Log - whole fuzzer/kernel output.
|
| |
|
|
|
| |
Parse returns 5 variables now. Later we may want to add crash "priority".
Introduce Report struct that holds all report data.
|
| |
|
|
|
| |
This change makes pkg/report try to detect corrupted reports by
using some heuristics.
|
| | |
|