All of lore.kernel.org
 help / color / mirror / Atom feed
From: Julia Lawall <julia.lawall@inria.fr>
To: Denis Efremov <efremov@linux.com>
Cc: cocci@systeme.lip6.fr
Subject: Re: [Cocci] Backward compatibility issue
Date: Fri, 12 Feb 2021 15:04:56 +0100 (CET)	[thread overview]
Message-ID: <alpine.DEB.2.22.394.2102121504100.9350@hadrien> (raw)
In-Reply-To: <0c2a01f3-e48b-fc67-78b4-f061026aec42@linux.com>



On Thu, 11 Feb 2021, Denis Efremov wrote:

> Hi, one of my patterns started to fail tests on latest coccinelle.
> I've bisected the commit that introduces "error". It's:
> commit db60e916633d2cb3ae31140364783fdf85ed10f4
> "make information about SmPL iterator and declarer names available to the C parser"
>
> To reproduce the error:
> $ cd linux
> $ git checkout 5b01014759991887b1e450c9def01e58c02ab81b
> $ wget https://raw.githubusercontent.com/evdenis/cvehound/master/cvehound/cve/CVE-2016-9793.cocci
> $ spatch -D detect --cocci-file CVE-2016-9793.cocci net/core/sock.c
> # spatch before db60e916633d2cb3ae31140364783fdf85ed10f4 will find the match
> net/core/sock.c:718:16-17: ERROR: CVE-2016-9793
> net/core/sock.c:754:16-17: ERROR: CVE-2016-9793
> ...
> # spatch >= db60e916633d2cb3ae31140364783fdf85ed10f4 will not match the same code

If you change typedef u32 to symbol u32, it should be good.  It is no use
to Coccinelle to know that u32 is a typedef in this code.

julia


>
> Thanks,
> Denis
> _______________________________________________
> Cocci mailing list
> Cocci@systeme.lip6.fr
> https://systeme.lip6.fr/mailman/listinfo/cocci
>
_______________________________________________
Cocci mailing list
Cocci@systeme.lip6.fr
https://systeme.lip6.fr/mailman/listinfo/cocci

  parent reply	other threads:[~2021-02-12 14:05 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-02-11 12:09 [Cocci] Backward compatibility issue Denis Efremov
2021-02-11 13:46 ` Julia Lawall
2021-02-12 14:04 ` Julia Lawall [this message]
2021-02-12 20:18   ` Denis Efremov
2021-02-13  7:46     ` Julia Lawall

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=alpine.DEB.2.22.394.2102121504100.9350@hadrien \
    --to=julia.lawall@inria.fr \
    --cc=cocci@systeme.lip6.fr \
    --cc=efremov@linux.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.