Kernel-hardening archive on lore.kernel.org
 help / color / Atom feed
From: Romain Perier <romain.perier@gmail.com>
To: Kees Cook <keescook@chromium.org>, kernel-hardening@lists.openwall.com
Subject: Re: [PRE-REVIEW PATCH 11/16] treewide: Globally replace tasklet_init() by tasklet_setup()
Date: Tue, 1 Oct 2019 19:18:28 +0200
Message-ID: <20191001171828.GB2748@debby.home> (raw)
In-Reply-To: <201909301545.913F7805AB@keescook>

[-- Attachment #1: Type: text/plain, Size: 2179 bytes --]

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

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

  reply index

Thread overview: 32+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-09-29 16:30 [PRE-REVIEW PATCH 00/16] Modernize the tasklet API Romain Perier
2019-09-29 16:30 ` [PRE-REVIEW PATCH 01/16] tasklet: Prepare to change tasklet callback argument type Romain Perier
2019-09-29 16:30 ` [PRE-REVIEW PATCH 02/16] crypto: ccp - Prepare to use the new tasklet API Romain Perier
2019-09-30 22:35   ` Kees Cook
2019-09-29 16:30 ` [PRE-REVIEW PATCH 03/16] mmc: renesas_sdhi: " Romain Perier
2019-09-29 16:30 ` [PRE-REVIEW PATCH 04/16] net: liquidio: " Romain Perier
2019-09-29 16:30 ` [PRE-REVIEW PATCH 05/16] chelsio: " Romain Perier
2019-09-29 16:30 ` [PRE-REVIEW PATCH 06/16] net: mvpp2: " Romain Perier
2019-09-29 16:30 ` [PRE-REVIEW PATCH 07/16] qed: " Romain Perier
2019-09-29 16:30 ` [PRE-REVIEW PATCH 08/16] isdn: " Romain Perier
2019-09-29 16:30 ` [PRE-REVIEW PATCH 09/16] scsi: pm8001: " Romain Perier
2019-09-29 16:30 ` [PRE-REVIEW PATCH 10/16] scsi: pmcraid: " Romain Perier
2019-09-29 16:30 ` [PRE-REVIEW PATCH 11/16] treewide: Globally replace tasklet_init() by tasklet_setup() Romain Perier
2019-09-30 22:46   ` Kees Cook
2019-10-01 17:18     ` Romain Perier [this message]
2019-10-10 22:30       ` Kees Cook
2019-09-29 16:30 ` [PRE-REVIEW PATCH 12/16] tasklet: Pass tasklet_struct pointer as .data in DECLARE_TASKLET Romain Perier
2019-09-30 22:44   ` Kees Cook
2019-09-29 16:30 ` [PRE-REVIEW PATCH 13/16] tasklet: Pass tasklet_struct pointer to callbacks unconditionally Romain Perier
2019-09-30 22:49   ` Kees Cook
2019-09-29 16:30 ` [PRE-REVIEW PATCH 14/16] tasklet: Remove the data argument from DECLARE_TASKLET() macros Romain Perier
2019-09-30 22:50   ` Kees Cook
2019-09-29 16:30 ` [PRE-REVIEW PATCH 15/16] tasklet: convert callbacks prototype for using struct tasklet_struct * arguments Romain Perier
2019-09-29 16:30 ` [PRE-REVIEW PATCH 16/16] tasklet: Add the new initialization function permanently Romain Perier
2019-09-30 22:52   ` Kees Cook
2019-10-01 17:34     ` Romain Perier
2019-09-30 23:06 ` [PRE-REVIEW PATCH 00/16] Modernize the tasklet API Kees Cook
2019-10-01 17:47   ` Romain Perier
2019-10-10 22:34     ` Kees Cook
2019-10-30  8:20       ` Allen
2019-11-07  7:29         ` Romain Perier
2019-11-07 21:22           ` Kees Cook

Reply instructions:

You may reply publically 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=20191001171828.GB2748@debby.home \
    --to=romain.perier@gmail.com \
    --cc=keescook@chromium.org \
    --cc=kernel-hardening@lists.openwall.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

Kernel-hardening archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/kernel-hardening/0 kernel-hardening/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 kernel-hardening kernel-hardening/ https://lore.kernel.org/kernel-hardening \
		kernel-hardening@lists.openwall.com
	public-inbox-index kernel-hardening

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/com.openwall.lists.kernel-hardening


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git