Skip to content

Prevent vhost kthread from hogging CPU

Jason Wang kvm lkml netdev virtualization 3 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v2 Latest posting 2/24 patches 9 repliesIn review
  2. v2 posting 1/20 of 4 patches 0 repliesSuperseded
  3. v14 patches 6 repliesSuperseded

Patches in v2 posting 2/2 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/4vhost: introduce vhost_exceeds_weight()drivers/vhost/net.c drivers/vhost/scsi.c drivers/vhost/vhost.c +2 more+48 -200 replies
1/4vhost: introduce vhost_exceeds_weight()drivers/vhost/net.c drivers/vhost/scsi.c drivers/vhost/vhost.c +2 more+48 -200 replies
2/4vhost_net: fix possible infinite loopdrivers/vhost/net.c+13 -160 replies
2/4vhost_net: fix possible infinite loopdrivers/vhost/net.c+13 -160 replies
3/4vhost: vsock: add weight supportdrivers/vhost/vsock.c+10 -60 replies
3/4vhost: vsock: add weight supportdrivers/vhost/vsock.c+10 -60 replies
4/4vhost: scsi: add weight supportdrivers/vhost/scsi.c+6 -60 replies
4/4vhost: scsi: add weight supportdrivers/vhost/scsi.c+6 -60 replies

Reviews trailers per patch

None of the 8 patches has a Reviewed-by or Acked-by of their own; the series has one for all of them.

PatchStefan HajnocziMichael S. Tsirkin
SeriesR-b R-b A-b A-b
1/4
1/4
2/4
2/4
3/4
3/4
4/4
4/4

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

Read the v2 thread

Cover letter [PATCH V2 0/4] Prevent vhost kthread from hogging CPU

Hi:

This series try to prevent a guest triggerable CPU hogging through vhost kthread. This is done by introducing and checking the weight after each requrest. The patch has been tested with reproducer of vsock and virtio-net. Only compile test is done for vhost-scsi.

Please review.

This addresses CVE-2019-3900.

Changs from V1:
- fix user-ater-free in vosck patch

Jason Wang (4):
vhost: introduce vhost_exceeds_weight()
vhost_net: fix possible infinite loop
vhost: vsock: add weight support
vhost: scsi: add weight support

 drivers/vhost/net.c   | 41 ++++++++++++++---------------------------
 drivers/vhost/scsi.c  | 21 ++++++++++++++-------
 drivers/vhost/vhost.c | 20 +++++++++++++++++++-
 drivers/vhost/vhost.h |  5 ++++-
 drivers/vhost/vsock.c | 28 +++++++++++++++++++++-------
 5 files changed, 72 insertions(+), 43 deletions(-)
Signature · 1 line
1.8.3.1