Re: [PATCH 2/2] Coccinelle: extend memdup_user rule with vmemdup_user()

From: Markus Elfring
Date: Mon Jun 01 2020 - 02:24:55 EST


> +@rv depends on !patch@
> +expression from,to,size;
> +position p;
> +statement S1,S2;
> +@@
> +
> +* to = \(kvmalloc@p\|kvzalloc@p\)(size,\(GFP_KERNEL\|GFP_USER\));
> + if (to==NULL || ...) S1
> + if (copy_from_user(to, from, size) != 0)
> + S2

How does the SmPL asterisk functionality fit to the operation
modes âorgâ and âreportâ?


> +@script:python depends on org && r@

I find the modification of SmPL rule dependencies also interesting.
Are these specifications really required?

Regards,
Markus