Skip to content

virtio_balloon: don't push uninitialized buffers to stats virtqueue

Ladi Prosek virtualization 3 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v3 Latest3 patches 1 replyIn review
  2. v21 patch 1 replySuperseded
  3. v11 patch 4 repliesSuperseded

Changes in v3 from the cover letter

* Remove BUG_ON and return the actual number of counters from update_balloon_stats instead.
* Added Arnd's patch to omit VM stats if CONFIG_VM_EVENT_COUNTERS is not defined.

Patches in v3 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/3virtio_balloon: don't push uninitialized buffers to stats virtqueuedrivers/virtio/virtio_balloon.c+2 -00 replies
2/3virtio-balloon: use actual number of stats for stats queue buffersdrivers/virtio/virtio_balloon.c+10 -71 reply
3/3virtio_balloon: prevent uninitialized variable usedrivers/virtio/virtio_balloon.c+2 -00 replies

Reviews trailers per patch

1 of 3 patches has a Reviewed-by or Acked-by.

PatchArnd Bergmann
1/3
2/3A-b
3/3

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v3 thread

Cover letter [PATCH v3 0/3] virtio_balloon: don't push uninitialized buffers to stats virtqueue

This series fixes issues with variable initialization in the virtio balloon driver which manifest as the driver sending invalid memory stats to the host.

v1->v2:

* Call update_balloon_stats instead of filling the buffer with invalid tags.
* Add BUG_ON to update_balloon_stats to formalize the invariant that all slots in the buffer must be initialized.

v2->v3:

* Remove BUG_ON and return the actual number of counters from update_balloon_stats instead.
* Added Arnd's patch to omit VM stats if CONFIG_VM_EVENT_COUNTERS is not defined.

Arnd Bergmann (1):
virtio_balloon: prevent uninitialized variable use

Ladi Prosek (2):
virtio_balloon: don't push uninitialized buffers to stats virtqueue
virtio-balloon: use actual number of stats for stats queue buffers

 drivers/virtio/virtio_balloon.c | 19 +++++++++++++------
 1 file changed, 13 insertions(+), 6 deletions(-)

Thanks!
Ladi