kernel-janitors.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Re: [PATCH v2] coccinelle: misc: add array_size_dup script to detect missed overflow checks
@ 2020-06-18 11:34 Markus Elfring
  2020-06-18 12:24 ` Denis Efremov
  0 siblings, 1 reply; 5+ messages in thread
From: Markus Elfring @ 2020-06-18 11:34 UTC (permalink / raw)
  To: Denis Efremov, Coccinelle, Gilles Muller, Julia Lawall,
	Masahiro Yamada, Michal Marek, Nicolas Palix
  Cc: linux-kernel, kernel-janitors, Gustavo A. R. Silva, Kees Cook

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

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2020-06-19 11:15 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-06-18 11:34 [PATCH v2] coccinelle: misc: add array_size_dup script to detect missed overflow checks Markus Elfring
2020-06-18 12:24 ` Denis Efremov
2020-06-18 15:01   ` Markus Elfring
2020-06-18 15:01   ` Markus Elfring
2020-06-19 11:15   ` Coccinelle: Improving convenience for message exchange Markus Elfring

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).