- Notifications
You must be signed in to change notification settings - Fork 2.2k
[virtio-mem] Fuzzer and integ tests fixes #5521
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[virtio-mem] Fuzzer and integ tests fixes #5521
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@ ## feature/virtio-mem #5521 +/- ## ====================================================== - Coverage 83.34% 83.32% -0.03% ====================================================== Files 276 276 Lines 28810 28823 +13 ====================================================== + Hits 24012 24017 +5 - Misses 4798 4806 +8
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
fd76154 to 0c156c4 Compare When the fuzzer generates an invalid bitvec state, the serde code crashes with an assertion error. To avoid these crashes, just store it as a plain Vec<bool> as we don't expect these vecs to be too big (for a 10GB hotpluggable area with 2MiB blocks it would require 5kB for the Vec<bool> compared to 640B with BitVec). Signed-off-by: Riccardo Mancini <mancio@amazon.com>
Return the error up the stack instead of unwrapping it. Note that on PCI this error is unwrapped for every device so there's no change there. Signed-off-by: Riccardo Mancini <mancio@amazon.com>
When the region state is invalid or corrupted (like when generated by the fuzzer), it is possible that a DRAM slot is unplugged, leading to segfaults when accessing guest memory (ie from vmgenid device). To avoid these crashes, validate the region state and allow the DRAM region (not hot-pluggable) to only contain one plugged slot. Signed-off-by: Riccardo Mancini <mancio@amazon.com>
Sometimes on m6a the uffd test fails to write 1.2GB within 10s. Bump the timeout to 30s. Signed-off-by: Riccardo Mancini <mancio@amazon.com>
1cab5f6 to 19fc136 Compare The previously set 256MB were not enough for hotplugging 16GB of memory. This is because the kernel needs 64B for every 4kB page, meaning 262MB for 16GB. Signed-off-by: Riccardo Mancini <mancio@amazon.com>
379c645 to e5f6dc9 Compare
bchalios left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Generally LGTM.
However, it's very annoying that we need to change a type because fuzzer isn't able to create a valid object. Isn't there a way we could skip fuzzer runs that create invalid BitVec objects?
c37849c into firecracker-microvm:feature/virtio-mem
Changes
Fuzzer fixes:
bitvectoVec<bool>to persist to avoid crashes on restore of malformed snapshotInteg test fixes:
Reason
Fix crashes detected by the fuzzer.
License Acceptance
By submitting this pull request, I confirm that my contribution is made under
the terms of the Apache 2.0 license. For more information on following Developer
Certificate of Origin and signing off your commits, please check
CONTRIBUTING.md.PR Checklist
tools/devtool checkbuild --allto verify that the PR passesbuild checks on all supported architectures.
tools/devtool checkstyleto verify that the PR passes theautomated style checks.
how they are solving the problem in a clear and encompassing way.
in the PR.
CHANGELOG.md.Runbook for Firecracker API changes.
integration tests.
TODO.rust-vmm.