Return-Path: DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=inria.fr; s=dc; h=date:from:to:cc:subject:in-reply-to:message-id: references:mime-version; bh=hctkecbqU+WKYrq086q/v84vX7GlKwqVFrfoZacEi7k=; b=p3vRG38ENeN0ax0c5BbF3dCt5Z5k4qZO4HMbN4xtmKqVzPDJpbVO8zgg j/Tb1c4zGZeB3+gALlkY/eL0GJXkgbiaukPatp6oLaGrsvpFE7+kjRnDj 5Y7xif8MBMgw8dTIpuL4JMRMwcG5X1zX1ApiwzS7+mZduPH9M5+H358Aw s=; Date: Wed, 30 Mar 2022 10:07:49 +0200 (CEST) From: Julia Lawall Subject: Re: [PATCH v2 2/2] Documentation: dev-tools: Enhance static analysis section with discussion In-Reply-To: Message-ID: References: <11f4750c6d4c175994dfd36d1ff385f68f61bd02.1648593132.git.marcelo.schmitt1@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII To: David Gow Cc: Marcelo Schmitt , Jonathan Corbet , Mauro Carvalho Chehab , Daniel Latypov , "open list:DOCUMENTATION" , linux-sparse@vger.kernel.org, cocci@inria.fr, smatch@vger.kernel.org, Linux Kernel Mailing List , Shuah Khan , Dan Carpenter , julia.lawall@inria.fr List-ID: > > +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 > > >