Hi Tim,

On Fri, Mar 11, 2022 at 09:15:48PM +0100, Tim Düsterhus wrote:
> Yeah, I've attempted to look into the Coccinelle patches in the Linux kernel
> sources, but I agree that many of those are very complex :-)
> 
> Do you happen to know where we could ask for assistance with making the
> necessary adjustments to the patches?

Not really. I'm seeing that the doc on the site was updated less than a
year ago, I should probably re-read it (I had only seen a very old one
with a bunch of examples and too few tips):

     https://coccinelle.gitlabpages.inria.fr/website/

There's also a mailing list (cocci at inria.fr) which is quite active,
but it looks like Julia is very responsive on it and I don't want to
bother her with end-user questions when she likely has more important
things to spend her time on.

> Or perhaps you could ask and include
> me in Cc, at least people already know you. I'll be happy to further improve
> the existing Coccinelle patches and to further 'ist'ify the codebase, but
> would need some handholding to get me started.

Note that beyond changing code, one thing that would be extremely useful
would be to build up a collection of patches to detect certain classes of
bugs. I wrote some scripts that used to match improbable expressions like:

    unlikely(E) < 0

But I can't figure how to make them match anymore, or they match too much
thus for me the behavior has always been a bit random and I never know if
I can trust the absence of a match.

Overall this is still a fantastic tool but it requires a significant and
sustained investment to really unleash its power. Unfortunately in a small
project like haproxy most often it takes less time to perform a few changes
by hand than to try to figure a reliable way to express what we want.

Willy

Reply via email to