mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Markus Elfring <Markus.Elfring@web.de>
To: Kees Cook <kees@kernel.org>,
	cocci@inria.fr, Julia Lawall <Julia.Lawall@inria.fr>,
	Nicolas Palix <nicolas.palix@imag.fr>
Cc: LKML <linux-kernel@vger.kernel.org>, linux-hardening@vger.kernel.org
Subject: Re: [cocci] [PATCH] coccinelle: kmalloc_obj: Remove default GFP_KERNEL arg
Date: Fri, 27 Mar 2026 12:50:42 +0100	[thread overview]
Message-ID: <e4c0b6a4-bde4-4c1f-ad56-aa05eb3229ac@web.de> (raw)
In-Reply-To: <20260320175113.work.016-kees@kernel.org>

…
> +++ b/scripts/coccinelle/api/kmalloc_objs.cocci
> @@ -122,3 +122,14 @@ fresh identifier ALLOC_OBJS = script:python(ALLOC_ARRAY) { alloc_array(ALLOC_ARR
>  -	ALLOC(struct_size_t(TYPE, FLEX, COUNT), GFP)
>  +	ALLOC_FLEX(TYPE, FLEX, COUNT, GFP)
>  )
> +
> +@drop_gfp_kernel depends on patch && !(file in "tools") && !(file in "samples")@
> +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
> +	     )

Would it become helpful to clarify the software run time characteristics any further
for the selection of mentioned identifiers?

* SmPL disjunction

* Regular expression


Regards,
Markus

      reply	other threads:[~2026-03-27 11:51 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-03-20 17:51 Kees Cook
2026-03-27 11:50 ` Markus Elfring [this message]

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=e4c0b6a4-bde4-4c1f-ad56-aa05eb3229ac@web.de \
    --to=markus.elfring@web.de \
    --cc=Julia.Lawall@inria.fr \
    --cc=cocci@inria.fr \
    --cc=kees@kernel.org \
    --cc=linux-hardening@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=nicolas.palix@imag.fr \
    /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

Powered by JetHome