Skip to contentSkip to conversation

coccinelle: api: extend memdup_user transformation with GFP_USER

PATCH Markus Elfring 3 participants 9 messages Jul 18, 2020 – Jul 19, 2020 Kernel janitors

lore
Share & tools
lore
#1 lore raw
Quoted 6 lines · Markus Elfring
Quoted 1 line

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.

Quoted 3 lines

* 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

Quoted 3 lines

Regards,
Markus

#2 lore raw
Quoted 8 lines
Quoted 6 lines
Quoted 1 line

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.

Quoted 4 lines
Quoted 2 lines

* 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?

Quoted 2 lines

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.

Quoted 1 line

and 2) stop suggesting stupid things over and over

We come along different development views.

Quoted 2 lines

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?

Quoted 1 line

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

#3 lore raw
Quoted 11 lines · Markus Elfring
Quoted 8 lines
Quoted 6 lines
Quoted 1 line

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.

Quoted 9 lines
Quoted 4 lines
Quoted 2 lines

* 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”?

Quoted 8 lines

* Will it trigger any more consequences?

Quoted 2 lines

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.

Quoted 5 lines
Quoted 3 lines

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.

Quoted 5 lines
Quoted 3 lines

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.

Quoted 7 lines

Will any more developers care also for SmPL coding style aspects?

Quoted 1 line

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

#4 lore raw
Quoted 9 lines
Quoted 7 lines
Quoted 4 lines
Quoted 2 lines

* 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?

Quoted 1 line

This is not valid syntax in the semantic patch language.

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

Quoted 1 line

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.

Quoted 1 line

not some random string of tokens.

I got further imaginations in this software area.

Will the handling of optional transformation parameters be clarified better?

Quoted 5 lines
Quoted 2 lines

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.

Quoted 1 line

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

Would software limitations hinder any more improvements then?

Quoted 6 lines
Quoted 4 lines
Quoted 2 lines

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.

Quoted 5 lines
Quoted 2 lines

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.

Quoted 2 lines

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

#5 lore raw
In reply to Julia Lawall
Quoted 1 line

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

#6 lore raw
In reply to Julia Lawall

Hi,

Quoted 9 lines · Julia Lawall

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

#7 lore raw
Quoted 10 lines · Denis Efremov

Hi,

Quoted 7 lines · Julia Lawall

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\));
Quoted 5 lines
Quoted 2 lines

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

#8 lore raw
In reply to Denis Efremov
Quoted 3 lines
Quoted 1 line

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