From: Julia Lawall <julia@diku.dk>
To: Kees Cook <kees.cook@canonical.com>
Cc: Emese Revfy <re.emese@gmail.com>,
linux-kernel@vger.kernel.org, cocci@diku.dk
Subject: Re: [Cocci] Re: status of constification
Date: Sat, 28 May 2011 08:39:19 +0200 (CEST) [thread overview]
Message-ID: <Pine.LNX.4.64.1105280838150.30088@ask.diku.dk> (raw)
In-Reply-To: <20110528031348.GA19633@outflux.net>
On Fri, 27 May 2011, Kees Cook wrote:
> Hi Emese,
>
> I got distracted, but I'd like to get back to this thread...
>
> On Tue, Nov 09, 2010 at 10:37:41PM +0100, Emese Revfy wrote:
> > I will gladly break up my current patch for the next -rc by structure
> > type or maintainer (some preferred it one way or the other) and send
> > it in some time next week so that you can handle the upstream submission
> > process (I will continue to maintain my patch in grsecurity).
> >
> > There are many structures that can be constified, you can use the following
> > command to find most of them (use it on an allyesconfig kernel preferably):
> >
> > grep _ops System.map |grep -Ewi 'b|d' | awk '{print $3}' | \
> > while read i ; do cscope -d -L -1 $i | grep -E "struct[ \t]*([^ ]*)[ \t]*" \
> > --color=none -o | awk '{print $2}' ; done |sort -u
> >
> > Also there are always new instances of structures going in that should have
> > been constified.
>
> Just in my running kernel, I see 56 _ops structures reported from the above
> search. :)
>
> Do you have a new stack of patches I can help usher into the kernel? I
> don't want reinvent the wheel if I don't have to. :)
>
> > I tried to automate the whole process with Coccinelle but I abandoned it
> > because Coccinelle didn't support recursive header file inclusion at the time.
> > If someone feels like fixing Coccinelle then I would quickly finish my script
> > (it has a few bugs because I could never test it for real), but see the end
> > of the mail for the current version. I think it would be a good idea because
> > it would take a few hours only to generate a constification patch for a new
> > kernel. One thing that probably cannot be automated with Coccinelle is that
> > once the script determines that a given structure cannot be constified, it
> > cannot undo already emitted patches for the given structure so it must be
> > cleaned up by post processing script.
Could I see the semantic patch? The clean up issue sounds interesting.
Perhaps there is a way around it.
julia
> Has there been any update to your Coccinelle script since the addition of
> -recursive_includes?
>
> Thanks!
>
> -Kees
>
> --
> Kees Cook
> Ubuntu Security Team
> _______________________________________________
> Cocci mailing list
> Cocci@diku.dk
> http://lists.diku.dk/mailman/listinfo/cocci
> (Web access from inside DIKUs LAN only)
>
next prev parent reply other threads:[~2011-05-28 6:39 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-11-08 22:38 Kees Cook
2010-11-09 21:54 ` Emese Revfy
[not found] ` <4CD9BF25.4090306@gmail.com>
2010-11-10 6:35 ` [Cocci] " Julia Lawall
2010-11-11 21:48 ` Emese Revfy
2010-11-11 22:53 ` Julia Lawall
2010-11-13 12:13 ` Emese Revfy
2010-11-13 13:43 ` Julia Lawall
2010-11-13 14:41 ` Julia Lawall
2011-05-28 3:13 ` Kees Cook
2011-05-28 6:39 ` Julia Lawall [this message]
2011-06-05 21:47 ` [Cocci] " Emese Revfy
2011-06-06 5:03 ` Julia Lawall
2011-06-06 7:49 ` Julia Lawall
2011-06-10 21:28 ` Emese Revfy
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=Pine.LNX.4.64.1105280838150.30088@ask.diku.dk \
--to=julia@diku.dk \
--cc=cocci@diku.dk \
--cc=kees.cook@canonical.com \
--cc=linux-kernel@vger.kernel.org \
--cc=re.emese@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®