[cocci] [PATCH 01/11] coccinelle: Add script to reorder capable() calls

Markus Elfring Markus.Elfring at web.de
Tue Nov 26 12:55:36 UTC 2024


…
> +(
> +-  F at p(EL) op E
> ++  E op F(EL)
> +|
> +-  E1 op1 F at p(EL) op2 E2
> ++  E1 op1 E2 op2 F(EL)
> +)

How do you think about to use an SmPL code variant like the following?

(
 E1 op1
-F at p(EL)
+E2
 op2
-E2
+F(EL)
|
-F at p(EL) op
 E
+op F(EL)
)


> +//----------------------------------------------------------
> +//  For context mode
> +//----------------------------------------------------------
> +
> + at r1 depends on !patch exists@
…

I would prefer the dependency specification “context” for this SmPL rule.
The SmPL asterisk functionality should be better distinguished here.


…
> + at script:python depends on org@
> +p << r1.p;
> +@@
…

I got the impression that source code search approaches can be safely
shared only between the operation modes “org” and “report” so far.

Regards,
Markus



More information about the Linux-security-module-archive mailing list