mirror of
https://github.com/xen-project/xen.git
synced 2026-10-28 02:01:24 +01:00
automation/eclair: configure Rule 13.6 and custom service B.UNEVALEFF
Rule 13.6 states that "The operand of the `sizeof' operator shall not contain any expression which has potential side effects". Define service B.UNEVALEFF as an extension of Rule 13.6 to check for unevalued side effects also for typeof and alignof operators. Update ECLAIR configuration to deviate uses of BUILD_BUG_ON and alternative_v?call[0-9] for both Rule 13.6 and B.UNEVALEFF. Add service B.UNEVALEFF to the accepted.ecl guidelines to check "violations" in the weekly analysis. Signed-off-by: Federico Serafini <federico.serafini@bugseng.com> Signed-off-by: Nicola Vetrini <nicola.vetrini@bugseng.com> Reviewed-by: Stefano Stabellini <sstabellini@kernel.org> Release-Acked-By: Oleksii Kurochko <oleksii.kurochko@gmail.com>
This commit is contained in:
1 parent
11ea49a3fd
commit
0ac3b175e7
5 files changed
+33
No files matched your search
@@ -344,6 +344,16 @@ of the short-circuit evaluation strategy of such logical operators."
|
||||
-config=MC3R1.R13.5,reports+={disapplied,"any()"}
|
||||
-doc_end
|
||||
|
||||
-doc_begin="Macros alternative_v?call[0-9] use sizeof and typeof to check that the argument types match the corresponding parameter ones."
|
||||
-config=MC3R1.R13.6,reports+={deliberate,"any_area(any_loc(any_exp(macro(^alternative_vcall[0-9]$))&&file(^xen/arch/x86/include/asm/alternative\\.h*$)))"}
|
||||
-config=B.UNEVALEFF,reports+={deliberate,"any_area(any_loc(any_exp(macro(^alternative_v?call[0-9]$))&&file(^xen/arch/x86/include/asm/alterantive\\.h*$)))"}
|
||||
-doc_end
|
||||
|
||||
-doc_begin="Anything, no matter how complicated, inside the BUILD_BUG_ON macro is subject to a compile-time evaluation without relevant side effects."
|
||||
-config=MC3R1.R13.6,reports+={safe,"any_area(any_loc(any_exp(macro(name(BUILD_BUG_ON)))))"}
|
||||
-config=B.UNEVALEFF,reports+={safe,"any_area(any_loc(any_exp(macro(name(BUILD_BUG_ON)))))"}
|
||||
-doc_end
|
||||
|
||||
#
|
||||
# Series 14
|
||||
#
|
||||
|
||||