[XEN PATCH 0/5] address violations of MISRA C rules

Nicola Vetrini posted 5 patches 5 months, 3 weeks ago
Patches applied successfully (tree, apply log)
git fetch https://gitlab.com/xen-project/patchew/xen tags/patchew/cover.1717236930.git.nicola.vetrini@bugseng.com
automation/eclair_analysis/ECLAIR/deviations.ecl | 8 +++++++-
docs/misra/safe.json                             | 8 ++++++++
xen/arch/x86/domain.c                            | 1 +
xen/arch/x86/domctl.c                            | 1 +
xen/arch/x86/include/asm/shared.h                | 1 +
xen/common/domain.c                              | 1 +
xen/include/xen/self-tests.h                     | 2 +-
7 files changed, 20 insertions(+), 2 deletions(-)
[XEN PATCH 0/5] address violations of MISRA C rules
Posted by Nicola Vetrini 5 months, 3 weeks ago
Patches 1 to 4 address violations of MISRA C Rule 20.12 by deviating certain
uses of some macros, while the last patch addresses some regressions introduced
by the latest bitops series

Nicola Vetrini (5):
  xen/domain: deviate violation of MISRA C Rule 20.12
  x86/domain: deviate violation of MISRA C Rule 20.12
  x86: deviate violation of MISRA C Rule 20.12
  automation/eclair_analysis: address remaining violations of MISRA C
    Rule 20.12
  xen: fix MISRA regressions on rule 20.9 and 20.12

 automation/eclair_analysis/ECLAIR/deviations.ecl | 8 +++++++-
 docs/misra/safe.json                             | 8 ++++++++
 xen/arch/x86/domain.c                            | 1 +
 xen/arch/x86/domctl.c                            | 1 +
 xen/arch/x86/include/asm/shared.h                | 1 +
 xen/common/domain.c                              | 1 +
 xen/include/xen/self-tests.h                     | 2 +-
 7 files changed, 20 insertions(+), 2 deletions(-)

-- 
2.34.1
Re: [XEN PATCH 0/5] address violations of MISRA C rules
Posted by Andrew Cooper 5 months, 3 weeks ago
On 01/06/2024 11:16 am, Nicola Vetrini wrote:
> Patches 1 to 4 address violations of MISRA C Rule 20.12 by deviating certain
> uses of some macros, while the last patch addresses some regressions introduced
> by the latest bitops series
>
> Nicola Vetrini (5):
>   xen/domain: deviate violation of MISRA C Rule 20.12
>   x86/domain: deviate violation of MISRA C Rule 20.12
>   x86: deviate violation of MISRA C Rule 20.12
>   automation/eclair_analysis: address remaining violations of MISRA C
>     Rule 20.12
>   xen: fix MISRA regressions on rule 20.9 and 20.12

I've committed patch 5 because it fixes a blocking failure in Gitlab CI
from content already accepted for Xen 4.19.

The others look fine to me, but you'll need to negotiate with Oleksii
(CC'd) to get them in, at this point in the release.

Given that this series makes x86 clean to Rule 20.12, shouldn't there be
a final patch making it blocking, to bring x86 in line with ARM?

~Andrew
Re: [XEN PATCH 0/5] address violations of MISRA C rules
Posted by Nicola Vetrini 5 months, 3 weeks ago
On 2024-06-01 16:37, Andrew Cooper wrote:
> On 01/06/2024 11:16 am, Nicola Vetrini wrote:
>> Patches 1 to 4 address violations of MISRA C Rule 20.12 by deviating 
>> certain
>> uses of some macros, while the last patch addresses some regressions 
>> introduced
>> by the latest bitops series
>> 
>> Nicola Vetrini (5):
>>   xen/domain: deviate violation of MISRA C Rule 20.12
>>   x86/domain: deviate violation of MISRA C Rule 20.12
>>   x86: deviate violation of MISRA C Rule 20.12
>>   automation/eclair_analysis: address remaining violations of MISRA C
>>     Rule 20.12
>>   xen: fix MISRA regressions on rule 20.9 and 20.12
> 
> I've committed patch 5 because it fixes a blocking failure in Gitlab CI
> from content already accepted for Xen 4.19.
> 

Thanks

> The others look fine to me, but you'll need to negotiate with Oleksii
> (CC'd) to get them in, at this point in the release.
> 

Well, having one more clean rule does look better for Xen, and the 
changes to the codebase are harmless enough, but ultimately given the 
closeness with the deadline I didn't really see a need to.

> Given that this series makes x86 clean to Rule 20.12, shouldn't there 
> be
> a final patch making it blocking, to bring x86 in line with ARM?
> 

Good point, I should have done that in patch 4. I'll do a follow-up 
patch.

> ~Andrew

-- 
Nicola Vetrini, BSc
Software Engineer, BUGSENG srl (https://bugseng.com)
Re: [XEN PATCH 0/5] address violations of MISRA C rules
Posted by Andrew Cooper 5 months, 3 weeks ago
On 01/06/2024 6:19 pm, Nicola Vetrini wrote:
> On 2024-06-01 16:37, Andrew Cooper wrote:
>> On 01/06/2024 11:16 am, Nicola Vetrini wrote:
>>> Patches 1 to 4 address violations of MISRA C Rule 20.12 by deviating
>>> certain
>>> uses of some macros, while the last patch addresses some regressions
>>> introduced
>>> by the latest bitops series
>>>
>>> Nicola Vetrini (5):
>>>   xen/domain: deviate violation of MISRA C Rule 20.12
>>>   x86/domain: deviate violation of MISRA C Rule 20.12
>>>   x86: deviate violation of MISRA C Rule 20.12
>>>   automation/eclair_analysis: address remaining violations of MISRA C
>>>     Rule 20.12
>>>   xen: fix MISRA regressions on rule 20.9 and 20.12
>>
>> I've committed patch 5 because it fixes a blocking failure in Gitlab CI
>> from content already accepted for Xen 4.19.
>>
>
> Thanks
>
>> The others look fine to me, but you'll need to negotiate with Oleksii
>> (CC'd) to get them in, at this point in the release.
>>
>
> Well, having one more clean rule does look better for Xen, and the
> changes to the codebase are harmless enough, but ultimately given the
> closeness with the deadline I didn't really see a need to.
>
>> Given that this series makes x86 clean to Rule 20.12, shouldn't there be
>> a final patch making it blocking, to bring x86 in line with ARM?
>>
>
> Good point, I should have done that in patch 4. I'll do a follow-up
> patch.

FWIW, given how simple this series is, I'm +1 for including it in 4.19,
even at this point.  It is definitely nicer to have the disposition of
Rule 20.12 the same between ARM and x86.

Still - it's very much Oleksii's call.

~Andrew