| Commit message (Collapse) | Author | Age | Files | Lines |
| | |
|
| |
|
|
|
|
|
|
| |
1. Init coveragedb client once and propagate it through context to enable mocking.
2. Always init coverage handlers. It simplifies testing.
3. Read webGit and coveragedb client from ctx to make it mockable.
4. Use int for file line number and int64 for merged coverage.
5. Add tests.
|
| |
|
|
| |
I don't see any plans to use it.
|
| |
|
|
|
|
| |
We currently merge bigquery data for every line coverage request.
Let's read cached lines coverage data from spanner instead.
It allows to get only 1 file version from git and skip the data merge step.
|
| | |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
It directly uses the coverage signals from BigQuery.
There is no need to wait for the coverage_batch cron jobs.
Looks good for debugging.
Limitations:
1. It is slow. I know how to speed up but want to stabilize the UI first.
2. It is expensive because of the direct BQ requests. Limited to admin only because of it.
3. It merges only the commits reachable on github because of the gitweb throttling.
After the UI stabilization I'll save all the required artifacts to spanner and make this page publicly available.
To merge all the commits, not the github reachable only, http git caching instance is needed.
|
| |
|
|
|
|
|
|
|
| |
Current coverage is a week long data merge for every day.
The goal is to show a monthly data by default and
make daily data available for &period=day requests.
This commit makes the first two steps:
1. Make the day a day long, not a week long aggregation.
2. Enable the month long merges available for &period=month.
|
| | |
|
| |
|
|
|
| |
exports default to generate cover html,
and all means cover,subsystem,module,funccover,rawcover,rawcoverfiles
|
| |
|
|
| |
export subsystemcover, modulecover, funccover, rawcover, rawcoverfiles
|
| |
|
|
|
|
|
| |
pcs from syms is less than CallbackPoints because
some pcs are not within any function.
For coverage checking, use CallbackPoints to get the full pcs in .text section.
|
| | |
|
| |
|
|
| |
Added DiscoverModules to main to prepare for calling MakeReportGenerator()
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| |
|
|
|
|
|
|
| |
Rename CoverHandlerParams to HandlerParams.
Everything in cover package is Cover-something,
adding cover prefix to everything is excessive.
And cover.CoverHandlerParams.CoverFilter is way more cover
I am ready to handle. Filter is just fine.
|
| |
|
|
|
|
| |
In preparation for pkg/host removal.
Nothing in pkg/host uses KernelModule, and pkg/cover
is effectively the only user of KernelModule.
|
| |
|
|
|
|
|
|
|
|
|
|
| |
coverage
When coverage points returned by kcov do not have corresponding coverage
callbacks, this may indicate a problem with irrelevant signal being used
for fuzzing. Therefore, by default syz-manager reports errors and does
not show the coverage report in this case.
However, these errors can be annoying when onboarding new platforms, so
we let the users disable them by passing the ?force=1 URL parameter.
|
| |
|
|
| |
Handy for testing/benchmarking w/o running full syz-manager each time.
|
| |
|
|
|
|
|
|
| |
Addresses from /proc/modules have little to do with the addresses of
modules' text sections. Instead of trying to fix them by parsing ELF
headers, stop supporting this use case.
It is still possible to pass modules.json to syz-cover.
|
| |
|
|
|
|
|
|
|
|
| |
Debugging coverage point validation warnings may require looking at
specific addresses, which are not printed anywhere. Add a URL parameter
that can be passed to prepareFileMap() to print a more meaningful error
message.
Also factor out the error message code from prepareFileMap() to reduce
its cyclomatic complexity.
|
| |
|
|
| |
Change-Id: I1ca79a9bd16ccbbc59322c6c5b8f50b1e6d82c86
|
| |
|
|
| |
Change-Id: Ic29ce246932c26a9834a51e143fb0f15f6ba69c6
|
| |
|
|
| |
Change-Id: I839fbc94c02da62cadee99a44b4f7c520e35a0dd
|
| |
|
|
| |
Change-Id: If0b88b3d1b4bd6a90609e9429200da76d09244a1
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* syz-manager: endpoint to display canonical modules
Add a "/modules" endpoint that displays canonical module
information.
* tools/syz-cover: accept module info
Add support to syz-cover to generate coverage reports for drivers that
are built as kernel modules.
At the moment, ReportGenerator instances are created with no
[]host.KernelModule information. As a result, discoverModulesLinux()
does not process kernel modules, only the vmlinux.
Add a "-modules" flag that accepts module info. This info
can be fetched from the web UI at "/modules".
Usage:
$ ./bin/syz-cover -arch arm64 -kernel_obj ${KOBJ} -kernel_src ${KSRC} \
-json ~/report.json -modules ~/modules \
~/rawcover
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Add a `json` CLI flag that allows for writing out a JSON file with the
following coverage information.
* Module
* Filename
* Covered source lines
* Uncovered source lines
* Both source lines
This can be used to view syzkaller coverage information on other source
browsing/viewing tools.
Usage:
$ ./syz-cover -kernel_obj <path/to/vmlinux> -json <output_json> rawcover
|
| | |
|
| | |
|
| |
|
|
|
|
|
| |
pkg/cover expects absolute paths and mis-handles paths if they are relative.
Abs-ulitize all paths.
Fixes #3686
|
| |
|
|
|
| |
Add a new html flag to the syz-cover tool that allows saving the
coverage HTML report to a particular file.
|
| | |
|
| | |
|
| |
|
|
|
|
|
|
|
|
| |
Pass modules as []host.KernelModule to cover.MakeReportGenerator.
This avoids make(map) in callers that don't pass modules.
Store modules as []*KernelModule.
This avoids clumsy assignments to the map to update Path
and allows to store modules as *KernelModule rather than by name
(we are not scripting, pointer is more flexible and handy representation).
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The PCs returned for dynamic loaded module (DLKM) is not
parsed in coverage page, these PCs are dropped.
The commit is to use DLKM modules' load address and symbol file
to restore the PC and show coverage data of DLKM.
Introduced new config module_obj to specify module directories.
Example of config:
"module_obj": [
"module_path1"
"module_path2"
]
For linux target, before Manager.Connect run, load addresses are
getting from /proc/modules in order to group PCs into modules.
And so, if modules are under kernel_obj or module_obj dir,
their addresses and paths can be generated automatically.
kernel_obj is searched before module_obj dir and the first found
ko object is always used.
Also note that kaslr needs to be disabled.
|
| |
|
|
| |
This reverts commit 69a06ca2b532ff4021a43fdead4e2ac1452a44c0.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
PC returned for dynamic loaded module (DLKM) is not
parsed in coverage page.
So the commit is to use DLKM modules' load address
to restore the PC and show coverage data of DLKM.
As the load address is written in cfg file, so kaslr
needs to be disabled.
And for linux target, load address is getting from
/proc/modules during instance setup.
For either manual or auto address setting case,
name and path are needed in config kernel_modules, where
name is module name on target.
path is module unstripped object path on host.
addr is decimal value of module load address on target.
Example of config:
"kernel_modules": [
{
"name": "nf_nat",
"path": "/usr/src/linux-source/net/netfilter/nf_nat.ko",
"addr": 18446744072637911040
}
]
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* pkg/cover, syz-manager: show coverage summary
The funccover or cover page is not easy for statistic purpose.
So add /cover?type=rawfiles to show coverage based on each file.
And /cover?type=table page to show coverage for group of components.
If driver_path_map.json exists, /cover?type=table can show component coverage.
Format example:
{
"all": [ "/" ],
"audio": [
"/techpack/audio/asoc",
"/techpack/audio/dsp",
"/techpack/audio/ipc",
"/sound/core"
]
}
If driver_path_map.json not exist, it will show one line summary.
* pkg/cover: use subsystem naming
* syz-manager: use /subsystemcover and /filecover
* pkg/cover: use subsystem from config
* pkg/mgrconfig: add kernel_subsystem
* pkg/cover, tools/syz-cover: fix make test
* all: fix presumit errors
* pkg/cover, syz-manager: fix subsystem
|
| | |
|
| |
|
|
| |
cmdprof functionality seems to fit well into pkg/tool.
|
| |
|
|
|
|
| |
This looks more natural.
All users duplicate logic of creating object file path,
and then pkg/cover second guesses object dir back.
|