[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <alpine.DEB.2.22.394.2203301007190.2592@hadrien>
Date: Wed, 30 Mar 2022 10:07:49 +0200 (CEST)
From: Julia Lawall <julia.lawall@...ia.fr>
To: David Gow <davidgow@...gle.com>
cc: Marcelo Schmitt <marcelo.schmitt1@...il.com>,
Jonathan Corbet <corbet@....net>,
Mauro Carvalho Chehab <mchehab+huawei@...nel.org>,
Daniel Latypov <dlatypov@...gle.com>,
"open list:DOCUMENTATION" <linux-doc@...r.kernel.org>,
linux-sparse@...r.kernel.org, cocci@...ia.fr,
smatch@...r.kernel.org,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
Shuah Khan <skhan@...uxfoundation.org>,
Dan Carpenter <dan.carpenter@...cle.com>, julia.lawall@...ia.fr
Subject: Re: [PATCH v2 2/2] Documentation: dev-tools: Enhance static analysis
section with discussion
> > +Strong points of Smatch and Coccinelle
> > +--------------------------------------
> > +
> > +Coccinelle is probably the easiest for writing checks. It works before the
> > +pre-compiler so it's easier to check for bugs in macros using Coccinelle.
> > +Coccinelle also writes patches fixes for you which no other tool does.
> > +
> > +With Coccinelle you can do a mass conversion from
>
> (Maybe start this with "For example," just to make it clear that this
> paragraph is mostly following on from how useful it is that Coccinelle
> produces fixes, not just warnings.)
I also suggested "for example", in a different place, but either is fine.
julia
>
> > +``kmalloc(x * size, GFP_KERNEL)`` to ``kmalloc_array(x, size, GFP_KERNEL)``, and
> > +that's really useful. If you just created a Smatch warning and try to push the
> > +work of converting on to the maintainers they would be annoyed. You'd have to
> > +argue about each warning if can really overflow or not.
> > +
> > +Coccinelle does no analysis of variable values, which is the strong point of
> > +Smatch. On the other hand, Coccinelle allows you to do simple things in a simple
> > +way.
> > --
> > 2.35.1
> >
>
Powered by blists - more mailing lists