Received: by 10.192.165.156 with SMTP id m28csp730946imm; Wed, 11 Apr 2018 06:28:57 -0700 (PDT) X-Google-Smtp-Source: AIpwx4/YdbA7XBigA07FIsnLtmjGiTg+qi9kxa8MLkjqBUt3QSedC5dqbcvBMPzRF/t1s6fOLh/D X-Received: by 10.98.174.23 with SMTP id q23mr4093537pff.103.1523453337191; Wed, 11 Apr 2018 06:28:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1523453337; cv=none; d=google.com; s=arc-20160816; b=R1SSsA888lyBph4kgthKRsTvVxH92WjRSeNtRbpiHmMEgBXmkvGUz47+caeGNQRPiq r6FQgE/fgs8OxI3un2//nOHVan8JmP3W++cV/uCaYqr4wtlgzVBaaAPDpo7Szomyz0ev 1AmQoE3MLFKBrU6khP0vacoZ/N+3Ph6DvKBFUwHtB8o4QjoFoBa6WV9tm2S8U+cYckXL LNlCLImnI3rVosioeQxAhWn7enbW9xLqdyL5aX8dB6OgH7LBK4Pylp1QAZP5xgwYJ86O jmSqgBUhZJXtFqfhp0Rwemr1IISJe9Cy1rGBpkCU/wfiAJ52ExWHkNo3LtbNTEUGmXMl imiQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :arc-authentication-results; bh=bnbAyNnHLsVf+OcHq1hC4kPiQKzl6L486px74BRxpM4=; b=aM+WPbVupo3HCACG/554tYhJYkP/4WD7Oocx1KKeKMVKQNEZpm+xYmzOLuBNSiT/qb h5rVEKGG3IcZyo4fUPVdXLxkrGYQDhmHyuikH7iMHIIjk2DhEYzQUthech5K2oG/x+xl weUJ5Zqr09YzpYXyH58mm7J/7UwWDEChItJRNGcobtRbnfNMQBK9zvbQT9Slo/VpZY2N weX+4UsNhFE3ffAO8PAGIwnNo7fzBOuD8IPSCXfL0DsLmHap8kUNfdMBZHMR/GdpOoDm Z6znwljqnIzDFhCI1VWML5RIMUz7S5KG1mdCFZKonvNUewk4sxNAcsK2ISC/h+dLaLuC JmGw== 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 k63si770254pgc.290.2018.04.11.06.28.19; Wed, 11 Apr 2018 06:28:57 -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 S1753541AbeDKNYI (ORCPT + 99 others); Wed, 11 Apr 2018 09:24:08 -0400 Received: from mx3-rdu2.redhat.com ([66.187.233.73]:43208 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1753091AbeDKNYG (ORCPT ); Wed, 11 Apr 2018 09:24:06 -0400 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.rdu2.redhat.com [10.11.54.5]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id D19E840006E6; Wed, 11 Apr 2018 13:24:05 +0000 (UTC) Received: from redhat.com (ovpn-124-32.rdu2.redhat.com [10.10.124.32]) by smtp.corp.redhat.com (Postfix) with SMTP id 849FB946D5; Wed, 11 Apr 2018 13:24:03 +0000 (UTC) Date: Wed, 11 Apr 2018 16:24:02 +0300 From: "Michael S. Tsirkin" To: Stefan Hajnoczi Cc: virtualization@lists.linux-foundation.org, Linus Torvalds , jasowang@redhat.com, netdev@vger.kernel.org, syzkaller-bugs@googlegroups.com, kvm@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v3 0/2] vhost: fix vhost_vq_access_ok() log check Message-ID: <20180411162345-mutt-send-email-mst@kernel.org> References: <20180411023541.15776-1-stefanha@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180411023541.15776-1-stefanha@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.11.54.5 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.5]); Wed, 11 Apr 2018 13:24:05 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.5]); Wed, 11 Apr 2018 13:24:05 +0000 (UTC) for IP:'10.11.54.5' DOMAIN:'int-mx05.intmail.prod.int.rdu2.redhat.com' HELO:'smtp.corp.redhat.com' FROM:'mst@redhat.com' RCPT:'' Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Apr 11, 2018 at 10:35:39AM +0800, Stefan Hajnoczi wrote: > v3: > * Rebased onto net/master and resolved conflict [DaveM] > > v2: > * Rewrote the conditional to make the vq access check clearer [Linus] > * Added Patch 2 to make the return type consistent and harder to misuse [Linus] > > The first patch fixes the vhost virtqueue access check which was recently > broken. The second patch replaces the int return type with bool to prevent > future bugs. Acked-by: Michael S. Tsirkin We need the 1st one on stable I think. > Stefan Hajnoczi (2): > vhost: fix vhost_vq_access_ok() log check > vhost: return bool from *_access_ok() functions > > drivers/vhost/vhost.h | 4 +-- > drivers/vhost/vhost.c | 70 ++++++++++++++++++++++++++------------------------- > 2 files changed, 38 insertions(+), 36 deletions(-) > > -- > 2.14.3