aboutsummaryrefslogtreecommitdiffstats
path: root/tools/syz-cover
Commit message (Collapse)AuthorAgeFilesLines
* all: reduce params to MakeReportGeneratorJoey Jiao2025-03-171-1/+1
|
* dashboard/app: test coverage /file linkTaras Madan2025-01-271-1/+2
| | | | | | | | 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.
* tools/syz-cover: remove heatmap toolTaras Madan2024-11-071-49/+4
| | | | I don't see any plans to use it.
* dashboard/app: read lines coverage from spannerTaras Madan2024-11-071-29/+36
| | | | | | 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.
* pkg/cover: render file linksTaras Madan2024-10-021-2/+2
|
* dashboard/app: add file coverage pageTaras Madan2024-09-161-0/+1
| | | | | | | | | | | | | | 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.
* dashboard/app: use day long aggregations not week longTaras Madan2024-09-091-3/+15
| | | | | | | | | 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.
* tools/syz-cover: capture debug flag and add force flagben kittner2024-09-061-0/+4
|
* tools/syz-cover: use -exports to select which report to generateJoey Jiao2024-09-051-27/+29
| | | | | exports default to generate cover html, and all means cover,subsystem,module,funccover,rawcover,rawcoverfiles
* tools/syz-cover: export more cov detailsJoey Jiao2024-09-051-40/+32
| | | | export subsystemcover, modulecover, funccover, rawcover, rawcoverfiles
* tools/syz-cover: get all pcs from CallbackPointsJoey Jiao2024-09-051-3/+1
| | | | | | | 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.
* all: rename html functions to meaningful onesJoey Jiao2024-09-051-1/+1
|
* tools/syz-cover: add missing DiscoverModules()ben kittner2024-08-211-6/+17
| | | | Added DiscoverModules to main to prepare for calling MakeReportGenerator()
* tools/syz-cover: filter by source commitTaras Madan2024-08-161-3/+5
|
* tools/syz-cover: explain coverage source commitTaras Madan2024-08-161-1/+4
|
* tools/syz-cover: default commit is latestTaras Madan2024-08-141-1/+1
|
* tools/syz-cover: add toolFileCoverTaras Madan2024-08-141-7/+42
|
* tools/syz-cover: reduce main cycloTaras Madan2024-08-141-14/+17
|
* dashboard/app: linkify subsystems coverageTaras Madan2024-07-221-1/+1
|
* syz-cover: add subsystems heatmapTaras Madan2024-07-171-8/+18
|
* syz-cover: make project-id configurable, defaults to syzkallerTaras Madan2024-07-151-1/+2
|
* all: add the coverage map visualization to syz-coverTaras Madan2024-07-151-10/+39
|
* all: move KernelModule into vminfo packageJoey Jiao2024-07-101-3/+4
|
* all: always use KernelModule ptr to unify usageJoey Jiao2024-06-171-3/+3
|
* pkg/cover: cover lessDmitry Vyukov2024-06-051-5/+2
| | | | | | | | 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.
* pkg/cover: move KernelModule from pkg/hostDmitry Vyukov2024-05-031-4/+3
| | | | | | In preparation for pkg/host removal. Nothing in pkg/host uses KernelModule, and pkg/cover is effectively the only user of KernelModule.
* pkg/cover, syz-manager, tools/syz-cover: add the ?force=1 URL parameter for ↵Alexander Potapenko2024-04-101-0/+1
| | | | | | | | | | | | 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.
* tools/syz-cover: support jsonl exportDmitry Vyukov2024-04-091-0/+10
| | | | Handy for testing/benchmarking w/o running full syz-manager each time.
* tools/syz-cover: do not accept modules info from /proc/modulesAlexander Potapenko2024-02-221-3/+4
| | | | | | | | 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.
* pkg/cover, syz-manager: introduce the /cover?debug=1 parameterAlexander Potapenko2024-02-131-3/+8
| | | | | | | | | | 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.
* tools/syz-cover: parse modules from /proc/modules fileJoey Jiao2023-07-041-3/+4
| | | | Change-Id: I1ca79a9bd16ccbbc59322c6c5b8f50b1e6d82c86
* tools/syz-cover: use all pcs in Symbols if no rawcoverJoey Jiao2023-07-041-10/+15
| | | | Change-Id: Ic29ce246932c26a9834a51e143fb0f15f6ba69c6
* all: pass cfg to MakeReportGeneratorJoey Jiao2023-07-041-2/+1
| | | | Change-Id: I839fbc94c02da62cadee99a44b4f7c520e35a0dd
* tools/syz-cover: read params from config fileJoey Jiao2023-07-041-26/+8
| | | | Change-Id: If0b88b3d1b4bd6a90609e9429200da76d09244a1
* syz-cover: accept canonical module info (#3964)zsm-oss2023-06-151-1/+24
| | | | | | | | | | | | | | | | | | | | | | | * 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
* tools/syz-cover: allow for exporting source line coverage infoZubin Mithra2023-03-101-0/+10
| | | | | | | | | | | | | | | | 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
* all: tools/syz-env make generate resultTaras Madan2023-02-241-0/+1
|
* all: ioutil is deprecated in go1.19 (#3718)Taras Madan2023-02-231-2/+1
|
* tools/syz-cover: use absolute pathsDmitry Vyukov2023-02-161-0/+3
| | | | | | | pkg/cover expects absolute paths and mis-handles paths if they are relative. Abs-ulitize all paths. Fixes #3686
* tools/syz-cover: allow saving coverage HTML report to a particular fileAndrey Konovalov2022-10-291-3/+10
| | | | | Add a new html flag to the syz-cover tool that allows saving the coverage HTML report to a particular file.
* syz-manager: display raw coverageAleksandr Nogikh2022-03-281-1/+1
|
* all: fix arm64 runtime pc not align with elfJoey Jiao2021-06-251-2/+2
|
* pkg/cover: pass modules as []host.KernelModuleDmitry Vyukov2021-03-181-2/+1
| | | | | | | | | | 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).
* all: support coverage of kernel modulesJoey Jiao2021-03-181-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | 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.
* Revert "all: add KernelModule cfg to show DLKM coverage"Dmitry Vyukov2021-03-051-1/+1
| | | | This reverts commit 69a06ca2b532ff4021a43fdead4e2ac1452a44c0.
* all: add KernelModule cfg to show DLKM coverageJoey Jiao2021-03-051-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | 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 summaryJoey Jiaojg2021-03-021-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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
* all: use tool.Failf instead of local functionsDmitry Vyukov2020-12-251-14/+9
|
* pkg/cmdprof: merge into pkg/toolDmitry Vyukov2020-12-251-3/+2
| | | | cmdprof functionality seems to fit well into pkg/tool.
* pkg/cover: accept object dir instead of object fileDmitry Vyukov2020-12-131-3/+1
| | | | | | This looks more natural. All users duplicate logic of creating object file path, and then pkg/cover second guesses object dir back.