From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mx1.redhat.com (mx3-rdu2.redhat.com [66.187.233.73]) by dpdk.org (Postfix) with ESMTP id 59BC01B74F for ; Wed, 7 Feb 2018 17:18:12 +0100 (CET) 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 D4EB587AD2; Wed, 7 Feb 2018 16:18:11 +0000 (UTC) Received: from [10.36.112.24] (ovpn-112-24.ams2.redhat.com [10.36.112.24]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 67A04D1BC4; Wed, 7 Feb 2018 16:18:08 +0000 (UTC) To: "Mcnamara, John" , Stefan Hajnoczi , "Kovacevic, Marko" Cc: "dev@dpdk.org" , Yuanhan Liu References: <20180205121642.26428-1-stefanha@redhat.com> <20180205121642.26428-2-stefanha@redhat.com> <6DC05C7C5F25994B81B3F2F214251F66343578@IRSMSX104.ger.corp.intel.com> <20180206142235.GB13343@stefanha-x1.localdomain> From: Maxime Coquelin Message-ID: <1028f834-f20e-d678-43b4-843d73401051@redhat.com> Date: Wed, 7 Feb 2018 17:18:05 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.5.2 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit 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.1]); Wed, 07 Feb 2018 16:18:11 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.1]); Wed, 07 Feb 2018 16:18:11 +0000 (UTC) for IP:'10.11.54.5' DOMAIN:'int-mx05.intmail.prod.int.rdu2.redhat.com' HELO:'smtp.corp.redhat.com' FROM:'maxime.coquelin@redhat.com' RCPT:'' Subject: Re: [dpdk-dev] [PATCH 1/8] vhost: add security model documentation to vhost_user.c X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 07 Feb 2018 16:18:12 -0000 Hi John, On 02/07/2018 05:10 PM, Mcnamara, John wrote: > > >> -----Original Message----- >> From: Stefan Hajnoczi [mailto:stefanha@redhat.com] >> Sent: Tuesday, February 6, 2018 2:23 PM >> To: Kovacevic, Marko >> Cc: dev@dpdk.org; Maxime Coquelin ; Yuanhan >> Liu ; Mcnamara, John >> Subject: Re: [dpdk-dev] [PATCH 1/8] vhost: add security model >> documentation to vhost_user.c >> >> On Tue, Feb 06, 2018 at 01:26:13PM +0000, Kovacevic, Marko wrote: >>>> Input validation is not applied consistently in vhost_user.c. This >>>> suggests that not everyone has the same security model in mind when >>>> working on the code. >>>> >>>> Make the security model explicit so that everyone can understand and >>>> follow the same model when modifying the code. >>>> >>>> Signed-off-by: Stefan Hajnoczi >>>> --- >>>> lib/librte_vhost/vhost_user.c | 17 +++++++++++++++++ >>>> 1 file changed, 17 insertions(+) >>>> >>>> diff --git a/lib/librte_vhost/vhost_user.c >>>> b/lib/librte_vhost/vhost_user.c >>> >>> <...> >>> >>> This is a useful comment but I don't know if it makes sense to include >> it in the vhost_user.c file. >>> >>> Particularly at the top where it looks like a general descriptive >> comment for the file. >>> >>> It would probably be better in the vhost-user section of the >> programmer's guide: >>> >>> http://dpdk.org/doc/guides/prog_guide/vhost_lib.html >> >> That is the public API documentation for users of the library. They don't >> parse VhostUserMsg so I'm not sure the comment would be relevant there. > > Hi, > > If it is public API documentation then it should probably be in a .h file > in doxygen format. > > I'm in favour of the information being added, and thanks for that, just not > in that position in that file. This is not part of the API but purely vhost-user lib internals, so I think this is the right place for this comment. It is more likely to be seen by the developer here than in a separate file. Cheers, Maxime > John >