All of lore.kernel.org
 help / color / mirror / Atom feed
* [XEN PATCH 0/2] Add files to the exclude list and update ECL files
@ 2023-08-17  9:42 Federico Serafini
  2023-08-17  9:42 ` [XEN PATCH 1/2] automation/eclair: update configuration Federico Serafini
  2023-08-17  9:42 ` [XEN PATCH 2/2] misra: add more entires to exclude-list.json Federico Serafini
  0 siblings, 2 replies; 5+ messages in thread
From: Federico Serafini @ 2023-08-17  9:42 UTC (permalink / raw)
  To: xen-devel
  Cc: consulting, Federico Serafini, Simone Ballarin, Doug Goldstein,
	Stefano Stabellini, Andrew Cooper, George Dunlap, Jan Beulich,
	Julien Grall, Wei Liu

Add files to exclude-list.json and adapt the ECLAIR configuration to keep
track of the changes.

Federico Serafini (2):
  automation/eclair: update configuration
  misra: add more entires to exclude-list.json

 .../eclair_analysis/ECLAIR/deviations.ecl     | 29 +++++++++++++++++++
 .../eclair_analysis/ECLAIR/out_of_scope.ecl   |  3 ++
 docs/misra/exclude-list.json                  | 12 ++++++++
 3 files changed, 44 insertions(+)

-- 
2.34.1



^ permalink raw reply	[flat|nested] 5+ messages in thread

* [XEN PATCH 1/2] automation/eclair: update configuration
  2023-08-17  9:42 [XEN PATCH 0/2] Add files to the exclude list and update ECL files Federico Serafini
@ 2023-08-17  9:42 ` Federico Serafini
  2023-08-17 17:55   ` Stefano Stabellini
  2023-08-17  9:42 ` [XEN PATCH 2/2] misra: add more entires to exclude-list.json Federico Serafini
  1 sibling, 1 reply; 5+ messages in thread
From: Federico Serafini @ 2023-08-17  9:42 UTC (permalink / raw)
  To: xen-devel
  Cc: consulting, Federico Serafini, Simone Ballarin, Doug Goldstein,
	Stefano Stabellini

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(+)

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



^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [XEN PATCH 2/2] misra: add more entires to exclude-list.json
  2023-08-17  9:42 [XEN PATCH 0/2] Add files to the exclude list and update ECL files Federico Serafini
  2023-08-17  9:42 ` [XEN PATCH 1/2] automation/eclair: update configuration Federico Serafini
@ 2023-08-17  9:42 ` Federico Serafini
  2023-08-17 10:48   ` Federico Serafini
  1 sibling, 1 reply; 5+ messages in thread
From: Federico Serafini @ 2023-08-17  9:42 UTC (permalink / raw)
  To: xen-devel
  Cc: consulting, Federico Serafini, Andrew Cooper, George Dunlap,
	Jan Beulich, Julien Grall, Stefano Stabellini, Wei Liu

Add entries to the exclude-list.json for those files that need to be
excluded from the analysis scan.

Signed-off-by: Federico Serafini <federico.serafini@bugseng.com>
---
 docs/misra/exclude-list.json | 12 ++++++++++++
 1 file changed, 12 insertions(+)

diff --git a/docs/misra/exclude-list.json b/docs/misra/exclude-list.json
index ca1e2dd678..3be9421e4d 100644
--- a/docs/misra/exclude-list.json
+++ b/docs/misra/exclude-list.json
@@ -181,6 +181,18 @@
             "rel_path": "drivers/video/font_*",
             "comment": "Imported from Linux, ignore for now"
         },
+        {
+          "rel_path": "include/acpi/acpiosxf.h",
+          "comment": "Imported from Linux, ignore for now"
+        },
+        {
+          "rel_path": "include/acpi/acpixf.h",
+          "comment": "Imported from Linux, ignore for now"
+        },
+        {
+          "rel_path": "include/xen/acpi.h",
+          "comment": "Imported from Linux, ignore for now"
+        },
         {
             "rel_path": "lib/list-sort.c",
             "comment": "Imported from Linux, ignore for now"
-- 
2.34.1



^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [XEN PATCH 2/2] misra: add more entires to exclude-list.json
  2023-08-17  9:42 ` [XEN PATCH 2/2] misra: add more entires to exclude-list.json Federico Serafini
@ 2023-08-17 10:48   ` Federico Serafini
  0 siblings, 0 replies; 5+ messages in thread
From: Federico Serafini @ 2023-08-17 10:48 UTC (permalink / raw)
  To: xen-devel
  Cc: consulting, Andrew Cooper, George Dunlap, Jan Beulich,
	Julien Grall, Stefano Stabellini, Wei Liu



On 17/08/23 11:42, Federico Serafini wrote:
> Add entries to the exclude-list.json for those files that need to be
> excluded from the analysis scan.
> 
> Signed-off-by: Federico Serafini <federico.serafini@bugseng.com>
> ---
>   docs/misra/exclude-list.json | 12 ++++++++++++
>   1 file changed, 12 insertions(+)
> 
> diff --git a/docs/misra/exclude-list.json b/docs/misra/exclude-list.json
> index ca1e2dd678..3be9421e4d 100644
> --- a/docs/misra/exclude-list.json
> +++ b/docs/misra/exclude-list.json
> @@ -181,6 +181,18 @@
>               "rel_path": "drivers/video/font_*",
>               "comment": "Imported from Linux, ignore for now"
>           },
> +        {
> +          "rel_path": "include/acpi/acpiosxf.h",
> +          "comment": "Imported from Linux, ignore for now"
> +        },
> +        {
> +          "rel_path": "include/acpi/acpixf.h",
> +          "comment": "Imported from Linux, ignore for now"
> +        },
> +        {
> +          "rel_path": "include/xen/acpi.h",
> +          "comment": "Imported from Linux, ignore for now"
> +        },
>           {
>               "rel_path": "lib/list-sort.c",
>               "comment": "Imported from Linux, ignore for now"

Wrong indentation, a v2 of this patch has already been sent.

Reviewed-by: Federico Serafini <federico.serafini@bugseng.com>



^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [XEN PATCH 1/2] automation/eclair: update configuration
  2023-08-17  9:42 ` [XEN PATCH 1/2] automation/eclair: update configuration Federico Serafini
@ 2023-08-17 17:55   ` Stefano Stabellini
  0 siblings, 0 replies; 5+ messages in thread
From: Stefano Stabellini @ 2023-08-17 17:55 UTC (permalink / raw)
  To: Federico Serafini
  Cc: xen-devel, consulting, Simone Ballarin, Doug Goldstein,
	Stefano Stabellini

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
> 


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2023-08-17 17:55 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-08-17  9:42 [XEN PATCH 0/2] Add files to the exclude list and update ECL files Federico Serafini
2023-08-17  9:42 ` [XEN PATCH 1/2] automation/eclair: update configuration Federico Serafini
2023-08-17 17:55   ` Stefano Stabellini
2023-08-17  9:42 ` [XEN PATCH 2/2] misra: add more entires to exclude-list.json Federico Serafini
2023-08-17 10:48   ` Federico Serafini

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.