cocci.inria.fr archive mirror
 help / color / mirror / Atom feed
From: Julia Lawall <julia.lawall@inria.fr>
To: Kees Cook <keescook@chromium.org>
Cc: cocci@inria.fr, linux-hardening@vger.kernle.org,
	 "Gustavo A. R. Silva" <gustavoars@kernel.org>
Subject: Re: [cocci] spatch --jobs N missing matches?
Date: Tue, 27 Sep 2022 22:37:07 +0200 (CEST)	[thread overview]
Message-ID: <alpine.DEB.2.22.394.2209272235060.2842@hadrien> (raw)
In-Reply-To: <202209261505.9AE38B8@keescook>



On Mon, 26 Sep 2022, Kees Cook wrote:

> On Mon, Sep 26, 2022 at 11:14:55PM +0200, Julia Lawall wrote:
> > I likewise see the following puzzling behavior:
>
> Okay, that's a relief -- I'm usually holding it wrong. :P
>
> > [...]
> > So it worked when I tried only one .c file, but not when I tried the whole
> > directory.  When I put some tracing (--debug --show-trying) it seems to be
> > considering only the .c file in the full directory case, not the header
> > file.  I will look into it.
>
> Thank you! If you end up with patches, I'm happy to try them out. I've
> got a fresh build of the latest cocci git tree building, so I can easily
> test changes.

The problem is fixed in github.  Coccinelle was doing some caching of
header files, that was not desirable in the case where one actually wants
to match the code, and not just get type information.

The change may affect any semantic patch that uses --recursive-includes.

julia

>
> > In the short term, you could try using the option --selected-only to get a
> > list of files considered to be relevant, and then run Coccinelle on each
> > of them individually.
>
> Ah-ha! I hadn't noticed --selected-only, that's nicer than my
> sorta-by-hand version of just using "git grep memcpy | filter...", but
> yes, that's what I ran a while ago. I see it just finished after two
> hours. :) But it found (what I hope is) the full set!
>
> --- ./drivers/net/ethernet/mellanox/mlxsw/core_acl_flex_actions.c
> --- ./drivers/net/wireless/intel/iwlwifi/iwl-dbg-tlv.c
> --- ./drivers/platform/surface/surface_acpi_notify.c
> --- ./drivers/s390/net/qeth_l2_main.c
> --- ./drivers/w1/w1_netlink.c
> --- ./fs/dlm/requestqueue.c
> --- ./net/sched/cls_u32.c
> --- ./net/wireless/nl80211.c
>
> real    111m15.762s
>
> Thanks for taking a look at this!
>
> --
> Kees Cook
>

  reply	other threads:[~2022-09-27 20:37 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-09-26 18:52 [cocci] spatch --jobs N missing matches? Kees Cook
2022-09-26 21:14 ` Julia Lawall
2022-09-26 22:09   ` Kees Cook
2022-09-27 20:37     ` Julia Lawall [this message]
2022-09-27 21:09       ` Julia Lawall
2022-09-28  0:06         ` Kees Cook
2022-09-28  5:23           ` 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.2209272235060.2842@hadrien \
    --to=julia.lawall@inria.fr \
    --cc=cocci@inria.fr \
    --cc=gustavoars@kernel.org \
    --cc=keescook@chromium.org \
    --cc=linux-hardening@vger.kernle.org \
    /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;
as well as URLs for NNTP newsgroup(s).