Skip to contentSkip to conversation

X86: MISRA C:2012 Rule 5.6

DISCUSSION Federico Serafini 2 participants 3 messages Dec 13, 2023 – Dec 14, 2023

lore
Share & tools
lore
#0 lore raw

Hello everyone,

I have another question regarding Rule 5.6 ("A `typedef' name shall be a unique identifier"), this time for X86:
the violations left [1] involve guest_intpte_t, guest_l1e_t and guest_l2e_t, which seem to be deliberately defined differently depending on the number of guest paging levels.
I would like to propose a deviation for these types, do you agree?

[1]
https://saas.eclairit.com:3787/fs/var/local/eclair/XEN.ecdf/ECLAIR_normal/staging/X86_64-2023/446/PROJECT.ecd;/by_service/MC3R1.R5.6.html

Regards

Signature · 3 lines
Federico Serafini, M.Sc.

Software Engineer, BUGSENG (http://bugseng.com)
#1 lore raw
Quoted 6 lines · Federico Serafini

I have another question regarding Rule 5.6 ("A `typedef' name shall be a unique identifier"), this time for X86:
the violations left [1] involve guest_intpte_t, guest_l1e_t and guest_l2e_t, which seem to be deliberately defined differently depending on the number of guest paging levels.
I would like to propose a deviation for these types, do you agree?

Yes. In fact I think we said so already when discussing this rule. The whole rebuild-same-file-for-multiple-purposes can hardly work without something along the lines of multiple ways of defining the same macros and/or typedefs for each of the instances.

Jan

Quoted 4 lines

[1]
https://saas.eclairit.com:3787/fs/var/local/eclair/XEN.ecdf/ECLAIR_normal/staging/X86_64-2023/446/PROJECT.ecd;/by_service/MC3R1.R5.6.html

Regards

#2 lore raw
Quoted 8 lines · Jan Beulich
Quoted 6 lines · Federico Serafini

I have another question regarding Rule 5.6 ("A `typedef' name shall be a unique identifier"), this time for X86:
the violations left [1] involve guest_intpte_t, guest_l1e_t and guest_l2e_t, which seem to be deliberately defined differently depending on the number of guest paging levels.
I would like to propose a deviation for these types, do you agree?

Quoted 4 lines

Yes. In fact I think we said so already when discussing this rule. The whole rebuild-same-file-for-multiple-purposes can hardly work without something along the lines of multiple ways of defining the same macros and/or typedefs for each of the instances.

Thanks for the feedback.

Signature · 3 lines
Federico Serafini, M.Sc.

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