From: Tim Deegan Subject: Re: [PATCH] coverity: Store the modelling file in the source tree. Date: Wed, 4 Dec 2013 16:54:02 +0100 Message-ID: <20131204155402.GB1320@deinos.phlegethon.org> References: <1386170963-8980-1-git-send-email-andrew.cooper3@citrix.com> <20131204153755.GA1320@deinos.phlegethon.org> <529F4EE1.1060602@citrix.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Content-Disposition: inline In-Reply-To: <529F4EE1.1060602@citrix.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Andrew Cooper Cc: Ian Jackson , Keir Fraser , Ian Campbell , Jan Beulich , Xen-devel List-Id: xen-devel@lists.xenproject.org At 15:48 +0000 on 04 Dec (1386168529), Andrew Cooper wrote: > On 04/12/13 15:37, Tim Deegan wrote: > > At 15:29 +0000 on 04 Dec (1386167363), Andrew Cooper wrote: > >> Signed-off-by: Andrew Cooper > >> CC: Keir Fraser > >> CC: Jan Beulich > >> CC: Tim Deegan > >> CC: Ian Campbell > >> CC: Ian Jackson > >> --- > >> misc/coverity_model.c | 70 +++++++++++++++++++++++++++++++++++++++++++++++++ > >> 1 file changed, 70 insertions(+) > >> create mode 100644 misc/coverity_model.c > >> > >> diff --git a/misc/coverity_model.c b/misc/coverity_model.c > >> new file mode 100644 > >> index 0000000..2588adb > >> --- /dev/null > >> +++ b/misc/coverity_model.c > >> @@ -0,0 +1,70 @@ > >> +/* Coverity Scan model > >> + * > >> + * This is a modeling file for Coverity Scan. Modeling helps to avoid false > >> + * positives. > >> + * > >> + * - A model file can't import any header files. > >> + * - Therefore only some built-in primitives like int, char and void are > >> + * available but not wchar_t, NULL etc. > >> + * - Modeling doesn't need full structs and typedefs. Rudimentary structs > >> + * and similar types are sufficient. > >> + * - An uninitialized local pointer is not an error. It signifies that the > >> + * variable could be either NULL or have some data. > >> + * > >> + * Coverity Scan doesn't pick up modifications automatically. The model file > >> + * must be uploaded by an admin in the analysis. > >> + */ > > This is copied from the cpython model file, AFAICT. Have you checked that > > their license allows us to include it in Xen? We might have to include > > their copyright, BSD-style. > > > > Tim. > > Hmm - I knew I had forgotten something. > > As for Python licensing, it is a little complicated. > > From their own licence file, their coverity modelling file is > "GPL-compatible", with the qualification of > > (1) GPL-compatible doesn't mean that we're distributing Python under > the GPL. All Python licenses, unlike the GPL, let you distribute > a modified version without making your changes open source. The > GPL-compatible licenses make it possible to combine Python with > other software that is released under the GPL; the others don't. > > > In addition, it was only the header which was copied, being by far and > away the best and concise description of what a modelling file is and > how it works. > > From my reading of this, we are ok. Good. Do we need to include their copyright line? > It might be reasonable to include a note saying that we used the cpython > modelling file as a reference (even Coverity themselves recommend it as > a reference), but that all content is Xen specific? I would be inclined just to rewrite the block comment if the rest of the file is new code. Tim.