[Cocci] Help in interpreting results

2016-11-15 Thread Reshetova, Elena
Good day, I am very new to coccinelle, and therefore my question is rather basic, but unfortunately I wasn't able to find the info online. I have a very simple cocci rule: -- @r exists@ identifier a; identifier x; position p1, p2; @@ atomic_dec_and_test(&a->x)@p1 ..

Re: [Cocci] Help in interpreting results

2016-11-15 Thread Reshetova, Elena
>On Tue, 15 Nov 2016, Reshetova, Elena wrote: > > > Good day, > >   > > I am very new to coccinelle, and therefore my question is rather > basic, but unfortunately I wasn’t able to find the info online. > > I have a very simple cocci rule: > >   > >

Re: [Cocci] Help in interpreting results

2016-11-16 Thread Reshetova, Elena
>You may want to run coccinelle/scripts/idutils_index.sh in your code base. >Then if you use the argument --use-idutils it will select the relevant files >up front from the index and be even more >efficient. Skipping means that it >essentialy did a grep and didn't find anything. If the argument

Re: [Cocci] Help in interpreting results

2016-11-16 Thread Reshetova, Elena
> >You may want to run coccinelle/scripts/idutils_index.sh in your code base. > >Then if you use the argument --use-idutils it will select the relevant files > >up front from the index and be even more >efficient. Skipping means that it > >essentialy did a grep and didn't find anything. If the

Re: [Cocci] Help in interpreting results

2016-11-16 Thread Reshetova, Elena
> >You may want to run coccinelle/scripts/idutils_index.sh in your code base. > >Then if you use the argument --use-idutils it will select the relevant files > >up front from the index and be even more >efficient. Skipping means that it > >essentialy did a grep and didn't find anything. If the

Re: [Cocci] [PATCH] Coccinelle report script for refcounters

2017-07-18 Thread Reshetova, Elena
> On Tue, 18 Jul 2017, Elena Reshetova wrote: > > > The below script can be used to detect potential misusage > > of atomic_t type and API for reference counting purposes. > > Now when we have a dedicated refcount_t type and API with > > security protection implemented, people should be using it >

Re: [Cocci] [PATCH] Coccinelle report script for refcounters

2017-07-18 Thread Reshetova, Elena
> On Tue, 18 Jul 2017, Reshetova, Elena wrote: > > > > On Tue, 18 Jul 2017, Elena Reshetova wrote: > > > > > > > The below script can be used to detect potential misusage > > > > of atomic_t type and API for reference counting purposes. > > &g

Re: [Cocci] [PATCH] Coccinelle: add atomic_as_refcounter script

2017-07-19 Thread Reshetova, Elena
On Tue, Jul 18, 2017 at 12:48 AM, Elena Reshetova > wrote: > > atomic_as_refcounter.cocci script allows detecting > > cases when refcount_t type and API should be used > > instead of atomic_t. > > > > Signed-off-by: Elena Reshetova > > --- > > scripts/coccinelle/api/atomic_as_refcounter.cocci |

Re: [Cocci] [PATCH] Coccinelle: add atomic_as_refcounter script

2017-08-07 Thread Reshetova, Elena
> On Tue, 18 Jul 2017, Elena Reshetova wrote: > > > atomic_as_refcounter.cocci script allows detecting > > cases when refcount_t type and API should be used > > instead of atomic_t. > > > > Signed-off-by: Elena Reshetova > > --- > > scripts/coccinelle/api/atomic_as_refcounter.cocci | 102 > +

Re: [Cocci] [PATCH] Coccinelle: add atomic_as_refcounter script

2017-08-15 Thread Reshetova, Elena
> On Mon, 14 Aug 2017, Elena Reshetova wrote: > > > atomic_as_refcounter.cocci script allows detecting > > cases when refcount_t type and API should be used > > instead of atomic_t. > > > > Signed-off-by: Elena Reshetova > > --- > > scripts/coccinelle/api/atomic_as_refcounter.cocci | 148 > +

Re: [Cocci] Coccinelle: add atomic_as_refcounter script

2017-08-17 Thread Reshetova, Elena
> Dear Elena, Hi Markus! > > Why do you insist to use the variables “fname2” till “fname6” in > this evolving SmPL script (instead of merging them into a single one > with a special constraint)? I am pretty new to Coccinelle and Julia has recommended against this approach, so I was merely fol

Re: [Cocci] [PATCH v3] provide rule for finding refcounters

2017-08-29 Thread Reshetova, Elena
Hi, I am very sorry for the delayed reply. Finally unrigging my inbox :( > A few more small issues: > > When you deleted the disjunction, you kept the surrounding parentheses. > you can drop them (lines 83 and 85). > > I guess that the "del" regular expression is supposed to be matching > delete

Re: [Cocci] [PATCH] Coccinelle: add atomic_as_refcounter script

2017-08-29 Thread Reshetova, Elena
> > +identifier fname =~ ".*free.*"; > > +identifier fname2 =~ ".*destroy.*"; > > +identifier fname3 =~ ".*del.*"; > > +identifier fname4 =~ ".*queue_work.*"; > > +identifier fname5 =~ ".*schedule_work.*"; > > +identifier fname6 =~ ".*call_rcu.*"; > > Personally, I find the above regular expressi

Re: [Cocci] [PATCH v3] provide rule for finding refcounters

2017-08-29 Thread Reshetova, Elena
> On Tue, 29 Aug 2017, Reshetova, Elena wrote: > > > Hi, I am very sorry for the delayed reply. Finally unrigging my inbox :( > > > > > A few more small issues: > > > > > > When you deleted the disjunction, you kept the surrounding parenthe

Re: [Cocci] [PATCH] Coccinelle: add atomic_as_refcounter script

2017-08-30 Thread Reshetova, Elena
> > On Wed, 30 Aug 2017, Elena Reshetova wrote: > > > atomic_as_refcounter.cocci script allows detecting > > cases when refcount_t type and API should be used > > instead of atomic_t. > > > > Signed-off-by: Elena Reshetova > > Acked-by: Julia Lawall Thank you very much Julia! What is the cor

Re: [Cocci] [PATCH] Coccinelle: add atomic_as_refcounter script

2017-08-31 Thread Reshetova, Elena
> On Wed, 30 Aug 2017, Reshetova, Elena wrote: > > > > > > > > > On Wed, 30 Aug 2017, Elena Reshetova wrote: > > > > > > > atomic_as_refcounter.cocci script allows detecting > > > > cases when refcount_t type and API should be used &g