mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Julia Lawall <julia.lawall@inria.fr>
To: Denis Efremov <efremov@linux.com>
Cc: cocci@systeme.lip6.fr, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] coccinelle: api: kfree_sensitive: print memset position
Date: Sat, 10 Oct 2020 21:27:21 +0200 (CEST)	[thread overview]
Message-ID: <alpine.DEB.2.22.394.2010102127100.2691@hadrien> (raw)
In-Reply-To: <20201009125453.31217-1-efremov@linux.com>



On Fri, 9 Oct 2020, Denis Efremov wrote:

> Print memset() call position in addition to the kfree() position to
> ease issues identification.
>
> Signed-off-by: Denis Efremov <efremov@linux.com>

Applied, thanks.

julia

> ---
>  scripts/coccinelle/api/kfree_sensitive.cocci | 10 ++++++----
>  1 file changed, 6 insertions(+), 4 deletions(-)
>
> diff --git a/scripts/coccinelle/api/kfree_sensitive.cocci b/scripts/coccinelle/api/kfree_sensitive.cocci
> index e4a066a0b77d..8d980ebf3223 100644
> --- a/scripts/coccinelle/api/kfree_sensitive.cocci
> +++ b/scripts/coccinelle/api/kfree_sensitive.cocci
> @@ -85,14 +85,16 @@ type T;
>
>  @script:python depends on report@
>  p << r.p;
> +m << r.m;
>  @@
>
> -coccilib.report.print_report(p[0],
> -  "WARNING: opportunity for kfree_sensitive/kvfree_sensitive")
> +msg = "WARNING opportunity for kfree_sensitive/kvfree_sensitive (memset at line %s)"
> +coccilib.report.print_report(p[0], msg % (m[0].line))
>
>  @script:python depends on org@
>  p << r.p;
> +m << r.m;
>  @@
>
> -coccilib.org.print_todo(p[0],
> -  "WARNING: opportunity for kfree_sensitive/kvfree_sensitive")
> +msg = "WARNING opportunity for kfree_sensitive/kvfree_sensitive (memset at line %s)"
> +coccilib.org.print_todo(p[0], msg % (m[0].line))
> --
> 2.26.2
>
>

      reply	other threads:[~2020-10-10 23:11 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-10-09 12:54 Denis Efremov
2020-10-10 19:27 ` Julia Lawall [this message]

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.2010102127100.2691@hadrien \
    --to=julia.lawall@inria.fr \
    --cc=cocci@systeme.lip6.fr \
    --cc=efremov@linux.com \
    --cc=linux-kernel@vger.kernel.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

all inboxes | Powered by JetHome®