From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-0.8 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 78DBBC433F5 for ; Tue, 4 Sep 2018 03:08:52 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 21E0320869 for ; Tue, 4 Sep 2018 03:08:52 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 21E0320869 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726223AbeIDHbu (ORCPT ); Tue, 4 Sep 2018 03:31:50 -0400 Received: from mx3-rdu2.redhat.com ([66.187.233.73]:36688 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1725874AbeIDHbt (ORCPT ); Tue, 4 Sep 2018 03:31:49 -0400 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.rdu2.redhat.com [10.11.54.6]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 6E35C804B9F1; Tue, 4 Sep 2018 03:08:48 +0000 (UTC) Received: from [10.72.12.44] (ovpn-12-44.pek2.redhat.com [10.72.12.44]) by smtp.corp.redhat.com (Postfix) with ESMTPS id AE4EF2157F45; Tue, 4 Sep 2018 03:08:43 +0000 (UTC) Subject: Re: [PATCH] vhost: fix VHOST_GET_BACKEND_FEATURES ioctl request definition To: "Michael S. Tsirkin" , Gleb Fotengauer-Malinovskiy Cc: "David S. Miller" , kvm@vger.kernel.org, virtualization@lists.linux-foundation.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org References: <20180903175906.GA11529@glebfm.cloud.tilaa.com> <20180903222127-mutt-send-email-mst@kernel.org> From: Jason Wang Message-ID: Date: Tue, 4 Sep 2018 11:08:40 +0800 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.9.1 MIME-Version: 1.0 In-Reply-To: <20180903222127-mutt-send-email-mst@kernel.org> 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.6 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.8]); Tue, 04 Sep 2018 03:08:48 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.8]); Tue, 04 Sep 2018 03:08:48 +0000 (UTC) for IP:'10.11.54.6' DOMAIN:'int-mx06.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年09月04日 10:22, Michael S. Tsirkin wrote: > On Mon, Sep 03, 2018 at 08:59:13PM +0300, Gleb Fotengauer-Malinovskiy wrote: >> The _IOC_READ flag fits this ioctl request more because this request >> actually only writes to, but doesn't read from userspace. >> See NOTEs in include/uapi/asm-generic/ioctl.h for more information. >> >> Fixes: 429711aec282 ("vhost: switch to use new message format") >> Signed-off-by: Gleb Fotengauer-Malinovskiy > Hmm it does make sense, and it's not too late to fix this up. > Jason, what's your take on this? Was _IOW intentional? My bad, not intentional. And I agree that fixing this is not too late. So Acked-by: Jason Wang > >> --- >> include/uapi/linux/vhost.h | 2 +- >> 1 file changed, 1 insertion(+), 1 deletion(-) >> >> diff --git a/include/uapi/linux/vhost.h b/include/uapi/linux/vhost.h >> index b1e22c40c4b6..84c3de89696a 100644 >> --- a/include/uapi/linux/vhost.h >> +++ b/include/uapi/linux/vhost.h >> @@ -176,7 +176,7 @@ struct vhost_memory { >> #define VHOST_BACKEND_F_IOTLB_MSG_V2 0x1 >> >> #define VHOST_SET_BACKEND_FEATURES _IOW(VHOST_VIRTIO, 0x25, __u64) >> -#define VHOST_GET_BACKEND_FEATURES _IOW(VHOST_VIRTIO, 0x26, __u64) >> +#define VHOST_GET_BACKEND_FEATURES _IOR(VHOST_VIRTIO, 0x26, __u64) >> >> /* VHOST_NET specific defines */ >> >> >> -- >> glebfm