Received: by 10.213.65.68 with SMTP id h4csp3523754imn; Mon, 9 Apr 2018 23:44:21 -0700 (PDT) X-Google-Smtp-Source: AIpwx4+3PYl8Ia577GhMQCqEmii3nVyJJkGASIAcMbAFAttjbMrH57dP20TKPnBDzUm5Iifu9iGo X-Received: by 2002:a17:902:3124:: with SMTP id w33-v6mr24187140plb.335.1523342661816; Mon, 09 Apr 2018 23:44:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1523342661; cv=none; d=google.com; s=arc-20160816; b=pludpobMysXVVM/y93DE9O5DvrDfA7veURPkAJxr6FHxKjzRwfoJWV59yNNc6BWgla 6auSz6ZMLDHvZzzahYgVncoUkzW8uwlYbAxvitrE8gRF7d2N4N0wj7zksGxLjZf1Qvn0 ARMXfe3XnsGehVApXuGZafh8P7VVNLghMS6bZxYXu1QStXqKb5Q4BwfTObqD3c0pX8Yx E2rZXcb0xoSozFYqIb+zIqIsR4xZnUNA+/8XzQppkaJnCOzB1ftERcjbwqgYBWOR745m Ue1FPN4DHJx6tT4lCV6ldQ5C2qhp7SjvGVzFecshDt1WJ2NtUQjDpVGk02//or17yOmb 5nbg== 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=l7Fd3U79yue4CWiRrVVMGnYmPtQcHMCf5g4a+0LuoEs=; b=u/Yy4hOv3uCRt2ULsfb8gdoTiuKjsQoF37m+hefWEYGupHJpTPQ1PoQUH/n/XDPTO/ tiOtdeRAZWW5VmgWVk7EhV6Fvtss8AfuC4z6lBWdHgPmgxR/UT2Bk/tbkJB0wMCQaFv/ Un32aSWxh/0gevSrQQEhJ5CLcVoJwn8vtV0x/HMlM7vCB1t/y7NQYb/cqnt+u3KWLTZg PgiJI0csQtLgGsEUWxGbpc4zS/9JzTGr84Lckp0UTs9bjQvXRqkiPssTcjewGFR+oDxH XOpZh5D/d95s7spztfruDXbovdhla0QGmIDMk2xd+p+oNU/ZTqLVGy4FXhJl1qalgQI1 W6lA== 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 m18si1309329pgv.360.2018.04.09.23.43.44; Mon, 09 Apr 2018 23:44:21 -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 S1752604AbeDJGkT (ORCPT + 99 others); Tue, 10 Apr 2018 02:40:19 -0400 Received: from mx3-rdu2.redhat.com ([66.187.233.73]:44044 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1752002AbeDJGkS (ORCPT ); Tue, 10 Apr 2018 02:40:18 -0400 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.rdu2.redhat.com [10.11.54.4]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id A917A402242D; Tue, 10 Apr 2018 06:40:17 +0000 (UTC) Received: from [10.72.12.90] (ovpn-12-90.pek2.redhat.com [10.72.12.90]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 6DF812026DFD; Tue, 10 Apr 2018 06:40:13 +0000 (UTC) Subject: Re: [PATCH v2 0/2] vhost: fix vhost_vq_access_ok() log check To: Stefan Hajnoczi , virtualization@lists.linux-foundation.org Cc: syzkaller-bugs@googlegroups.com, mst@redhat.com, Linus Torvalds , kvm@vger.kernel.org, linux-kernel@vger.kernel.org, netdev@vger.kernel.org References: <20180410052630.11270-1-stefanha@redhat.com> From: Jason Wang Message-ID: <8642c057-e49d-d95d-19e5-6d304f20064e@redhat.com> Date: Tue, 10 Apr 2018 14:40:10 +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: <20180410052630.11270-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.4 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.6]); Tue, 10 Apr 2018 06:40:17 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.6]); Tue, 10 Apr 2018 06:40:17 +0000 (UTC) for IP:'10.11.54.4' DOMAIN:'int-mx04.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月10日 13:26, Stefan Hajnoczi wrote: > 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!