virtio: Harden and test vring
Get series with b4
b4 am [email protected]Versions newest first · linked by author and title
- v3 Latest12 patches 1 replyIn review
- v212 patches 2 repliesSuperseded
- v111 patches 20 repliesSuperseded
Changes in v3 from the cover letter
- Refactor vring init loop per review
Patches in v3 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/12 | virtio_ring: Merge identical variablesdrivers/ | +3 | 1 reply | |
| 2/12 | virtio_ring: Add helper to attach vring descriptordrivers/ | +17 | 0 replies | |
| 3/12 | virtio_ring: Maintain a shadow copy of descriptorsdrivers/ include/ | +43 | 0 replies | |
| 4/12 | virtio_ring: Check used descriptors are chain headsdrivers/ include/ | +14 | 0 replies | |
| 5/12 | dm: test: virtio: Test the virtio ringtest/ | +72 | 0 replies | |
| 6/12 | virtio: sandbox: Fix device features bitfielddrivers/ test/ | +2 | 0 replies | |
| 7/12 | test: dm: virtio: Test notify before del_vqstest/ | +1 | 0 replies | |
| 8/12 | test: dm: virtio: Split out virtio device teststest/ test/ test/ | +190 | 0 replies | |
| 9/12 | virtio: sandbox: Bind RNG rather than block devicedrivers/ test/ test/ | +4 | 0 replies | |
| 10/12 | test: dm: virtio: Test virtio device driver probingtest/ | +9 | 0 replies | |
| 11/12 | virtio: rng: Check length before copyingdrivers/ | +3 | 0 replies | |
| 12/12 | test: dm: virtio_rng: Test virtio-rng with faked devicetest/ test/ | +53 | 0 replies |
Reviews trailers per patch
11 of 12 patches have a Reviewed-by or Acked-by.
| Patch | Simon Glass | Bin Meng |
|---|---|---|
| 1/12 | R-b | R-b |
| 2/12 | R-b | |
| 3/12 | R-b | |
| 4/12 | R-b | |
| 5/12 | R-b | |
| 6/12 | R-b | |
| 7/12 | R-b | |
| 8/12 | ||
| 9/12 | R-b | |
| 10/12 | R-b | |
| 11/12 | R-b | |
| 12/12 | R-b |
Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.
Cover letter [PATCH v3 00/12] virtio: Harden and test vring
Make the virtio ring code resilient against corruption of the buffers shared with the device.
It follows the example of Linux by keeping a private copy of the descriptors and metadata for state tracking and only ever writing to the descriptors that are shared with the device. I was able to test these hardening steps in the sandbox by simulating device writes to the queues.
From v1:
- Fix build errors on SPL by making dependency on virtio drivers explicit
From v2:
- Refactor vring init loop per review
Andrew Scull (12):
virtio_ring: Merge identical variables
virtio_ring: Add helper to attach vring descriptor
virtio_ring: Maintain a shadow copy of descriptors
virtio_ring: Check used descriptors are chain heads
dm: test: virtio: Test the virtio ring
virtio: sandbox: Fix device features bitfield
test: dm: virtio: Test notify before del_vqs
test: dm: virtio: Split out virtio device tests
virtio: sandbox: Bind RNG rather than block device
test: dm: virtio: Test virtio device driver probing
virtio: rng: Check length before copying
test: dm: virtio_rng: Test virtio-rng with faked device
drivers/virtio/virtio_ring.c | 96 ++++++++++------ drivers/virtio/virtio_rng.c | 3 + drivers/virtio/virtio_sandbox.c | 4 +- include/virtio_ring.h | 12 ++ test/dm/Makefile | 6 +- test/dm/virtio.c | 99 ---------------- test/dm/virtio_device.c | 195 ++++++++++++++++++++++++++++++++ test/dm/virtio_rng.c | 52 +++++++++ 8 files changed, 330 insertions(+), 137 deletions(-) create mode 100644 test/dm/virtio_device.c create mode 100644 test/dm/virtio_rng.c
Signature · 1 line
2.36.0.550.gb090851708-goog