From: Nicola Vetrini <nicola.vetrini@bugseng.com>
To: Jan Beulich <jbeulich@suse.com>
Cc: sstabellini@kernel.org, consulting@bugseng.com,
dmytro_prokopchuk1@epam.com, andrew.cooper3@citrix.com,
Doug Goldstein <cardoe@cardoe.com>,
xen-devel@lists.xenproject.org
Subject: Re: [XEN PATCH 2/2] Address violation of MISRA C Rule 13.1 involving asm side effects.
Date: Thu, 14 Aug 2025 19:49:07 +0200 [thread overview]
Message-ID: <2994bb7cfe2b0a5f86876a3ead64bdff@bugseng.com> (raw)
In-Reply-To: <0b55d5f9-35ad-4598-94ab-1aa4991c0e3a@suse.com>
On 2025-08-14 09:36, Jan Beulich wrote:
> On 08.08.2025 23:40, Nicola Vetrini wrote:
>> --- a/automation/eclair_analysis/ECLAIR/deviations.ecl
>> +++ b/automation/eclair_analysis/ECLAIR/deviations.ecl
>> @@ -437,6 +437,10 @@ write or not"
>> # Series 13
>> #
>>
>> +-doc_begin="Consider the asm instruction to read an Arm system
>> register to have no side effects."
>> +-asm_properties+={"asm(any())&&child(text,
>> ast_field(value,^mrs\\s+%0.*$))", {no_side_effect}}
>> +-doc_end
>
> Is this actually strict enough to not allow multiple instructions in
> the asm(),
> where some of the others would yield side effects we actually need to
> respect?
>
> Jan
Good point, I didn't think of that. As it is, there is only one MRS asm,
so no worries here, but in general the remark is valid. The regex could
be a bit stricter, though the real solution here would be to match the
context in which this asm is present to limit the scope of the
deviation. This does not make much sense for an asm property because the
properties of an asm statement (at the level of granularity targeted by
ECLAIR) can be derived mostly in isolation from the surrounding code.
Another improvement we are pursuing is allowing single effects in
init-list-exprs, but it will take a bit of time to surface (i.e., next
major release probably).
--
Nicola Vetrini, B.Sc.
Software Engineer
BUGSENG (https://bugseng.com)
LinkedIn: https://www.linkedin.com/in/nicola-vetrini-a42471253
next prev parent reply other threads:[~2025-08-14 17:49 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-08-08 21:40 [XEN PATCH 1/2] automation/eclair: ECLAIR configuration changes due to GitLab runner update Nicola Vetrini
2025-08-08 21:40 ` [XEN PATCH 2/2] Address violation of MISRA C Rule 13.1 involving asm side effects Nicola Vetrini
2025-08-13 7:41 ` Dmytro Prokopchuk1
2025-08-13 7:46 ` Nicola Vetrini
2025-08-14 7:36 ` Jan Beulich
2025-08-14 17:49 ` Nicola Vetrini [this message]
2025-08-15 19:51 ` Stefano Stabellini
2025-08-08 21:43 ` [XEN PATCH 1/2] automation/eclair: ECLAIR configuration changes due to GitLab runner update Andrew Cooper
2025-08-08 21:48 ` Nicola Vetrini
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=2994bb7cfe2b0a5f86876a3ead64bdff@bugseng.com \
--to=nicola.vetrini@bugseng.com \
--cc=andrew.cooper3@citrix.com \
--cc=cardoe@cardoe.com \
--cc=consulting@bugseng.com \
--cc=dmytro_prokopchuk1@epam.com \
--cc=jbeulich@suse.com \
--cc=sstabellini@kernel.org \
--cc=xen-devel@lists.xenproject.org \
/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.