kernel-janitors.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Re: [PATCH] coccinelle: misc: add array_size_dup script to detect missed overflow checks
@ 2020-06-15 12:25 Markus Elfring
  0 siblings, 0 replies; only message in thread
From: Markus Elfring @ 2020-06-15 12:25 UTC (permalink / raw)
  To: Denis Efremov, Coccinelle, Gilles Muller, Julia Lawall,
	Masahiro Yamada, Michal Marek, Nicolas Palix
  Cc: kernel-janitors, linux-kernel, Kees Cook

I suggest to avoid a typo in the previous patch subject.


…
> +virtual context
> +virtual report
> +virtual org

+virtual context, report, org

Is such a SmPL code variant more succinct?


…
> +@as_next@
> +expression subE1 <= as.E1;
> +expression as.E1;
…

I propose to reduce the repetition of this SmPL key word.


…
> +  ... when != \(E1\|E2\|subE1\|subE2\)=E3
> +      when != \(E1\|E2\|subE1\|subE2\)+=E3
…

Can it make sense to express a constraint for a metavariable of
the type “assignment operator”?


> +      when != \(&E1\|&E2\|&subE1\|&subE2\)

How do you think about to use the following code exclusion specification?

+      when != & \(E1 \| E2 \| subE1 \| subE2\)


…
> +msg = "WARNING: same struct_size (line %s)" % (p1[0].line)
> +coccilib.org.print_todo(p2[0], msg)

I suggest once more to pass the desired message object directly as a function argument
(without using an extra Python variable).

Regards,
Markus

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2020-06-15 12:25 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-06-15 12:25 [PATCH] coccinelle: misc: add array_size_dup script to detect missed overflow checks 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).