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

* Re: [PATCH v2] coccinelle: misc: add array_size_dup script to detect missed overflow checks
  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
                     ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: Denis Efremov @ 2020-06-18 12:24 UTC (permalink / raw)
  To: Markus Elfring, Coccinelle, Gilles Muller, Julia Lawall,
	Masahiro Yamada, Michal Marek, Nicolas Palix
  Cc: kernel-janitors, linux-kernel, Kees Cook

Hi,

On 6/18/20 2:34 PM, Markus Elfring wrote:
> Why did you repeat a typo from the previous patch subject?

Where is the typo? I can't handle your suggestions because your mails constantly
break the threads. I just can't find them after due to missed/wrong In-Reply-To
headers. Again, this mail doesn't contain In-Reply-To header and highly likely I
will miss it when I will prepare next version of the patch.


>> +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;

It's less readable and harder to review.

> 
>> +      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\)

Ok, I will fix this if there will be next version.

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

No. It's pointless to break the line to save 5 chars this way.

I can use instead:

coccilib.report.print_report(p2[0], f"WARNING: array_size is already used (line {p1[0].line}) to compute the same size")

or

msg = f"WARNING: array_size is already used (line {p1[0].line}) to compute the same size"
coccilib.report.print_report(p2[0], msg)

or

coccilib.report.print_report(p2[0],
f"WARNING: array_size is already used (line {p1[0].line}) to compute the same size")

And I prefer the last one if Julia will allow me to use more than 80 chars in print string.

Thanks,
Denis

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

* Re: [PATCH v2] coccinelle: misc: add array_size_dup script to detect missed overflow checks
  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
  2 siblings, 0 replies; 5+ messages in thread
From: Markus Elfring @ 2020-06-18 15:01 UTC (permalink / raw)
  To: Denis Efremov, Coccinelle
  Cc: Gilles Muller, Julia Lawall, Masahiro Yamada, Michal Marek,
	Nicolas Palix, linux-kernel, kernel-janitors,
	Gustavo A. R. Silva, Kees Cook

> Where is the typo?

I tried to point a possible replacement out for the word “overlow” by “overflow”.


> I can't handle your suggestions

I hope that you got chances to take also my patch review comments into account.


> because your mails constantly break the threads. I just can't find them
> after due to missed/wrong In-Reply-To headers.

There are some factors involved for this undesirable effect.

* My software selection contains open issues in the handling of mail links
  according to the communication interface “public inbox”.

* Mailing list settings hinder more direct participation (for me).

* If you would specify more mail addresses for reviewers (like me) explicitly
  as recipients, the impression can hopefully become more positive again.


>>> +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;
>
> It's less readable and harder to review.

Can a different code formatting help then?

expression subE1 <= as.E1, subE2 <= as.E2,
           as.E1, as.E2, E3;


>> I suggest to move the ampersand before the disjunction in such
>> SmPL code exclusion specifications.
>>
>> +      when != & \(E1 \| E2 \| subE1 \| subE2\)
>
> Ok, I will fix this if there will be next version.

Other software extensions which you proposed recently were similarly affected
at a few places.


>> 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.")
>
> No. It's pointless to break the line to save 5 chars this way.

Did we get used to function parameter alignment?
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/Documentation/process/coding-style.rst?id=1b5044021070efa3259f3e9548dc35d1eb6aa844#n93

I suggest to reconsider potential concerns for line length limitations
according to such message strings.

Regards,
Markus

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

* Re: [PATCH v2] coccinelle: misc: add array_size_dup script to detect missed overflow checks
  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
  2 siblings, 0 replies; 5+ messages in thread
From: Markus Elfring @ 2020-06-18 15:01 UTC (permalink / raw)
  To: Denis Efremov, Coccinelle
  Cc: Gilles Muller, Julia Lawall, Masahiro Yamada, Michal Marek,
	Nicolas Palix, linux-kernel, kernel-janitors,
	Gustavo A. R. Silva, Kees Cook

> Where is the typo?

I tried to point a possible replacement out for the word “overlow” by “overflow”.


> I can't handle your suggestions

I hope that you got chances to take also my patch review comments into account.


> because your mails constantly break the threads. I just can't find them
> after due to missed/wrong In-Reply-To headers.

There are some factors involved for this undesirable effect.

* My software selection contains open issues in the handling of mail links
  according to the communication interface “public inbox”.

* Mailing list settings hinder more direct participation (for me).

* If you would specify more mail addresses for reviewers (like me) explicitly
  as recipients, the impression can hopefully become more positive again.


>>> +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;
>
> It's less readable and harder to review.

Can a different code formatting help then?

expression subE1 <= as.E1, subE2 <= as.E2,
           as.E1, as.E2, E3;


>> I suggest to move the ampersand before the disjunction in such
>> SmPL code exclusion specifications.
>>
>> +      when != & \(E1 \| E2 \| subE1 \| subE2\)
>
> Ok, I will fix this if there will be next version.

Other software extensions which you proposed recently were similarly affected
at a few places.


>> 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.")
>
> No. It's pointless to break the line to save 5 chars this way.

Did we get used to function parameter alignment?
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/Documentation/process/coding-style.rst?id=1b5044021070efa3259f3e9548dc35d1eb6aa844#n93

I suggest to reconsider potential concerns for line length limitations
according to such message strings.

Regards,
Markus

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

* Re: Coccinelle: Improving convenience for message exchange
  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   ` Markus Elfring
  2 siblings, 0 replies; 5+ messages in thread
From: Markus Elfring @ 2020-06-19 11:15 UTC (permalink / raw)
  To: Denis Efremov, Coccinelle
  Cc: Gilles Muller, Julia Lawall, Masahiro Yamada, Michal Marek,
	Nicolas Palix, linux-kernel, kernel-janitors,
	Gustavo A. R. Silva, Kees Cook

> I can't handle your suggestions

I hope that you can work with provided information to some degree.


> because your mails constantly break the threads.

Would you like to take another look at reasons for such an effect?


> I just can't find them

Please try again.
Were relevant data stored in usable message folders?

https://systeme.lip6.fr/pipermail/cocci/2020-June/thread.html
https://lore.kernel.org/cocci/


> after due to missed/wrong In-Reply-To headers.

How do you think about to influence the situation in ways
which can improve the desired data processing considerably?

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