aboutsummaryrefslogtreecommitdiffstats
path: root/pkg/cover/backend/dwarf_test.go
Commit message (Collapse)AuthorAgeFilesLines
* pkg/cover/backend: fix arch usageTaras Madan2025-02-281-4/+2
| | | | There is no need to init arch every loop iteration.
* tools/syz-linter: check t.Logf/Errorf/Fatalf messagesDmitry Vyukov2024-04-171-4/+4
| | | | | Fix checking of Logf, it has string in 0-th arg. Add checking of t.Errorf/Fatalf.
* pkg/cover: don't duplicate broken kcov logic in the testDmitry Vyukov2024-04-091-6/+4
| | | | | dwarf.go already detects if kcov is broken and need to provide this bit for the check in report.go, so just use this bit in the test as well.
* pkg/cover/backend: refactor and fix readCoverPoints()Alexander Potapenko2024-02-261-0/+76
| | | | | | | On ARM64 we used to incorrectly parse BL instructions, which may start with bytes 0x94 to 0x97. Rework the Arch struct to encapsulate the arch-specific call instruction check and simplify readCoverPoints(). Also add some tests.
* pkg/mgrconfig, pkg/cover: introduce the android_split_build flagAlexander Potapenko2024-02-011-0/+64
| | | | | | | | | | | | | | | | | | | | | Source files for Pixel devices are split between the common AOSP kernel (path/to/kernel/aosp) and the device-specific drivers residing in a separate dir (path/to/kernel/private/google-modules for Android 14 and path/to/kernel/gs/google-modules for older Android versions). See https://source.android.com/docs/setup/build/building-pixel-kernels for details. Android build system may reference these dirs in various ways, for which syzkaller cannot always understand where it should look for the source. The newly introduced android_split_build flags handles the problem by adding a list of "delimiters" used when normalizing the kernel source paths. If the path contains any of such delimiters, then everything preceding the last delimiter in the path is replaced with the contents of "kernel_src" from the manager config. By default we only support "/aosp/" and "/private/" corresponding to modern Android systems as delimiters.
* pkg/cover: ensure that all PCs returned by kcov have matching callbacksAlexander Potapenko2024-01-291-0/+40
In the case some modules' addresses are off, certain kernel addresses returned by kcov may not have corresponding coverage callbacks in the .ko files. Keep an additional map in the backend to verify those addresses and report an error if that is the case. Because GCC < 14 may tail-call coverage callbacks, the described check is not performed for binaries which mention GCC in their .comment section. Also adjust text expectations in pkg/cover/report_test.go, so that non-GCC targets check for PCs matching the callbacks. See https://github.com/google/syzkaller/issues/4447 for more details.