From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga04.intel.com (mga04.intel.com [192.55.52.120]) by dpdk.org (Postfix) with ESMTP id AB7251B735 for ; Wed, 7 Feb 2018 17:12:26 +0100 (CET) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga006.fm.intel.com ([10.253.24.20]) by fmsmga104.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 07 Feb 2018 08:12:23 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.46,473,1511856000"; d="scan'208";a="202282066" Received: from irsmsx152.ger.corp.intel.com ([163.33.192.66]) by fmsmga006.fm.intel.com with ESMTP; 07 Feb 2018 08:12:21 -0800 Received: from irsmsx103.ger.corp.intel.com ([169.254.3.197]) by IRSMSX152.ger.corp.intel.com ([169.254.6.52]) with mapi id 14.03.0319.002; Wed, 7 Feb 2018 16:10:55 +0000 From: "Mcnamara, John" To: Stefan Hajnoczi , "Kovacevic, Marko" CC: "dev@dpdk.org" , Maxime Coquelin , Yuanhan Liu Thread-Topic: [dpdk-dev] [PATCH 1/8] vhost: add security model documentation to vhost_user.c Thread-Index: AQHTnntLPjRAKaUMzEirBeeLsG2QY6OXXqSAgAAQQoCAAa/GwA== Date: Wed, 7 Feb 2018 16:10:55 +0000 Message-ID: References: <20180205121642.26428-1-stefanha@redhat.com> <20180205121642.26428-2-stefanha@redhat.com> <6DC05C7C5F25994B81B3F2F214251F66343578@IRSMSX104.ger.corp.intel.com> <20180206142235.GB13343@stefanha-x1.localdomain> In-Reply-To: <20180206142235.GB13343@stefanha-x1.localdomain> Accept-Language: en-GB, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ctpclassification: CTP_NT x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiM2I4NDRiMWMtNTVjMS00MjAwLWFjZWItOTEwOGI1N2JiYWU2IiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX05UIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE2LjUuOS4zIiwiVHJ1c3RlZExhYmVsSGFzaCI6IkwxdWQ4RFhmN3QzcWtZb0RYU2UxOVFLM01DRjljellrSVlYalZkUThkMTA9In0= dlp-product: dlpe-windows dlp-version: 11.0.0.116 dlp-reaction: no-action x-originating-ip: [163.33.239.180] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 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:12:29 -0000 > -----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 >=20 > 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 >=20 > 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. John