Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Tue, 1 Oct 2019 19:18:28 +0200
From: Romain Perier <romain.perier@...il.com>
To: Kees Cook <keescook@...omium.org>, kernel-hardening@...ts.openwall.com
Subject: Re: [PRE-REVIEW PATCH 11/16] treewide: Globally replace
 tasklet_init() by tasklet_setup()

On Mon, Sep 30, 2019 at 03:46:29PM -0700, Kees Cook wrote:
> On Sun, Sep 29, 2019 at 06:30:23PM +0200, Romain Perier wrote:
> > This converts all remaining cases of the old tasklet_init() API into
> > tasklet_setup(), where the callback argument is the structure already
> > holding the struct tasklet_struct. These should have no behavioral changes,
> > since they just change which pointer is passed into the callback with
> > the same available pointers after conversion. Moreover, all callbacks
> > that were not passing a pointer of structure holding the struct
> > tasklet_struct has already been converted.
> 
> Was this done mechanically with Coccinelle or manually? (If done with
> Coccinelle, please include the script in the commit log.) To land a
> treewide change like this usually you'll need to separate the mechanical
> from the manual as Linus likes to run those changes himself sometimes.

Hi,

This was done with both technics mechanically with a "buggy" Coccinelle
script, after what I have fixed building errors and mismatches (even if it's
clearly super powerful, it was my first complex cocci script). 80% of trivial
replacements were done with a Cocci script, the rest was done manually.
That's complicated to remember which one was mechanically or manually to
be honnest :=D

What I can propose is the following:

- A commit for trivial tasklet_init() -> tasklet_setup() replacements:
  it would contain basic replacements of the calls "tasklet_init() ->
  tasklet_setup()" and addition of "from_tasklet()" without any other
  changes.

- A second commit for more complicated replacements:
  It would contain replacements of functions that are in different
  modules, or modules that use function pointer for tasklet handlers
  etc... Basically everything that is not covered by the first commit

What do you think ?
Moreover, the cocci script I have used is... ugly... so I don't want to
see Linus's eyes bleed :=D

PS: I can try to recover the cocci script in my git repo by using "git
reflog". And put the cocci script in the first commit (for trivial
replacements), in the worst case...

Regards,
Romain

Download attachment "signature.asc" of type "application/pgp-signature" (834 bytes)

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.