public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Kees Cook <kees@kernel.org>
To: Linus Torvalds <torvalds@linux-foundation.org>
Cc: linux-kernel@vger.kernel.org,
	Julia Lawall <julia.lawall@inria.fr>,
	Eric Biggers <ebiggers@kernel.org>
Subject: Re: [GIT PULL] kmalloc_obj treewide refactor for v7.0-rc1
Date: Sat, 21 Feb 2026 23:05:39 -0800	[thread overview]
Message-ID: <202602212257.95B8298@keescook> (raw)
In-Reply-To: <CAHk-=wh8Lc=OwB3QDssXWaEpntvYcEZH6GhmGZCewNctZo591Q@mail.gmail.com>

On Sat, Feb 21, 2026 at 08:52:55PM -0800, Linus Torvalds wrote:
> So I decided to just do this now, because it's going to cause
> unnecessary merge conflict pain if I do it at any other time.

Sounds good; thanks for doing this!

> I'm adding Julia, because for the line-wrapping case I first tried to
> use coccinelle to do it, but spatch failed on me half-way with an
> assertion failure in kernel/trace/trace_events_hist.c, which I
> couldn't figure out.
> 
> My script was probably to blame, but it boiled down to basically just
> 
>   -ALLOC(E, GFP_KERNEL)
>   +ALLOC(E)

You can break up match elements across lines, so you can drop the
", GFP_KERNEL" portion explicitly without needing to capture the rest of
the line, and since it's always the last argument, you can use "..." to
avoid needing to do any syntactic evaluation of the prior arguments. This
seems to catch the remaining:

@gfp@
identifier ALLOC = {kmalloc_obj,kmalloc_objs,kmalloc_flex,
		    kzalloc_obj,kzalloc_objs,kzalloc_flex,
		    kvmalloc_obj,kvmalloc_objs,kvmalloc_flex,
		    kvzalloc_obj,kvzalloc_objs,kvzalloc_flex};
@@

	ALLOC(...
-		, GFP_KERNEL
	)

Which results in:

 415 files changed, 612 insertions(+), 833 deletions(-)

> And yes, I verified the end result by not just building it, but also
> booting it.

I'm sorry again about the glitch. As Eric noted about it not being
in -next, it's a risk of these tree-wide refactors is their lack of
(infeasible) bake time in -next. But maybe there's a way to do it that
I didn't see that doesn't cause giant pain for merging it into -next.

I will (boot!) test the above output, and send a patch in the morning
if you don't beat me to it. :)

-Kees

-- 
Kees Cook

  reply	other threads:[~2026-02-22  7:05 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-02-21  9:18 [GIT PULL] kmalloc_obj treewide refactor for v7.0-rc1 Kees Cook
2026-02-21 19:49 ` Linus Torvalds
2026-02-21 20:16   ` Linus Torvalds
2026-02-21 22:33     ` Linus Torvalds
2026-02-21 22:43       ` Kees Cook
2026-02-21 23:01         ` Linus Torvalds
2026-02-21 23:19           ` Linus Torvalds
2026-02-21 23:19           ` Kees Cook
2026-02-22  1:08             ` Eric Biggers
2026-02-22 14:50               ` David Laight
2026-02-22 17:34                 ` Kees Cook
2026-02-23  9:19                 ` Geert Uytterhoeven
2026-02-21 22:37     ` Kees Cook
2026-02-21 22:43       ` Linus Torvalds
2026-02-21 22:46   ` Kees Cook
2026-02-22  4:52   ` Linus Torvalds
2026-02-22  7:05     ` Kees Cook [this message]
2026-02-22 10:44     ` Julia Lawall
2026-02-22 17:37       ` Kees Cook
2026-02-22 10:38   ` David Laight
2026-02-21 19:55 ` pr-tracker-bot

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=202602212257.95B8298@keescook \
    --to=kees@kernel.org \
    --cc=ebiggers@kernel.org \
    --cc=julia.lawall@inria.fr \
    --cc=linux-kernel@vger.kernel.org \
    --cc=torvalds@linux-foundation.org \
    /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