[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [XEN PATCH] automation/eclair: update configuration of MISRA C:2012 Rule 5.6



On 15/12/23 10:12, Federico Serafini wrote:
Deviate typedef names that are delberately defined multiple times.

Update docs/misra/deviations.rst accordingly.

Tag Rule 5.6 as clean.

Signed-off-by: Federico Serafini <federico.serafini@xxxxxxxxxxx>
---
  automation/eclair_analysis/ECLAIR/deviations.ecl | 6 ++++++
  automation/eclair_analysis/ECLAIR/tagging.ecl    | 2 +-
  docs/misra/deviations.rst                        | 7 +++++++
  3 files changed, 14 insertions(+), 1 deletion(-)

diff --git a/automation/eclair_analysis/ECLAIR/deviations.ecl 
b/automation/eclair_analysis/ECLAIR/deviations.ecl
index 683f2bbfe8..195ddddde8 100644
--- a/automation/eclair_analysis/ECLAIR/deviations.ecl
+++ b/automation/eclair_analysis/ECLAIR/deviations.ecl
@@ -90,6 +90,12 @@ depending on the guest."
  
-config=MC3R1.R5.6,reports+={deliberate,"any_area(any_loc(text(^.*ret_t.*$)))"}
  -doc_end
+-doc_begin="On X86, the types \"guest_intpte_t\", \"guest_l1e_t\" and
+\"guest_l2e_t\" are deliberately defined multiple times, depending on the
+number of guest paging levels."
+-config=MC3R1.R5.6,reports+={deliberate,"any_area(any_loc(file(^xen/arch/x86/include/asm/guest_pt\\.h$)))&&any_area(any_loc(text(^.*(guest_intpte_t|guest_l[12]e_t).*$)))"}
+-doc_end
+
  -doc_begin="The following files are imported from the gnu-efi package."
  -file_tag+={adopted_r5_6,"^xen/include/efi/.*$"}
  -file_tag+={adopted_r5_6,"^xen/arch/.*/include/asm/.*/efibind\\.h$"}
diff --git a/automation/eclair_analysis/ECLAIR/tagging.ecl 
b/automation/eclair_analysis/ECLAIR/tagging.ecl
index d5d3bff396..900c532196 100644
--- a/automation/eclair_analysis/ECLAIR/tagging.ecl
+++ b/automation/eclair_analysis/ECLAIR/tagging.ecl
@@ -30,7 +30,7 @@
-doc_begin="Clean guidelines: new violations for these guidelines are not accepted." --service_selector={clean_guidelines_common,"MC3R1.D1.1||MC3R1.D2.1||MC3R1.D4.11||MC3R1.D4.14||MC3R1.R1.1||MC3R1.R1.3||MC3R1.R1.4||MC3R1.R2.2||MC3R1.R3.1||MC3R1.R3.2||MC3R1.R4.1||MC3R1.R4.2||MC3R1.R5.1||MC3R1.R5.2||MC3R1.R5.4||MC3R1.R6.1||MC3R1.R6.2||MC3R1.R7.1||MC3R1.R8.1||MC3R1.R8.5||MC3R1.R8.6||MC3R1.R8.8||MC3R1.R8.10||MC3R1.R8.12||MC3R1.R8.14||MC3R1.R9.2||MC3R1.R9.4||MC3R1.R9.5||MC3R1.R12.5||MC3R1.R17.3||MC3R1.R17.4||MC3R1.R17.6||MC3R1.R20.13||MC3R1.R20.14||MC3R1.R21.13||MC3R1.R21.19||MC3R1.R21.21||MC3R1.R22.2||MC3R1.R22.4||MC3R1.R22.5||MC3R1.R22.6"
+-service_selector={clean_guidelines_common,"MC3R1.D1.1||MC3R1.D2.1||MC3R1.D4.11||MC3R1.D4.14||MC3R1.R1.1||MC3R1.R1.3||MC3R1.R1.4||MC3R1.R2.2||MC3R1.R3.1||MC3R1.R3.2||MC3R1.R4.1||MC3R1.R4.2||MC3R1.R5.1||MC3R1.R5.2||MC3R1.R5.4||MC3R1.R5.6||MC3R1.R6.1||MC3R1.R6.2||MC3R1.R7.1||MC3R1.R8.1||MC3R1.R8.5||MC3R1.R8.6||MC3R1.R8.8||MC3R1.R8.10||MC3R1.R8.12||MC3R1.R8.14||MC3R1.R9.2||MC3R1.R9.4||MC3R1.R9.5||MC3R1.R12.5||MC3R1.R17.3||MC3R1.R17.4||MC3R1.R17.6||MC3R1.R20.13||MC3R1.R20.14||MC3R1.R21.13||MC3R1.R21.19||MC3R1.R21.21||MC3R1.R22.2||MC3R1.R22.4||MC3R1.R22.5||MC3R1.R22.6"
  }
-setq=target,getenv("XEN_TARGET_ARCH")
diff --git a/docs/misra/deviations.rst b/docs/misra/deviations.rst
index eda3c8100c..5632685190 100644
--- a/docs/misra/deviations.rst
+++ b/docs/misra/deviations.rst
@@ -103,6 +103,13 @@ Deviations related to MISRA C:2012 Rules:
         type of guest to service.
       - Tagged as `deliberate` for ECLAIR.
+ * - R5.6
+     - On X86, some types are deliberately defined multiple times, depending on
+       the number of guest paging levels.
+     - Tagged as `deliberate` for ECLAIR. Such types are:
+         - guest_intpte

Typo: missing "_t"

+         - guest_l[12]e_t
+
     * - R5.6
       - Some files are not subject to respect MISRA rules at
         the moment, but, among these out-of-scope files, there are definitions

--
Federico Serafini, M.Sc.

Software Engineer, BUGSENG (http://bugseng.com)



 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.