Re: [PATCH v2 1/4] coccinelle: api: extend memdup_user transformation with GFP_USER

From: Markus Elfring
Date: Tue Jun 09 2020 - 10:16:27 EST


â
> +++ b/scripts/coccinelle/api/memdup_user.cocci
> @@ -20,7 +20,9 @@ expression from,to,size;
â
> +- to = \(kmalloc\|kzalloc\)
> + (size,\(GFP_KERNEL\|GFP_USER\|
> + \(GFP_KERNEL\|GFP_USER\)|__GFP_NOWARN\));

I got the impression that this SmPL code needs another correction also
according to the proposed SmPL disjunction.

+-to = \( kmalloc \| kzalloc \) (size, \( GFP_KERNEL \| GFP_USER \) \( | __GFP_NOWARN \| \) );


Would you like to express by any other approach that a specific flag
is an optional source code transformation parameter?

Regards,
Markus