diff mbox series

[XEN,1/2] automation/eclair: update configuration

Message ID 577236484d748d2941f6fc07b7e4fc3fa7501e95.1692261955.git.federico.serafini@bugseng.com (mailing list archive)
State New, archived
Headers show
Series Add files to the exclude list and update ECL files | expand

Commit Message

Federico Serafini Aug. 17, 2023, 9:42 a.m. UTC
Mark more files as "adopted" and configure Rule 8.3 in order to:
- exclude violations involving the type ret_t;
- exclude violations involving both an internal and an external file,
  thus avoiding touching adopted code.

Signed-off-by: Federico Serafini <federico.serafini@bugseng.com>
---
 .../eclair_analysis/ECLAIR/deviations.ecl     | 29 +++++++++++++++++++
 .../eclair_analysis/ECLAIR/out_of_scope.ecl   |  3 ++
 2 files changed, 32 insertions(+)

Comments

Stefano Stabellini Aug. 17, 2023, 5:55 p.m. UTC | #1
On Thu, 17 Aug 2023, Federico Serafini wrote:
> Mark more files as "adopted" and configure Rule 8.3 in order to:
> - exclude violations involving the type ret_t;
> - exclude violations involving both an internal and an external file,
>   thus avoiding touching adopted code.
> 
> Signed-off-by: Federico Serafini <federico.serafini@bugseng.com>

Acked-by: Stefano Stabellini <sstabellini@kernel.org>



> ---
>  .../eclair_analysis/ECLAIR/deviations.ecl     | 29 +++++++++++++++++++
>  .../eclair_analysis/ECLAIR/out_of_scope.ecl   |  3 ++
>  2 files changed, 32 insertions(+)
> 
> diff --git a/automation/eclair_analysis/ECLAIR/deviations.ecl b/automation/eclair_analysis/ECLAIR/deviations.ecl
> index 696618b59e..d8170106b4 100644
> --- a/automation/eclair_analysis/ECLAIR/deviations.ecl
> +++ b/automation/eclair_analysis/ECLAIR/deviations.ecl
> @@ -175,6 +175,35 @@ const-qualified."
>  -config=MC3R1.R8.2,reports+={deliberate,"any_area(any_loc(file(adopted_r8_2)))"}
>  -doc_end
>  
> +-doc_begin="The type ret_t is deliberately used and defined as int or long depending on the architecture."
> +-config=MC3R1.R8.3,reports+={deliberate,"any_area(any_loc(text(^.*ret_t.*$)))"}
> +-doc_end
> +
> +-doc_begin="The following files are imported from Linux and decompress.h defines a unique and documented interface towards all the (adopted) decompress functions."
> +-file_tag+={adopted_decompress_r8_3,"^xen/common/bunzip2\\.c$"}
> +-file_tag+={adopted_decompress_r8_3,"^xen/common/unlz4\\.c$"}
> +-file_tag+={adopted_decompress_r8_3,"^xen/common/unlzma\\.c$"}
> +-file_tag+={adopted_decompress_r8_3,"^xen/common/unlzo\\.c$"}
> +-file_tag+={adopted_decompress_r8_3,"^xen/common/unxz\\.c$"}
> +-file_tag+={adopted_decompress_r8_3,"^xen/common/unzstd\\.c$"}
> +-config=MC3R1.R8.3,reports+={deliberate,"any_area(any_loc(file(adopted_decompress_r8_3)))&&any_area(any_loc(file(^xen/include/xen/decompress\\.h$)))"}
> +-doc_end
> +
> +-doc_begin="The following file is imported from Linux: ignore for now."
> +-file_tag+={adopted_time_r8_3,"^xen/arch/x86/time\\.c$"}
> +-config=MC3R1.R8.3,reports+={deliberate,"any_area(any_loc(file(adopted_time_r8_3)))&&(any_area(any_loc(file(^xen/include/xen/time\\.h$)))||any_area(any_loc(file(^xen/arch/x86/include/asm/setup\\.h$))))"}
> +-doc_end
> +
> +-doc_begin="The following file is imported from Linux: ignore for now."
> +-file_tag+={adopted_cpu_idle_r8_3,"^xen/arch/x86/acpi/cpu_idle\\.c$"}
> +-config=MC3R1.R8.3,reports+={deliberate,"any_area(any_loc(file(adopted_cpu_idle_r8_3)))&&any_area(any_loc(file(^xen/include/xen/pmstat\\.h$)))"}
> +-doc_end
> +
> +-doc_begin="The following file is imported from Linux: ignore for now."
> +-file_tag+={adopted_mpparse_r8_3,"^xen/arch/x86/mpparse\\.c$"}
> +-config=MC3R1.R8.3,reports+={deliberate,"any_area(any_loc(file(adopted_mpparse_r8_3)))&&any_area(any_loc(file(^xen/arch/x86/include/asm/mpspec\\.h$)))"}
> +-doc_end
> +
>  -doc_begin="The following variables are compiled in multiple translation units
>  belonging to different executables and therefore are safe."
>  -config=MC3R1.R8.6,declarations+={safe, "name(current_stack_pointer||bsearch||sort)"}
> diff --git a/automation/eclair_analysis/ECLAIR/out_of_scope.ecl b/automation/eclair_analysis/ECLAIR/out_of_scope.ecl
> index 44db6997b5..e1ec4a607c 100644
> --- a/automation/eclair_analysis/ECLAIR/out_of_scope.ecl
> +++ b/automation/eclair_analysis/ECLAIR/out_of_scope.ecl
> @@ -22,6 +22,9 @@
>  -file_tag+={adopted,"^xen/drivers/acpi/numa\\.c$"}
>  -file_tag+={adopted,"^xen/drivers/acpi/osl\\.c$"}
>  -file_tag+={adopted,"^xen/drivers/acpi/tables\\.c$"}
> +-file_tag+={adopted,"^xen/include/xen/acpi\\.h$"}
> +-file_tag+={adopted,"^xen/include/acpi/acpiosxf\\.h$"}
> +-file_tag+={adopted,"^xen/include/acpi/acpixf\\.h$"}
>  -file_tag+={adopted,"^xen/lib/list-sort\\.c$"}
>  -file_tag+={adopted,"^xen/lib/rbtree\\.c$"}
>  -file_tag+={adopted,"^xen/lib/xxhash.*\\.c$"}
> -- 
> 2.34.1
>
diff mbox series

Patch

diff --git a/automation/eclair_analysis/ECLAIR/deviations.ecl b/automation/eclair_analysis/ECLAIR/deviations.ecl
index 696618b59e..d8170106b4 100644
--- a/automation/eclair_analysis/ECLAIR/deviations.ecl
+++ b/automation/eclair_analysis/ECLAIR/deviations.ecl
@@ -175,6 +175,35 @@  const-qualified."
 -config=MC3R1.R8.2,reports+={deliberate,"any_area(any_loc(file(adopted_r8_2)))"}
 -doc_end
 
+-doc_begin="The type ret_t is deliberately used and defined as int or long depending on the architecture."
+-config=MC3R1.R8.3,reports+={deliberate,"any_area(any_loc(text(^.*ret_t.*$)))"}
+-doc_end
+
+-doc_begin="The following files are imported from Linux and decompress.h defines a unique and documented interface towards all the (adopted) decompress functions."
+-file_tag+={adopted_decompress_r8_3,"^xen/common/bunzip2\\.c$"}
+-file_tag+={adopted_decompress_r8_3,"^xen/common/unlz4\\.c$"}
+-file_tag+={adopted_decompress_r8_3,"^xen/common/unlzma\\.c$"}
+-file_tag+={adopted_decompress_r8_3,"^xen/common/unlzo\\.c$"}
+-file_tag+={adopted_decompress_r8_3,"^xen/common/unxz\\.c$"}
+-file_tag+={adopted_decompress_r8_3,"^xen/common/unzstd\\.c$"}
+-config=MC3R1.R8.3,reports+={deliberate,"any_area(any_loc(file(adopted_decompress_r8_3)))&&any_area(any_loc(file(^xen/include/xen/decompress\\.h$)))"}
+-doc_end
+
+-doc_begin="The following file is imported from Linux: ignore for now."
+-file_tag+={adopted_time_r8_3,"^xen/arch/x86/time\\.c$"}
+-config=MC3R1.R8.3,reports+={deliberate,"any_area(any_loc(file(adopted_time_r8_3)))&&(any_area(any_loc(file(^xen/include/xen/time\\.h$)))||any_area(any_loc(file(^xen/arch/x86/include/asm/setup\\.h$))))"}
+-doc_end
+
+-doc_begin="The following file is imported from Linux: ignore for now."
+-file_tag+={adopted_cpu_idle_r8_3,"^xen/arch/x86/acpi/cpu_idle\\.c$"}
+-config=MC3R1.R8.3,reports+={deliberate,"any_area(any_loc(file(adopted_cpu_idle_r8_3)))&&any_area(any_loc(file(^xen/include/xen/pmstat\\.h$)))"}
+-doc_end
+
+-doc_begin="The following file is imported from Linux: ignore for now."
+-file_tag+={adopted_mpparse_r8_3,"^xen/arch/x86/mpparse\\.c$"}
+-config=MC3R1.R8.3,reports+={deliberate,"any_area(any_loc(file(adopted_mpparse_r8_3)))&&any_area(any_loc(file(^xen/arch/x86/include/asm/mpspec\\.h$)))"}
+-doc_end
+
 -doc_begin="The following variables are compiled in multiple translation units
 belonging to different executables and therefore are safe."
 -config=MC3R1.R8.6,declarations+={safe, "name(current_stack_pointer||bsearch||sort)"}
diff --git a/automation/eclair_analysis/ECLAIR/out_of_scope.ecl b/automation/eclair_analysis/ECLAIR/out_of_scope.ecl
index 44db6997b5..e1ec4a607c 100644
--- a/automation/eclair_analysis/ECLAIR/out_of_scope.ecl
+++ b/automation/eclair_analysis/ECLAIR/out_of_scope.ecl
@@ -22,6 +22,9 @@ 
 -file_tag+={adopted,"^xen/drivers/acpi/numa\\.c$"}
 -file_tag+={adopted,"^xen/drivers/acpi/osl\\.c$"}
 -file_tag+={adopted,"^xen/drivers/acpi/tables\\.c$"}
+-file_tag+={adopted,"^xen/include/xen/acpi\\.h$"}
+-file_tag+={adopted,"^xen/include/acpi/acpiosxf\\.h$"}
+-file_tag+={adopted,"^xen/include/acpi/acpixf\\.h$"}
 -file_tag+={adopted,"^xen/lib/list-sort\\.c$"}
 -file_tag+={adopted,"^xen/lib/rbtree\\.c$"}
 -file_tag+={adopted,"^xen/lib/xxhash.*\\.c$"}