2020-07-18 05:58:53

by Markus Elfring

[permalink] [raw]
Subject: Re: [v2 1/4] coccinelle: api: extend memdup_user transformation with GFP_USER

> Applied.

Do you care for patch review concerns according to this SmPL script adjustment?

* https://lore.kernel.org/cocci/[email protected]/
https://lkml.org/lkml/2020/6/9/568

* https://lore.kernel.org/cocci/[email protected]/
https://lkml.org/lkml/2020/6/8/637

Regards,
Markus


2020-07-18 06:46:30

by Julia Lawall

[permalink] [raw]
Subject: Re: [v2 1/4] coccinelle: api: extend memdup_user transformation with GFP_USER



On Sat, 18 Jul 2020, Markus Elfring wrote:

> > Applied.
>
> Do you care for patch review concerns according to this SmPL script adjustment?
>
> * https://lore.kernel.org/cocci/[email protected]/
> https://lkml.org/lkml/2020/6/9/568

This one it complete nonsense.

>
> * https://lore.kernel.org/cocci/[email protected]/
> https://lkml.org/lkml/2020/6/8/637

This on is indeed a problem. I think it was not detected in testing,
because in the current kernel the rule never applies. But Denis, in

- to = \(kmalloc\|kzalloc\)
(size,\(GFP_KERNEL\|GFP_USER\|
\(GFP_KERNEL\|GFP_USER\)|__GFP_NOWARN\));

you do indeed need to put - in front of the second and third lines as
well.

Markus, if you would limit your comments to suggesting SmPL code that is
actually correct, ie that you have tested, and 2) stop suggesting stupid
things over and over like that putting all of the virtual declarations on
the same line would save space (it does, but who cares), then I would take
your suggestions more seriously.

julia

> Regards,
> Markus
>

2020-07-18 07:10:18

by Markus Elfring

[permalink] [raw]
Subject: Re: [v2 1/4] coccinelle: api: extend memdup_user transformation with GFP_USER

>>> Applied.
>>
>> Do you care for patch review concerns according to this SmPL script adjustment?
>>
>> * https://lore.kernel.org/cocci/[email protected]/
>> https://lkml.org/lkml/2020/6/9/568
>
> This one it complete nonsense.

I hope that different views can be clarified for such a software situation
in more constructive ways.


>> * https://lore.kernel.org/cocci/[email protected]/
>> https://lkml.org/lkml/2020/6/8/637
>
> This on is indeed a problem.

I find this feedback interesting.

* How does it fit to your response “Applied”?

* Will it trigger any more consequences?


> Markus, if you would limit your comments to suggesting SmPL code
> that is actually correct, ie that you have tested,

Patch reviews contain usual risks that suggestions are presented
which can be still questionable.


> and 2) stop suggesting stupid things over and over

We come along different development views.


> like that putting all of the virtual declarations on
> the same line would save space (it does, but who cares),

It seems that you admit a possibly desirable effect.
Will any more developers care also for SmPL coding style aspects?


> then I would take your suggestions more seriously.

Your change acceptance is varying to your development mood
(and other factors), isn't it?

Regards,
Markus

2020-07-18 08:45:01

by Julia Lawall

[permalink] [raw]
Subject: Re: [v2 1/4] coccinelle: api: extend memdup_user transformation with GFP_USER



On Sat, 18 Jul 2020, Markus Elfring wrote:

> >>> Applied.
> >>
> >> Do you care for patch review concerns according to this SmPL script adjustment?
> >>
> >> * https://lore.kernel.org/cocci/[email protected]/
> >> https://lkml.org/lkml/2020/6/9/568
> >
> > This one it complete nonsense.
>
> I hope that different views can be clarified for such a software situation
> in more constructive ways.

You proposed essentially \( A \| B \) \( | C \| \)

This is not valid syntax in the semantic patch language. The branches of
a \( \| \) have to be a valid expression, statement, type, etc, not some
random string of tokens.

> >> * https://lore.kernel.org/cocci/[email protected]/
> >> https://lkml.org/lkml/2020/6/8/637
> >
> > This on is indeed a problem.
>
> I find this feedback interesting.
>
> * How does it fit to your response “Applied”?
>
> * Will it trigger any more consequences?
>
>
> > Markus, if you would limit your comments to suggesting SmPL code
> > that is actually correct, ie that you have tested,
>
> Patch reviews contain usual risks that suggestions are presented
> which can be still questionable.

These are not "usual risks". You can easily test out your suggestion by
yourself to see if it produces valid code. If it doesn't, then don't make
the suggestion.

>
>
> > and 2) stop suggesting stupid things over and over
>
> We come along different development views.

Whenever you propose the same thing say 10 times or more and it is
rejected every time, I thikn you should be able to conclude that if you
propose the same thing again it will be rejected.

>
> > like that putting all of the virtual declarations on
> > the same line would save space (it does, but who cares),
>
> It seems that you admit a possibly desirable effect.

No, I don't consider the effect to be desirable.

> Will any more developers care also for SmPL coding style aspects?
>
>
> > then I would take your suggestions more seriously.
>
> Your change acceptance is varying to your development mood
> (and other factors), isn't it?

Not really. My "change acceptance" increases when the person reporting
them raises real problems that is blocking them in some work. And it
decreases rapidly when the changes are almost all related to presumed
"efficiencies" that have no impact in practice.

julia

2020-07-18 09:17:11

by Markus Elfring

[permalink] [raw]
Subject: Re: [v2 1/4] coccinelle: api: extend memdup_user transformation with GFP_USER

>>>> * https://lore.kernel.org/cocci/[email protected]/
>>>> https://lkml.org/lkml/2020/6/9/568
>>>
>>> This one it complete nonsense.
>>
>> I hope that different views can be clarified for such a software situation
>> in more constructive ways.
>
> You proposed essentially \( A \| B \) \( | C \| \)

I suggested also another adjustment.

Can additional minus characters be avoided if such a source code search pattern
would be specified in a single line?


> This is not valid syntax in the semantic patch language.

I hope that a solution can be found by our discussion.


> The branches of a \( \| \) have to be a valid expression, statement, type, etc,

Such information can become more interesting for safe application of
SmPL disjunctions.


> not some random string of tokens.

I got further imaginations in this software area.

Will the handling of optional transformation parameters be clarified better?


>> Patch reviews contain usual risks that suggestions are presented
>> which can be still questionable.
>
> These are not "usual risks". You can easily test out your suggestion by
> yourself to see if it produces valid code.

Such an expectation can be reasonable in some cases.


> If it doesn't, then don't make the suggestion.

Would software limitations hinder any more improvements then?


>>> like that putting all of the virtual declarations on
>>> the same line would save space (it does, but who cares),
>>
>> It seems that you admit a possibly desirable effect.
>
> No, I don't consider the effect to be desirable.

I propose to take another look at variations around source code verbosity.


>> Your change acceptance is varying to your development mood
>> (and other factors), isn't it?
>
> Not really. My "change acceptance" increases when the person reporting
> them raises real problems that is blocking them in some work.

I presented open issues accordingly.


> And it decreases rapidly when the changes are almost all related to presumed
> "efficiencies" that have no impact in practice.

Change possibilities can get varying attention and corresponding development priorities.

Regards,
Markus

2020-07-18 12:16:09

by Markus Elfring

[permalink] [raw]
Subject: Re: [v2 1/4] coccinelle: api: extend memdup_user transformation with GFP_USER

> You proposed essentially \( A \| B \) \( | C \| \)

Will the software development attention grow for a topic
like “Extend support for handling of optional source code parts”?
https://github.com/coccinelle/coccinelle/issues/53

How do you think about another tiny example script for the semantic patch language?

@display@
constant A, B;
@@
*A
?| B


elfring@Sonne:~/Projekte/Coccinelle/Probe> spatch --parse-cocci optional_disjunction_test3-20200718.cocci

warning: incompatible arity found on line 4
incompatible minus and plus code starting on lines 4 and 4


Regards,
Markus

2020-07-18 13:12:12

by Denis Efremov

[permalink] [raw]
Subject: Re: [v2 1/4] coccinelle: api: extend memdup_user transformation with GFP_USER

Hi,

On 7/18/20 9:45 AM, Julia Lawall wrote:
> This on is indeed a problem. I think it was not detected in testing,
> because in the current kernel the rule never applies. But Denis, in
>
> - to = \(kmalloc\|kzalloc\)
> (size,\(GFP_KERNEL\|GFP_USER\|
> \(GFP_KERNEL\|GFP_USER\)|__GFP_NOWARN\));
>
> you do indeed need to put - in front of the second and third lines as
> well.

Thanks, Markus, Julia. I will send v3. Julia, is it ok with you, if I will
drop the last patch with "selfcheck" this time?

Regards,
Denis

2020-07-18 13:33:20

by Julia Lawall

[permalink] [raw]
Subject: Re: [v2 1/4] coccinelle: api: extend memdup_user transformation with GFP_USER



On Sat, 18 Jul 2020, Denis Efremov wrote:

> Hi,
>
> On 7/18/20 9:45 AM, Julia Lawall wrote:
> > This on is indeed a problem. I think it was not detected in testing,
> > because in the current kernel the rule never applies. But Denis, in
> >
> > - to = \(kmalloc\|kzalloc\)
> > (size,\(GFP_KERNEL\|GFP_USER\|
> > \(GFP_KERNEL\|GFP_USER\)|__GFP_NOWARN\));
> >
> > you do indeed need to put - in front of the second and third lines as
> > well.
>
> Thanks, Markus, Julia. I will send v3. Julia, is it ok with you, if I will
> drop the last patch with "selfcheck" this time?

That would be perfect, thanks.

julia

2020-07-19 08:41:14

by Markus Elfring

[permalink] [raw]
Subject: Re: [v2 1/4] coccinelle: api: extend memdup_user transformation with GFP_USER

>> you do indeed need to put - in front of the second and third lines as well.
>
> Thanks, Markus, Julia. I will send v3.

How do you think about to discuss any remaining open issues already
on the current software development version for your transformation approach?

Regards,
Markus