Skip to contentSkip to conversation

x86/shadow: deviate guest_va_t wrt Misra C:2012 rule 5.6

PATCH In review Jan Beulich 2 participants 2 messages May 13 – May 14

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 x86/shadow: deviate guest_va_t wrt Misra C:2012 rule 5.6

... ("A `typedef' name shall be a unique identifier"). Much like already done for guest_intpte_t and guest_l[12]e_t, but limited to shadow/multi.c.

automation/eclair_analysis/ECLAIR/deviations.ecl +5 -0
@@ -143,6 +143,11 @@ number of guest paging levels."
 -config=MC3A2.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="In x86 shadow code, the type \"guest_va_t\" is deliberately defined
+multiple times, depending on the number of guest paging levels."
+-config=MC3A2.R5.6,reports+={deliberate,"any_area(any_loc(file(^xen/arch/x86/mm/shadow/multi\\.c$)))&&any_area(any_loc(text(^.*guest_va_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$"}
Reviewed-by on v1 1/1
#1 lore raw
Quoted 4 lines · Jan Beulich

... ("A `typedef' name shall be a unique identifier"). Much like already done for guest_intpte_t and guest_l[12]e_t, but limited to shadow/multi.c.

Quoted 18 lines
automation/eclair_analysis/ECLAIR/deviations.ecl +1 -1
@@ -143,6 +143,11 @@ number of guest paging levels."
 
-config=MC3A2.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="In x86 shadow code, the type \"guest_va_t\" is 

deliberately defined

automation/eclair_analysis/ECLAIR/deviations.ecl +4 -0
+multiple times, depending on the number of guest paging levels."
+-config=MC3A2.R5.6,reports+={deliberate,"any_area(any_loc(file(^xen/arch/x86/mm/shadow/multi\\.c$)))&&any_area(any_loc(text(^.*guest_va_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$"}

Signature · 4 lines
Nicola Vetrini, B.Sc.
Software Engineer
BUGSENG (https://bugseng.com)
LinkedIn: https://www.linkedin.com/in/nicola-vetrini-a42471253