Re: [2/2] Coccinelle: memdup_user: Extending data processing for special tokens

From: Markus Elfring
Date: Mon Jun 01 2020 - 01:48:22 EST


> Unfortunately, the Coccinelle software does not like the following
> SmPL code variant so far.
>
> to =
> (
> - \( kmalloc \| kzalloc \)
> + memdup_user
> |
> - \( kvmalloc \| kvzalloc \)
> + vmemdup_user
> )
> (
> - size, \( GFP_KERNEL \| GFP_USER \)
> + from, size
> );
>
>
> Message:
> 25: no available token to attach to

I have adjusted a bit of OCaml source code.
Thus I could see where such information was provided.
https://github.com/coccinelle/coccinelle/blob/7cf2c23e64066d5249a64a316cc5347831f7a63f/parsing_cocci/insert_plus.ml#L1041

â
| (((infop,count,pcode) as p) :: ps) as all ->
(* â
modifications. for the moment, we thus give an error, asking the
user to rewrite the semantic patch. *)
if greater_than_end infop infom1 || is_minus m1 || !empty_isos
â


Will the referenced comment get any more software development attention?

Regards,
Markus