Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp393736yba; Thu, 16 May 2019 02:36:39 -0700 (PDT) X-Google-Smtp-Source: APXvYqxeJc9ns71Goe7f18E9ANpVa7063HeViGEphazJRT+m82S85YGXLZrOqyk4cgiGPu82bVBF X-Received: by 2002:a62:1ec3:: with SMTP id e186mr6692393pfe.197.1557999399285; Thu, 16 May 2019 02:36:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1557999399; cv=none; d=google.com; s=arc-20160816; b=vTaFBwOyRrtXg6Ns3GbgQo3k8S6O8iKLF80kAYxvNrhhSU8A+XjrLeUI7Ar6nE8q7Y jka7yXcbZci/rqT1clktEiq0nEppc775Y2jTI1vWA+C0LkbcP5Au7g1YNwvqT17kIfGN cFQr53OKdrAJnlzo85bBcpLfZ3HqFibw2TiBgH+V7yI1zVL344/ig3DPzZ5Tc0cgi7Ow Hu+eCNeu+9G5+c77KY4p3IhnzAb4+olQNrtaCMnu3oarOmlzF5QuVxP8211sqzVjyX3q ajJPE1DMmj0L9QtO+EikwHN79m0D+VIBS0ecEvblY3edctocdyyXcObMIiLx/Prq1YFC 3xGg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=FdH8nycci4Db/MhYzd+/udOw6xWPTkILE5GSjTWOFb4=; b=oaVMsixYL3SIke6ehrIO/Ne9rfEMjIZuen32iF/Cwj1EydBj1gcSsUKg0nnNvk5sk5 GdwWk9jx12fK4d/4NRb/2OG5YjlN5hXVzSxvCsgMg+9wlUwmv7dKH0xdmLnHiD3O9K6m h7SWtNygkUpKfh3urVG8SATgXkJKjKAWqG05QS78Ou818rPlH4PBGPfGrE3aJV/A2JGk ub/JdV3ItWTCpgdPplIegbcN9naT82VYtxS1IlJ4c2IfI3+/0tdsnr1op8nPUEkesU12 HlmrMwKko2OdqQi6lors4dUzKzo3ZNmUg9FRZYaLiw36KzfreAI+AXUWJznhbtWS3mKl aMtg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id v13si4283574plo.429.2019.05.16.02.36.24; Thu, 16 May 2019 02:36:39 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727088AbfEPJe4 (ORCPT + 99 others); Thu, 16 May 2019 05:34:56 -0400 Received: from mx1.redhat.com ([209.132.183.28]:60350 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726336AbfEPJez (ORCPT ); Thu, 16 May 2019 05:34:55 -0400 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 6074B2E95B3; Thu, 16 May 2019 09:34:55 +0000 (UTC) Received: from localhost (ovpn-117-183.ams2.redhat.com [10.36.117.183]) by smtp.corp.redhat.com (Postfix) with ESMTP id A1D405D6A9; Thu, 16 May 2019 09:34:51 +0000 (UTC) Date: Thu, 16 May 2019 10:34:50 +0100 From: Stefan Hajnoczi To: Jason Wang Cc: mst@redhat.com, virtualization@lists.linux-foundation.org, kvm@vger.kernel.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, pbonzini@redhat.com Subject: Re: [PATCH net 0/4] Prevent vhost kthread from hogging CPU Message-ID: <20190516093450.GR29507@stefanha-x1.localdomain> References: <1557992862-27320-1-git-send-email-jasowang@redhat.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="+S4DbcR7QPeSsP0V" Content-Disposition: inline In-Reply-To: <1557992862-27320-1-git-send-email-jasowang@redhat.com> User-Agent: Mutt/1.11.4 (2019-03-13) X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.29]); Thu, 16 May 2019 09:34:55 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --+S4DbcR7QPeSsP0V Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Thu, May 16, 2019 at 03:47:38AM -0400, Jason Wang wrote: > Hi: >=20 > This series try to prvernt 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. >=20 > Please review. >=20 > This addresses CVE-2019-3900. >=20 > Jason Wang (4): > vhost: introduce vhost_exceeds_weight() > vhost_net: fix possible infinite loop > vhost: vsock: add weight support > vhost: scsi: add weight support >=20 > 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(-) >=20 > --=20 > 1.8.3.1 >=20 Looks good aside from the use-after-free in the vsock patch. --+S4DbcR7QPeSsP0V Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEzBAEBCAAdFiEEhpWov9P5fNqsNXdanKSrs4Grc8gFAlzdLroACgkQnKSrs4Gr c8hOGgf/TuvPxOE1Wzw+hWbX63+OyCIjKxtdlJzH3ahFiBAY+mlbhloiyLFxwFwm Her1G3erNlR7kYao/4RMryOx0Bvz6l8iPocrRdkCimdgGuue3RN2fh1lL2kkKQny 33nIZNeWyzfD1igdQ/3Oab0o98s0Nl6orEdx6Ap3cKgBjrdRLhl72qnssF4etlve G4k/1V8OyAQchWGqLBr4/xr0bnnA7Blx4sl18NgJn251MfZazuCk8SxffpfnZ3ni yx6HxtZmQS3fRMCWioBVkforSNUlxURBvCnZYgWpHTP5CnQxzBPyT2NNBEpgXDvi kYJIkiL2SbXqRNh87QZIQAu/WEyUGQ== =JvSa -----END PGP SIGNATURE----- --+S4DbcR7QPeSsP0V--