Commit graph

3 commits

Author SHA1 Message Date
Daniel Verkamp
ec9a99146e fuzz: update virtqueue fuzzer for new VolatileSlice API
BUG=chromium:1087578
TEST=emerge-amd64-generic crosvm

Change-Id: Ia206abf03f95ca92f5944fb8efc23d3f8355e292
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/2220731
Tested-by: Daniel Verkamp <dverkamp@chromium.org>
Tested-by: kokoro <noreply+kokoro@google.com>
Auto-Submit: Daniel Verkamp <dverkamp@chromium.org>
Reviewed-by: Manoj Gupta <manojgupta@chromium.org>
Reviewed-by: Dylan Reid <dgreid@chromium.org>
Commit-Queue: Manoj Gupta <manojgupta@chromium.org>
Commit-Queue: Dylan Reid <dgreid@chromium.org>
2020-05-29 22:55:12 +00:00
Chirantan Ekbote
efda10cc64 fuzz: Refactor and improve virtqueue_fuzzer performance
Improve the virtqueue_fuzzer's performance by reducing the maximum queue
size as well as the size of the guest memory.  Zeroing out 256MB of
memory on every iteration was slowing things down quite a bit and we
don't actually need that much memory to fuzz the virtqueue code.

Additionally, refactor the fuzzer to use the virtqueue structs from the
virtio spec to fill out the guest memory.  This should give us more
targeted fuzzing compared to the previous implementation, while also
removing cases where the fuzzer would spin for thousands of iterations
without making any progress.

BUG=chromium:1018267
TEST=`cros_fuzz reproduce` and also run the fuzzer manually

Change-Id: Ibf71aa83c31f16b7f58b23045a0919f7f6824c77
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/1886533
Tested-by: Chirantan Ekbote <chirantan@chromium.org>
Tested-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Stephen Barber <smbarber@chromium.org>
Commit-Queue: Sean Abraham <seanabraham@chromium.org>
Auto-Submit: Chirantan Ekbote <chirantan@chromium.org>
2019-10-29 21:10:42 +00:00
Chirantan Ekbote
1955fd1fb3 fuzz: Add virtqueue fuzzer
BUG=none
TEST=Run it with cros_fuzz

Cq-Depend: chromium:1863177, chromium:1863178
Change-Id: I1a989d7b90116e210a8aae63205c5e8cf6b70faa
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/1863889
Reviewed-by: Chirantan Ekbote <chirantan@chromium.org>
Tested-by: Chirantan Ekbote <chirantan@chromium.org>
Legacy-Commit-Queue: Commit Bot <commit-bot@chromium.org>
Commit-Queue: Manoj Gupta <manojgupta@chromium.org>
2019-10-24 15:23:29 +00:00