From: Julia Lawall <julia.lawall@inria.fr>
To: Denis Efremov <efremov@linux.com>
Cc: Kees Cook <keescook@chromium.org>,
cocci@systeme.lip6.fr, linux-kernel@vger.kernel.org
Subject: Re: [Cocci] [PATCH v3] coccinelle: misc: add array_size_dup script to detect missed overflow checks
Date: Mon, 22 Jun 2020 14:19:06 +0200 (CEST) [thread overview]
Message-ID: <alpine.DEB.2.22.394.2006221418110.2531@hadrien> (raw)
In-Reply-To: <e57c419b-a64a-55a1-be7a-8f45edaea3bf@linux.com>
On Mon, 22 Jun 2020, Denis Efremov wrote:
> What do you think about removing duplicates warning from the rule?
>
> I mean this kind of warnings: "WARNING: same array_size (line {p1[0].line})"
>
> As for now, I think it's better to not disturb developers with this kind
> of things.
I agree. I guess there is a small overhead for the test, but if the code
is not performance critical, being simpler is probably better.
julia
>
> Thanks,
> Denis
>
> >> +@as_dup@
> >> +expression subE1 <= as.E1;
> >> +expression subE2 <= as.E2;
> >> +expression as.E1, as.E2, E3;
> >> +assignment operator aop;
> >> +position p1, p2;
> >> +@@
> >> +
> >> +* array_size(E1, E2)@p1
> >> + ... when != \(E1\|E2\|subE1\|subE2\) aop E3
> >> + when != &\(E1\|E2\|subE1\|subE2\)
> >> +* array_size(E1, E2)@p2
> >> +
> >> +@script:python depends on report@
> >> +p1 << as_dup.p1;
> >> +p2 << as_dup.p2;
> >> +@@
> >> +
> >> +coccilib.report.print_report(p2[0],
> >> +f"WARNING: same array_size (line {p1[0].line})")
> >> +
> >> +@script:python depends on org@
> >> +p1 << as_dup.p1;
> >> +p2 << as_dup.p2;
> >> +@@
> >> +
> >> +coccilib.org.print_todo(p2[0],
> >> +f"WARNING: same array_size (line {p1[0].line})")
> >> +
>
>
next prev parent reply other threads:[~2020-06-22 12:19 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-06-15 10:20 [PATCH] coccinelle: misc: add array_size_dup script to detect missed overlow checks Denis Efremov
2020-06-15 18:23 ` Kees Cook
2020-06-15 18:35 ` Denis Efremov
2020-06-15 18:46 ` [Cocci] " Gustavo A. R. Silva
2020-06-17 9:32 ` Denis Efremov
2020-06-17 10:55 ` Denis Efremov
2020-06-17 20:08 ` Julia Lawall
2020-06-17 20:15 ` Julia Lawall
2020-06-17 18:15 ` Kees Cook
2020-06-17 18:54 ` [Cocci] " Julia Lawall
2020-06-18 19:52 ` Kees Cook
2020-06-18 19:56 ` Julia Lawall
2020-06-18 20:48 ` Kees Cook
2020-06-18 21:08 ` Julia Lawall
2020-06-17 20:30 ` Julia Lawall
2020-06-17 20:50 ` Denis Efremov
2020-06-17 20:52 ` Julia Lawall
2020-06-18 10:23 ` [PATCH v2] " Denis Efremov
2020-06-19 13:13 ` [PATCH v3] coccinelle: misc: add array_size_dup script to detect missed overflow checks Denis Efremov
2020-06-21 20:53 ` [Cocci] " Julia Lawall
2020-06-21 20:56 ` Julia Lawall
2020-06-22 12:12 ` Denis Efremov
2020-06-22 12:16 ` Denis Efremov
2020-06-22 12:19 ` Julia Lawall [this message]
2020-06-22 22:10 ` [PATCH v4] " Denis Efremov
2020-06-24 19:42 ` 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.2006221418110.2531@hadrien \
--to=julia.lawall@inria.fr \
--cc=cocci@systeme.lip6.fr \
--cc=efremov@linux.com \
--cc=keescook@chromium.org \
--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
Powered by JetHome