aboutsummaryrefslogtreecommitdiffstats
path: root/sys/linux/init_images.go
Commit message (Collapse)AuthorAgeFilesLines
* prog: move image extraction from sys/linuxDmitry Vyukov2022-12-221-88/+0
| | | | | | Now that images are not linux-specific, we can move all image-related logic directly into prog package and significantly simplify the logic.
* pkg/image: factor out from progDmitry Vyukov2022-12-221-1/+2
| | | | | | | Move image compression-related function to a separate package. In preperation for subsequent changes that make decompression more complex. Prog package is already large and complex. Also makes running compression tests/benchmarks much faster.
* prog: don't materialize uncompressed image in DeserializeDmitry Vyukov2022-11-251-3/+3
| | | | | | | | | | Currently we uncompress all images in Deserialize to check that the data is valid. As the result deserializing all seeds we have takes ~40 seconds of real time and ~125 seconds of CPU time. And we do this during every syz-manager start. Don't materialize the uncompressed image. This reduces real time to ~15 seconds and CPU time to 18 seconds (no garbage collections). In syz-manager the benefit is even larger since garbage collections take longer (larger heap).
* executor: don't pass uncompressed zlib sizeDmitry Vyukov2022-11-231-19/+12
| | | | | | This will allow us to mutate the image size. Fixes #3527
* sys/linux: update asset storage for new `syz_mount_image`Hrutvik Kanabar2022-11-211-212/+37
| | | | | | | | | | | | Asset storage is now significantly simpler: we just take the Base64-encoded, compressed image and output it to a file. There is a slight overhead in that we decompress from the `zlib` format and re-compress to the `gzip` format. This commit removes most of the logic from `init_images.go`, and therefore most of the tests from `init_images_test.go`. We could instead keep this logic around and use it to adapt old-style `syz_mount_image` calls in existing corpuses to match the new format.
* sys: control structural changes during neutralizationAleksandr Nogikh2022-09-291-17/+39
| | | | | | | | | | | Ideally, we should properly support the already existing fix flag to distinguish between fixing and checking, but for now at least let it control whether structural changes are to be made. Otherwise we get into trouble while hint-mutating syz_mount_image calls, because we iterate over all call arguments and (possibly) remove them at the same time. It leads to `bad group arg size %v, should be <= %v for %#v type %#v` errors.
* sys/linux: extract raw images from syz_mount_imageAleksandr Nogikh2022-09-271-12/+83
| | | | | To simplify the extraction code, let's make segments non-overlapping even before execution.
* executor: move syz_mount_image's sanity checks to syz-fuzzerAleksandr Nogikh2022-09-271-0/+176
It will simplify the C code and let us extract the raw images in a more convenient way.