[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <54ac89f1-5f38-8909-a652-c658a5a1f36b@web.de>
Date: Thu, 18 Jun 2020 13:34:52 +0200
From: Markus Elfring <Markus.Elfring@....de>
To: Denis Efremov <efremov@...ux.com>,
Coccinelle <cocci@...teme.lip6.fr>,
Gilles Muller <Gilles.Muller@...6.fr>,
Julia Lawall <julia.lawall@...6.fr>,
Masahiro Yamada <yamada.masahiro@...ionext.com>,
Michal Marek <michal.lkml@...kovi.net>,
Nicolas Palix <nicolas.palix@...g.fr>
Cc: linux-kernel@...r.kernel.org, kernel-janitors@...r.kernel.org,
"Gustavo A. R. Silva" <garsilva@...eddedor.com>,
Kees Cook <keescook@...omium.org>
Subject: Re: [PATCH v2] coccinelle: misc: add array_size_dup script to detect
missed overflow checks
Why did you repeat a typo from the previous patch subject?
> Changes in v2:
…
> - assignment operator used
Did you add just a metavariable for this implementation detail?
…
> +expression subE1 <= as.E1;
> +expression subE2 <= as.E2;
> +expression as.E1, as.E2, E3;
How do you think about to use the following SmPL code variant?
expression subE1 <= as.E1, subE2 <= as.E2, as.E1, as.E2, E3;
> + when != \(&E1\|&E2\|&subE1\|&subE2\)
I suggest to move the ampersand before the disjunction in such
SmPL code exclusion specifications.
+ when != & \(E1 \| E2 \| subE1 \| subE2\)
> +coccilib.report.print_report(p2[0],
> +f"WARNING: array_size is already used (line {p1[0].line}) to compute \
> +the same size")
I would prefer an other code formatting at such places.
+coccilib.report.print_report(p2[0],
+ f"WARNING: array_size is already used (line {p1[0].line}) to compute the same size.")
Regards,
Markus
Powered by blists - more mailing lists