mbox series

[XEN,v2,0/6,RESEND] address violations of MISRA C Rule 20.7

Message ID cover.1718378539.git.nicola.vetrini@bugseng.com (mailing list archive)
Headers show
Series address violations of MISRA C Rule 20.7 | expand

Message

Nicola Vetrini June 17, 2024, 8:57 a.m. UTC
Hi all,

this series addresses several violations of Rule 20.7, as well as a
small fix to the ECLAIR integration scripts that do not influence
the current behaviour, but were mistakenly part of the upstream
configuration.

Note that by applying this series the rule has a few leftover violations.
Most of those are in x86 code in xen/arch/x86/include/asm/msi.h .
I did send a patch [1] to deal with those, limited only to addressing the MISRA
violations, but in the end it was dropped in favour of a more general cleanup of
the file upon agreement, so this is why those changes are not included here.

[1] https://lore.kernel.org/xen-devel/2f2c865f20d0296e623f1d65bed25c083f5dd497.1711700095.git.nicola.vetrini@bugseng.com/

Changes in v2:
- refactor patch 4 to deviate the pattern, instead of fixing the violations
- The series has been resent because I forgot to properly Cc the mailing list

Nicola Vetrini (6):
  automation/eclair: address violations of MISRA C Rule 20.7
  xen/self-tests: address violations of MISRA rule 20.7
  xen/guest_access: address violations of MISRA rule 20.7
  automation/eclair_analysis: address violations of MISRA C Rule 20.7
  x86/irq: address violations of MISRA C Rule 20.7
  automation/eclair_analysis: clean ECLAIR configuration scripts

 automation/eclair_analysis/ECLAIR/analyze.sh     |  3 +--
 automation/eclair_analysis/ECLAIR/deviations.ecl | 14 ++++++++++++--
 docs/misra/deviations.rst                        |  3 ++-
 xen/include/xen/guest_access.h                   |  4 ++--
 xen/include/xen/irq.h                            |  2 +-
 xen/include/xen/self-tests.h                     |  8 ++++----
 6 files changed, 22 insertions(+), 12 deletions(-)

Comments

Stefano Stabellini June 25, 2024, 12:47 a.m. UTC | #1
Hi Oleksii,

I would like to ask for a release-ack as the patch series makes very few
changes outside of the static analysis configuration. The few changes to
the Xen code are very limited, straightforward and makes the code
better, see patch #3 and #5.


On Mon, 17 Jun 2024, Nicola Vetrini wrote:
> Hi all,
> 
> this series addresses several violations of Rule 20.7, as well as a
> small fix to the ECLAIR integration scripts that do not influence
> the current behaviour, but were mistakenly part of the upstream
> configuration.
> 
> Note that by applying this series the rule has a few leftover violations.
> Most of those are in x86 code in xen/arch/x86/include/asm/msi.h .
> I did send a patch [1] to deal with those, limited only to addressing the MISRA
> violations, but in the end it was dropped in favour of a more general cleanup of
> the file upon agreement, so this is why those changes are not included here.
> 
> [1] https://lore.kernel.org/xen-devel/2f2c865f20d0296e623f1d65bed25c083f5dd497.1711700095.git.nicola.vetrini@bugseng.com/
> 
> Changes in v2:
> - refactor patch 4 to deviate the pattern, instead of fixing the violations
> - The series has been resent because I forgot to properly Cc the mailing list
> 
> Nicola Vetrini (6):
>   automation/eclair: address violations of MISRA C Rule 20.7
>   xen/self-tests: address violations of MISRA rule 20.7
>   xen/guest_access: address violations of MISRA rule 20.7
>   automation/eclair_analysis: address violations of MISRA C Rule 20.7
>   x86/irq: address violations of MISRA C Rule 20.7
>   automation/eclair_analysis: clean ECLAIR configuration scripts
> 
>  automation/eclair_analysis/ECLAIR/analyze.sh     |  3 +--
>  automation/eclair_analysis/ECLAIR/deviations.ecl | 14 ++++++++++++--
>  docs/misra/deviations.rst                        |  3 ++-
>  xen/include/xen/guest_access.h                   |  4 ++--
>  xen/include/xen/irq.h                            |  2 +-
>  xen/include/xen/self-tests.h                     |  8 ++++----
>  6 files changed, 22 insertions(+), 12 deletions(-)
> 
> -- 
> 2.34.1
>
Jan Beulich June 25, 2024, 6:39 a.m. UTC | #2
On 25.06.2024 02:47, Stefano Stabellini wrote:
> I would like to ask for a release-ack as the patch series makes very few
> changes outside of the static analysis configuration. The few changes to
> the Xen code are very limited, straightforward and makes the code
> better, see patch #3 and #5.

While continuing to touch automation/ may be okay, I really think time has
passed for further Misra changes in 4.19, unless they're fixing actual bugs
of course. Just my personal view though ...

Jan

> On Mon, 17 Jun 2024, Nicola Vetrini wrote:
>> Hi all,
>>
>> this series addresses several violations of Rule 20.7, as well as a
>> small fix to the ECLAIR integration scripts that do not influence
>> the current behaviour, but were mistakenly part of the upstream
>> configuration.
>>
>> Note that by applying this series the rule has a few leftover violations.
>> Most of those are in x86 code in xen/arch/x86/include/asm/msi.h .
>> I did send a patch [1] to deal with those, limited only to addressing the MISRA
>> violations, but in the end it was dropped in favour of a more general cleanup of
>> the file upon agreement, so this is why those changes are not included here.
>>
>> [1] https://lore.kernel.org/xen-devel/2f2c865f20d0296e623f1d65bed25c083f5dd497.1711700095.git.nicola.vetrini@bugseng.com/
>>
>> Changes in v2:
>> - refactor patch 4 to deviate the pattern, instead of fixing the violations
>> - The series has been resent because I forgot to properly Cc the mailing list
>>
>> Nicola Vetrini (6):
>>   automation/eclair: address violations of MISRA C Rule 20.7
>>   xen/self-tests: address violations of MISRA rule 20.7
>>   xen/guest_access: address violations of MISRA rule 20.7
>>   automation/eclair_analysis: address violations of MISRA C Rule 20.7
>>   x86/irq: address violations of MISRA C Rule 20.7
>>   automation/eclair_analysis: clean ECLAIR configuration scripts
>>
>>  automation/eclair_analysis/ECLAIR/analyze.sh     |  3 +--
>>  automation/eclair_analysis/ECLAIR/deviations.ecl | 14 ++++++++++++--
>>  docs/misra/deviations.rst                        |  3 ++-
>>  xen/include/xen/guest_access.h                   |  4 ++--
>>  xen/include/xen/irq.h                            |  2 +-
>>  xen/include/xen/self-tests.h                     |  8 ++++----
>>  6 files changed, 22 insertions(+), 12 deletions(-)
>>
>> -- 
>> 2.34.1
>>
Oleksii Kurochko June 26, 2024, 5:42 p.m. UTC | #3
On Tue, 2024-06-25 at 08:39 +0200, Jan Beulich wrote:
> On 25.06.2024 02:47, Stefano Stabellini wrote:
> > I would like to ask for a release-ack as the patch series makes
> > very few
> > changes outside of the static analysis configuration. The few
> > changes to
> > the Xen code are very limited, straightforward and makes the code
> > better, see patch #3 and #5.
> 
> While continuing to touch automation/ may be okay, I really think
> time has
> passed for further Misra changes in 4.19, unless they're fixing
> actual bugs
> of course. Just my personal view though ...
I am not quite sure I understand the concern. From my perspective, the
patch series addresses several MISRA violations without introducing any
functional changes. It seems safe to incorporate these MISRA changes
even at this stage of the release.

~ Oleksii
> 
> Jan
> 
> > On Mon, 17 Jun 2024, Nicola Vetrini wrote:
> > > Hi all,
> > > 
> > > this series addresses several violations of Rule 20.7, as well as
> > > a
> > > small fix to the ECLAIR integration scripts that do not influence
> > > the current behaviour, but were mistakenly part of the upstream
> > > configuration.
> > > 
> > > Note that by applying this series the rule has a few leftover
> > > violations.
> > > Most of those are in x86 code in xen/arch/x86/include/asm/msi.h .
> > > I did send a patch [1] to deal with those, limited only to
> > > addressing the MISRA
> > > violations, but in the end it was dropped in favour of a more
> > > general cleanup of
> > > the file upon agreement, so this is why those changes are not
> > > included here.
> > > 
> > > [1]
> > > https://lore.kernel.org/xen-devel/2f2c865f20d0296e623f1d65bed25c083f5dd497.1711700095.git.nicola.vetrini@bugseng.com/
> > > 
> > > Changes in v2:
> > > - refactor patch 4 to deviate the pattern, instead of fixing the
> > > violations
> > > - The series has been resent because I forgot to properly Cc the
> > > mailing list
> > > 
> > > Nicola Vetrini (6):
> > >   automation/eclair: address violations of MISRA C Rule 20.7
> > >   xen/self-tests: address violations of MISRA rule 20.7
> > >   xen/guest_access: address violations of MISRA rule 20.7
> > >   automation/eclair_analysis: address violations of MISRA C Rule
> > > 20.7
> > >   x86/irq: address violations of MISRA C Rule 20.7
> > >   automation/eclair_analysis: clean ECLAIR configuration scripts
> > > 
> > >  automation/eclair_analysis/ECLAIR/analyze.sh     |  3 +--
> > >  automation/eclair_analysis/ECLAIR/deviations.ecl | 14
> > > ++++++++++++--
> > >  docs/misra/deviations.rst                        |  3 ++-
> > >  xen/include/xen/guest_access.h                   |  4 ++--
> > >  xen/include/xen/irq.h                            |  2 +-
> > >  xen/include/xen/self-tests.h                     |  8 ++++----
> > >  6 files changed, 22 insertions(+), 12 deletions(-)
> > > 
> > > -- 
> > > 2.34.1
> > > 
>
Stefano Stabellini June 27, 2024, 1:22 a.m. UTC | #4
On Wed, 26 Jun 2024, oleksii.kurochko@gmail.com wrote:
> On Tue, 2024-06-25 at 08:39 +0200, Jan Beulich wrote:
> > On 25.06.2024 02:47, Stefano Stabellini wrote:
> > > I would like to ask for a release-ack as the patch series makes
> > > very few
> > > changes outside of the static analysis configuration. The few
> > > changes to
> > > the Xen code are very limited, straightforward and makes the code
> > > better, see patch #3 and #5.
> > 
> > While continuing to touch automation/ may be okay, I really think
> > time has
> > passed for further Misra changes in 4.19, unless they're fixing
> > actual bugs
> > of course. Just my personal view though ...
> I am not quite sure I understand the concern. From my perspective, the
> patch series addresses several MISRA violations without introducing any
> functional changes. It seems safe to incorporate these MISRA changes
> even at this stage of the release.

I agree with you but I guess Jan's point is that every change even small
could introduce a regression. This is your decision.

This is the updated version:
https://marc.info/?l=xen-devel&m=171940854121984
Jan Beulich June 27, 2024, 7:54 a.m. UTC | #5
On 26.06.2024 19:42, oleksii.kurochko@gmail.com wrote:
> On Tue, 2024-06-25 at 08:39 +0200, Jan Beulich wrote:
>> On 25.06.2024 02:47, Stefano Stabellini wrote:
>>> I would like to ask for a release-ack as the patch series makes
>>> very few
>>> changes outside of the static analysis configuration. The few
>>> changes to
>>> the Xen code are very limited, straightforward and makes the code
>>> better, see patch #3 and #5.
>>
>> While continuing to touch automation/ may be okay, I really think
>> time has
>> passed for further Misra changes in 4.19, unless they're fixing
>> actual bugs
>> of course. Just my personal view though ...
> I am not quite sure I understand the concern. From my perspective, the
> patch series addresses several MISRA violations without introducing any
> functional changes. It seems safe to incorporate these MISRA changes
> even at this stage of the release.

It's your call in the end. Seeing we're not even at RC1 yet (which I had
long expected us to be past), perhaps I'm overly concerned.

Jan
Oleksii Kurochko June 27, 2024, 9:44 a.m. UTC | #6
On Mon, 2024-06-24 at 17:47 -0700, Stefano Stabellini wrote:
> Hi Oleksii,
> 
> I would like to ask for a release-ack as the patch series makes very
> few
> changes outside of the static analysis configuration. The few changes
> to
> the Xen code are very limited, straightforward and makes the code
> better, see patch #3 and #5.
Release-Acked-by: Oleksii Kurochko <oleksii.kurochko@gmail.com>

~ Oleksii
> 
> 
> On Mon, 17 Jun 2024, Nicola Vetrini wrote:
> > Hi all,
> > 
> > this series addresses several violations of Rule 20.7, as well as a
> > small fix to the ECLAIR integration scripts that do not influence
> > the current behaviour, but were mistakenly part of the upstream
> > configuration.
> > 
> > Note that by applying this series the rule has a few leftover
> > violations.
> > Most of those are in x86 code in xen/arch/x86/include/asm/msi.h .
> > I did send a patch [1] to deal with those, limited only to
> > addressing the MISRA
> > violations, but in the end it was dropped in favour of a more
> > general cleanup of
> > the file upon agreement, so this is why those changes are not
> > included here.
> > 
> > [1]
> > https://lore.kernel.org/xen-devel/2f2c865f20d0296e623f1d65bed25c083f5dd497.1711700095.git.nicola.vetrini@bugseng.com/
> > 
> > Changes in v2:
> > - refactor patch 4 to deviate the pattern, instead of fixing the
> > violations
> > - The series has been resent because I forgot to properly Cc the
> > mailing list
> > 
> > Nicola Vetrini (6):
> >   automation/eclair: address violations of MISRA C Rule 20.7
> >   xen/self-tests: address violations of MISRA rule 20.7
> >   xen/guest_access: address violations of MISRA rule 20.7
> >   automation/eclair_analysis: address violations of MISRA C Rule
> > 20.7
> >   x86/irq: address violations of MISRA C Rule 20.7
> >   automation/eclair_analysis: clean ECLAIR configuration scripts
> > 
> >  automation/eclair_analysis/ECLAIR/analyze.sh     |  3 +--
> >  automation/eclair_analysis/ECLAIR/deviations.ecl | 14
> > ++++++++++++--
> >  docs/misra/deviations.rst                        |  3 ++-
> >  xen/include/xen/guest_access.h                   |  4 ++--
> >  xen/include/xen/irq.h                            |  2 +-
> >  xen/include/xen/self-tests.h                     |  8 ++++----
> >  6 files changed, 22 insertions(+), 12 deletions(-)
> > 
> > -- 
> > 2.34.1
> >