From: Nicola Vetrini <nicola.vetrini@bugseng.com>
To: Jan Beulich <jbeulich@suse.com>
Cc: sstabellini@kernel.org, michal.orzel@amd.com,
xenia.ragiadakou@amd.com, ayan.kumar.halder@amd.com,
consulting@bugseng.com,
Simone Ballarin <simone.ballarin@bugseng.com>,
Doug Goldstein <cardoe@cardoe.com>,
xen-devel@lists.xenproject.org
Subject: Re: [XEN PATCH 4/5] automation/eclair_analysis: address remaining violations of MISRA C Rule 20.12
Date: Mon, 03 Jun 2024 21:12:44 +0200 [thread overview]
Message-ID: <017a3e69ef784eb919a96a06b0fcf0dc@bugseng.com> (raw)
In-Reply-To: <cb14826d-3c5c-45b8-aaea-30cfa85a450f@suse.com>
On 2024-06-03 20:52, Jan Beulich wrote:
> On 03.06.2024 09:13, Nicola Vetrini wrote:
>> On 2024-06-03 07:58, Jan Beulich wrote:
>>> On 01.06.2024 12:16, Nicola Vetrini wrote:
>>>> --- a/automation/eclair_analysis/ECLAIR/deviations.ecl
>>>> +++ b/automation/eclair_analysis/ECLAIR/deviations.ecl
>>>> @@ -483,6 +483,12 @@ leads to a violation of the Rule are deviated."
>>>> -config=MC3R1.R20.12,macros+={deliberate,
>>>> "name(GENERATE_CASE)&&loc(file(deliberate_generate_case))"}
>>>> -doc_end
>>>>
>>>> +-doc_begin="The macro DEFINE is defined and used in excluded files
>>>> asm-offsets.c.
>>>> +This may still cause violations if entities outside these files are
>>>> referred to
>>>> +in the expansion."
>>>> +-config=MC3R1.R20.12,macros+={deliberate,
>>>> "name(DEFINE)&&loc(file(asm_offsets))"}
>>>> +-doc_end
>>>
>>> Can you give an example of such a reference? Nothing _in_
>>> asm-offsets.c
>>> should be referenced, I'd think. Only stuff in asm-offsets.h as
>>> _generated
>>> from_ asm-offsets.c will, of course, be.
>>>
>>
>> Perhaps I could have expressed that more clearly. What I meant is that
>> there are some arguments to DEFINE that are not part of asm-offsets.c,
>> therefore they end up in the violation report, but are not actually
>> relevant, because the macro DEFINE is actually what we want to
>> exclude.
>>
>> See for instance at the link below VCPU_TRAP_{NMI,MCE}, which are
>> defined in asm/domain.h and used as arguments to DEFINE inside
>> asm-offsets.c.
>>
>> https://saas.eclairit.com:3787/fs/var/local/eclair/XEN.ecdf/ECLAIR_normal/staging/X86_64-BUGSENG/676/PROJECT.ecd;/by_service/MC3R1.R20.12.html
>
> I'm afraid I still don't understand: The file being supposed to be
> excluded from scanning, why does it even show up in that report?
>
> Jan
The report is made up of several source code locations. Three of them
are within asm-offsets.c, which is excluded from compliance but still
analyzed, but one references a macro definition in another file (e.g.,
VCPU_TRAP_NMI from asm/domain.h). So in this case the exclusion of
asm-offsets.c is not enough for the report not to be shown.
The configuration is telling the tool that the macro DEFINE from
asm-offsets is meant to be deviated, which is what is needed in this
case.
--
Nicola Vetrini, BSc
Software Engineer, BUGSENG srl (https://bugseng.com)
next prev parent reply other threads:[~2024-06-03 19:13 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-06-01 10:16 [XEN PATCH 0/5] address violations of MISRA C rules Nicola Vetrini
2024-06-01 10:16 ` [XEN PATCH 1/5] xen/domain: deviate violation of MISRA C Rule 20.12 Nicola Vetrini
2024-06-03 6:39 ` Jan Beulich
2024-06-03 13:21 ` Nicola Vetrini
2024-06-01 10:16 ` [XEN PATCH 2/5] x86/domain: " Nicola Vetrini
2024-06-04 5:58 ` Jan Beulich
2024-06-01 10:16 ` [XEN PATCH 3/5] x86: " Nicola Vetrini
2024-06-04 6:08 ` Jan Beulich
2024-06-07 14:34 ` Nicola Vetrini
2024-06-01 10:16 ` [XEN PATCH 4/5] automation/eclair_analysis: address remaining violations " Nicola Vetrini
2024-06-03 5:58 ` Jan Beulich
2024-06-03 7:13 ` Nicola Vetrini
2024-06-03 18:52 ` Jan Beulich
2024-06-03 19:12 ` Nicola Vetrini [this message]
2024-06-03 21:24 ` Jan Beulich
2024-06-03 21:37 ` Nicola Vetrini
2024-06-20 1:28 ` Stefano Stabellini
2024-06-01 10:16 ` [XEN PATCH 5/5] xen: fix MISRA regressions on rule 20.9 and 20.12 Nicola Vetrini
2024-06-01 12:47 ` Andrew Cooper
2024-06-01 12:58 ` Nicola Vetrini
2024-06-01 13:08 ` Andrew Cooper
2024-06-01 13:52 ` Nicola Vetrini
2024-06-01 14:01 ` Andrew Cooper
2024-06-01 14:37 ` [XEN PATCH 0/5] address violations of MISRA C rules Andrew Cooper
2024-06-01 17:19 ` Nicola Vetrini
2024-06-01 17:22 ` Andrew Cooper
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=017a3e69ef784eb919a96a06b0fcf0dc@bugseng.com \
--to=nicola.vetrini@bugseng.com \
--cc=ayan.kumar.halder@amd.com \
--cc=cardoe@cardoe.com \
--cc=consulting@bugseng.com \
--cc=jbeulich@suse.com \
--cc=michal.orzel@amd.com \
--cc=simone.ballarin@bugseng.com \
--cc=sstabellini@kernel.org \
--cc=xen-devel@lists.xenproject.org \
--cc=xenia.ragiadakou@amd.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.