Received: by 10.192.165.156 with SMTP id m28csp240062imm; Tue, 10 Apr 2018 20:43:12 -0700 (PDT) X-Google-Smtp-Source: AIpwx4/uzD2YfqVOzYEqxipaI7SPi48ok6xwZlrvNu1OX33nY/6hxoe3r0QqEUV2/r+MdMTepObq X-Received: by 10.99.112.30 with SMTP id l30mr2195886pgc.202.1523418192462; Tue, 10 Apr 2018 20:43:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1523418192; cv=none; d=google.com; s=arc-20160816; b=Li8AZtimWGXJoXrTL8KNZQu41zmH7PB3KhSpJ1PtTUGE+QhRB0ow/iaHRWJAk/SyC8 bNDpn6Wet7Rnc0fcIOS8bQVWfmC7iq4beAnCfwj1DJZORs2ks9dVmp+lwZ34lgb73DWV 9XHzEyfbL/AGJloBnJeSH85ufj6RqW2Ct54jPYIKbzqBe293c6JvlehMYSOXose+SmT/ rPP9WFdsAQNjgwMHK6HYqFezMMglq0E47iZ2nDIsJsASVPthZlLmz/sJKUGr8d10kFR3 Or9LZhR33n9bv/nz/Erf8X++DJB8IYVCgVWWEp3kL0xb3oMGNh/XAfUiBR53Zn8NJVWq pNMg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-language :content-transfer-encoding:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:arc-authentication-results; bh=22+GLjKG9aLb/bPkw1/iRCT8CEaSJK8Zc46btp9s1Tk=; b=gDmKqPgZeTbPvJmT4yJL9wTj/6gbYG8sOYNBHcy6/M6KLc/5fkSAQH0hUtkGHPBhgl czA7aRFiAurWPsm+uVPnLfvrVmNUrBfVs/KMlMhqrUbwROOaH5SQcMuIIyrueh7wcEsK hJieBOsEKeimv8mKKSFPWAJ15BebjeyJhaoapY8YnigCXez2Ywc/w9L5zjtTsqCPQEoN OCNenw7i98iNiRyLaMcJiNHqaDKA9qVGJN82eTHRt78BtU6sD2J3Dgd7ySsLtW7nUfyK LIicINwCTa5RE3+hb3TP5f1X5k9G8kOYvO5d2L6eA6B1B6TyOinvo4QSPjAIqFT2dzg8 +20Q== 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 x12si178559pfi.181.2018.04.10.20.42.35; Tue, 10 Apr 2018 20:43:12 -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 S1752535AbeDKDd3 (ORCPT + 99 others); Tue, 10 Apr 2018 23:33:29 -0400 Received: from mx3-rdu2.redhat.com ([66.187.233.73]:51702 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751624AbeDKDd1 (ORCPT ); Tue, 10 Apr 2018 23:33:27 -0400 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.rdu2.redhat.com [10.11.54.3]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 239AF406F972; Wed, 11 Apr 2018 03:33:27 +0000 (UTC) Received: from [10.72.12.115] (ovpn-12-115.pek2.redhat.com [10.72.12.115]) by smtp.corp.redhat.com (Postfix) with ESMTPS id E9F3E10B2B5A; Wed, 11 Apr 2018 03:33:19 +0000 (UTC) Subject: Re: [PATCH v3 0/2] vhost: fix vhost_vq_access_ok() log check To: Stefan Hajnoczi , virtualization@lists.linux-foundation.org Cc: Linus Torvalds , mst@redhat.com, netdev@vger.kernel.org, syzkaller-bugs@googlegroups.com, kvm@vger.kernel.org, linux-kernel@vger.kernel.org References: <20180411023541.15776-1-stefanha@redhat.com> From: Jason Wang Message-ID: <252aa961-3bc0-ab5b-28c6-7de5d579bbd2@redhat.com> Date: Wed, 11 Apr 2018 11:33:17 +0800 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.6.0 MIME-Version: 1.0 In-Reply-To: <20180411023541.15776-1-stefanha@redhat.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Content-Language: en-US X-Scanned-By: MIMEDefang 2.78 on 10.11.54.3 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.5]); Wed, 11 Apr 2018 03:33:27 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.5]); Wed, 11 Apr 2018 03:33:27 +0000 (UTC) for IP:'10.11.54.3' DOMAIN:'int-mx03.intmail.prod.int.rdu2.redhat.com' HELO:'smtp.corp.redhat.com' FROM:'jasowang@redhat.com' RCPT:'' Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2018年04月11日 10:35, 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. > > 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(-) > Acked-by: Jason Wang Thanks