Re: [Cocci] [PATCH 00/17] parsing_cocci: Add attributefn to the SmPL AST visitor
On Thu, 16 Jul 2020, Jaskaran Singh wrote: > This patch series aims to add a public function for visiting attributes > to the SmPL AST visitor. This is needed to support meta attributes. Applied. Thanks. > > Jaskaran Singh (17): > parsing_cocci: visitor_ast: Add attributefn to SmPL AST visitor > parsing_cocci: parse_cocci: Reflect attributefn in AST visitor > parsing_cocci: cleanup_rules: Reflect attributefn in AST visitor > parsing_cocci: disjdistr: Reflect attributefn in AST visitor > parsing_cocci: free_vars: Reflect attributefn in AST visitor > parsing_cocci: get_constants2: Reflect attributefn in AST visitor > parsing_cocci: re_constraints: Reflect attributefn in AST visitor > parsing_cocci: safe_for_multi_decls: Reflect attributefn in AST visitor > parsing_cocci: stmtlist: Reflect attributefn in AST visitor > parsing_cocci: unify_ast: Reflect attributefn in AST visitor > parsing_c: unparse_hrule: Reflect attributefn in AST visitor > cocci: Reflect attributefn in AST visitor > engine: asttoctl2: Reflect attributefn in AST visitor > engine: asttomember: Reflect attributefn in AST visitor > engine: cocci_vs_c: Reflect attributefn in AST visitor > engine: transformation_c: Reflect attributefn in AST visitor > popl09: popltoctl: Reflect attributefn in AST visitor > > cocci.ml |2 +- > engine/asttoctl2.ml | 11 ++- > engine/asttomember.ml |8 > engine/cocci_vs_c.ml |4 ++-- > engine/transformation_c.ml|2 +- > parsing_c/unparse_hrule.ml|2 +- > parsing_cocci/cleanup_rules.ml|2 +- > parsing_cocci/disjdistr.ml|5 +++-- > parsing_cocci/free_vars.ml| 16 +--- > parsing_cocci/get_constants2.ml |3 ++- > parsing_cocci/parse_cocci.ml |2 +- > parsing_cocci/re_constraints.ml |8 +--- > parsing_cocci/safe_for_multi_decls.ml |6 +++--- > parsing_cocci/stmtlist.ml |2 +- > parsing_cocci/unify_ast.ml| 20 +--- > parsing_cocci/visitor_ast.ml | 12 > parsing_cocci/visitor_ast.mli |4 > popl09/popltoctl.ml |2 +- > 18 files changed, 66 insertions(+), 45 deletions(-) > > > ___ Cocci mailing list Cocci@systeme.lip6.fr https://systeme.lip6.fr/mailman/listinfo/cocci
Re: [Cocci] [PATCH 00/24] parsing_cocci: Add attributefn to the SmPL AST0 visitor
On Thu, 16 Jul 2020, Jaskaran Singh wrote: > This patch series aims to add a public function for visiting attributes > to the SmPL AST0 visitor. This is needed to support meta attributes. An > AttributeTag constructor is also added due to dependencies, as well as > to maintain consistency with the codebase. Applied. > > Jaskaran Singh (24): > parsing_cocci: visitor_ast0: Add attributefn to SmPL AST0 visitor > parsing_cocci: ast0toast: Reflect attributefn in AST0 visitor > parsing_cocci: check_meta: Reflect attributefn in AST0 visitor > parsing_cocci: function_prototypes: Reflect attributefn in AST0 visitor > parsing_cocci: iso_compile: Reflect attributefn in AST0 visitor > parsing_cocci: iso_pattern: Reflect attributefn in AST0 visitor > parsing_cocci: parse_cocci: Reflect attributefn in AST0 visitor > parsing_cocci: single_statement: Reflect attributefn in AST0 visitor > parsing_cocci: unitary_ast0: Reflect attributefn in AST0 visitor > parsing_cocci: ast0_cocci: Add AttributeTag to SmPL AST0 > parsing_cocci: visitor_ast0: Reflect AttributeTag in SmPL AST0 > parsing_cocci: iso_pattern: Reflect AttributeTag in SmPL AST0 > parsing_cocci: unparse_ast0: Reflect AttributeTag in SmPL AST0 > parsing_cocci: context_neg: Reflect AttributeTag in SmPL AST0 > parsing_cocci: insert_plus: Reflect AttributeTag in SmPL AST0 > parsing_cocci: ast_cocci: Add AttributeTag to the SmPL AST > parsing_cocci: pretty_print_cocci: Reflect AttributeTag in SmPL AST > parsing_c: unparse_cocci: Reflect AttributeTag in SmPL AST > parsing_cocci: visitor_ast: Reflect AttributeTag in SmPL AST > parsing_cocci: ast0toast: Reflect AttributeTag in the SmPL ASTs > ocaml: coccilib: Reflect AttributeTag in the SmPL ASTs > parsing_cocci: context_neg: Reflect attributefn in AST0 visitor > parsing_cocci: insert_plus: Reflect attributefn in AST0 visitor > tools: spgen: Reflect attributefn in AST0 visitor > > ocaml/coccilib.mli |2 ++ > parsing_c/unparse_cocci.ml |1 + > parsing_cocci/ast0_cocci.ml |2 ++ > parsing_cocci/ast0_cocci.mli |2 ++ > parsing_cocci/ast0toast.ml |5 +++-- > parsing_cocci/ast0toast.mli |1 + > parsing_cocci/ast_cocci.ml |2 ++ > parsing_cocci/ast_cocci.mli |1 + > parsing_cocci/check_meta.ml |4 ++-- > parsing_cocci/context_neg.ml | 23 +-- > parsing_cocci/function_prototypes.ml |6 +++--- > parsing_cocci/insert_plus.ml | 18 ++ > parsing_cocci/iso_compile.ml |2 +- > parsing_cocci/iso_pattern.ml | 17 +++-- > parsing_cocci/parse_cocci.ml |2 +- > parsing_cocci/pretty_print_cocci.ml |1 + > parsing_cocci/single_statement.ml|2 +- > parsing_cocci/unitary_ast0.ml|2 +- > parsing_cocci/unparse_ast0.ml|1 + > parsing_cocci/visitor_ast.ml |2 ++ > parsing_cocci/visitor_ast0.ml| 24 > parsing_cocci/visitor_ast0.mli |2 ++ > parsing_cocci/visitor_ast0_types.ml |6 ++ > parsing_cocci/visitor_ast0_types.mli |6 ++ > tools/spgen/source/detect_patch.ml |3 ++- > tools/spgen/source/meta_variable.ml |3 ++- > tools/spgen/source/rule_body.ml |3 ++- > 27 files changed, 109 insertions(+), 34 deletions(-) > > > ___ Cocci mailing list Cocci@systeme.lip6.fr https://systeme.lip6.fr/mailman/listinfo/cocci
Re: [Cocci] [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 ___ Cocci mailing list Cocci@systeme.lip6.fr https://systeme.lip6.fr/mailman/listinfo/cocci
Re: [Cocci] [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 ___ Cocci mailing list Cocci@systeme.lip6.fr https://systeme.lip6.fr/mailman/listinfo/cocci
Re: [Cocci] [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/5c0dae88-e172-3ba6-f86c-d1a6238bb...@web.de/ > >> 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/c3464cad-e567-9ef5-b4e3-a01e3b111...@web.de/ > >> 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___ Cocci mailing list Cocci@systeme.lip6.fr https://systeme.lip6.fr/mailman/listinfo/cocci
Re: [Cocci] [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/5c0dae88-e172-3ba6-f86c-d1a6238bb...@web.de/ > https://lkml.org/lkml/2020/6/9/568 This one it complete nonsense. > > * https://lore.kernel.org/cocci/c3464cad-e567-9ef5-b4e3-a01e3b111...@web.de/ > 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 > ___ Cocci mailing list Cocci@systeme.lip6.fr https://systeme.lip6.fr/mailman/listinfo/cocci