Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Thu, 17 Nov 2016 10:36:00 +0100
From: Peter Zijlstra <>
To: "Reshetova, Elena" <>
Cc: Rik van Riel <>,
	"" <>,
	Will Deacon <>,
	Greg KH <>,
	David Windsor <>, Arnd Bergmann <>,
	Thomas Gleixner <>,
	Ingo Molnar <>,
	"Anvin, H Peter" <>,
	"" <>
Subject: Re: Re: [RFC v4 PATCH 00/13] HARDENED_ATOMIC

On Thu, Nov 17, 2016 at 09:04:44AM +0000, Reshetova, Elena wrote:
> > I have a coccinelle rule now that found about 15 usages of it. 
> >Right, so can coccinelle detect the call_rcu/free call that is
> >conditional on the dec_and_test when its hidden inside a few function
> >calls?
> Yes, it can. However, I haven't expanded the rule yet to cover cases
> when "hidden inside a few function calls" goes outside of one .c or .h
> file. Coccinelle supports that, but I have to experiment fist if it
> doesn't bring more false positives that current setup. 

Sure, I can see cross translation unit being slightly more challenging

> >Also, we should really have a "make spatch" target so that we can run
> >the thing concurrently with -j80 or somesuch, because as is
> >coccinelle is unbearably slow.
> The currents rules are very simple, the full run on the whole tree
> even without any pre-indexing, multithreading and etc. takes around 1
> min only.  

I tried to run something like (thanks to Thomas):

struct kref K;

struct kref *x;

struct kref K;

struct kref *x;

expression K;

//expression K;
//- atomic_read(&K->refcount)
//+ CHECKBAD(kref_read(K))


 spatch --in-place --sp-file kref.cocci --recursive-includes
 --include-headers -I include -I include/drm -I include/uapi
 --use-gitgrep --dir .

And that took for bloody ever, far longer than building a full bzImage.

That basically renders the thing useless in my view.

Another advantage of integrating it with make is that we get all the
right -I parameters for free.

Powered by blists - more mailing lists

Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.