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, andrew.cooper3@citrix.com,
roger.pau@citrix.com,
Simone Ballarin <simone.ballarin@bugseng.com>,
Doug Goldstein <cardoe@cardoe.com>,
George Dunlap <george.dunlap@citrix.com>,
Julien Grall <julien@xen.org>, Wei Liu <wl@xen.org>,
xen-devel@lists.xenproject.org
Subject: Re: [XEN PATCH][for-4.19 v2] xen: Add SAF deviations for MISRA C:2012 Rule 7.1
Date: Mon, 23 Oct 2023 10:44:16 +0200 [thread overview]
Message-ID: <564217259e2f65e34d3497697bd5f9e5@bugseng.com> (raw)
In-Reply-To: <23f2682f-acc4-20aa-21fc-644a3c1141b5@suse.com>
>>>> 3. an use of MASK_EXTR() in x86/hvm/svm/emulate.c appears, with
>>>> octal
>>>> constants in the expansion. This will be deviated;
>>>
>>> This is what I'm concerned of: How do you know up front whether such
>>> new
>>> uses want deviating?
>>
>> I understand you concern now. I can argue that all the macros in that
>> table have indeed
>> an octal constant in their definition (0 is explicitly allowed by
>> MISRA).
>> This is also specified in the comment above the INSTR_ENC macro
>> definition, therefore any
>> new addition should have an octal the second argument to INSTR_ENC.
>
> Right, and I previously indicated I agree as far as INSTR_ENC() goes.
> What we appear to continue to disagree about is MASK_EXTR().
>
Yeah, sorry. What about
if ( modrm_mod == MASK_EXTR(instr_modrm, 0300) && /* octal-ok */
(modrm_reg & 7) == MASK_EXTR(instr_modrm, 0070) && /* octal-ok */
(modrm_rm & 7) == MASK_EXTR(instr_modrm, 0007) ) /* octal-ok */
return emul_len;
It does not really fit in the SAF framework, because the deviation is
still done with a
configuration, but at least it gives some clear indication on how to
introduce an octal
constant in this file.
--
Nicola Vetrini, BSc
Software Engineer, BUGSENG srl (https://bugseng.com)
next prev parent reply other threads:[~2023-10-23 8:44 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-10-19 11:04 [XEN PATCH][for-4.19 v2] xen: Add SAF deviations for MISRA C:2012 Rule 7.1 Nicola Vetrini
2023-10-19 15:57 ` Jan Beulich
2023-10-19 16:34 ` Nicola Vetrini
2023-10-20 6:38 ` Jan Beulich
2023-10-20 10:33 ` Nicola Vetrini
2023-10-20 13:24 ` Jan Beulich
2023-10-20 14:58 ` Nicola Vetrini
2023-10-23 6:34 ` Jan Beulich
2023-10-23 8:03 ` Nicola Vetrini
2023-10-23 8:17 ` Jan Beulich
2023-10-23 8:44 ` Nicola Vetrini [this message]
2023-10-23 8:46 ` Nicola Vetrini
2023-10-23 8:47 ` Jan Beulich
2023-10-23 9:10 ` 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=564217259e2f65e34d3497697bd5f9e5@bugseng.com \
--to=nicola.vetrini@bugseng.com \
--cc=andrew.cooper3@citrix.com \
--cc=ayan.kumar.halder@amd.com \
--cc=cardoe@cardoe.com \
--cc=consulting@bugseng.com \
--cc=george.dunlap@citrix.com \
--cc=jbeulich@suse.com \
--cc=julien@xen.org \
--cc=michal.orzel@amd.com \
--cc=roger.pau@citrix.com \
--cc=simone.ballarin@bugseng.com \
--cc=sstabellini@kernel.org \
--cc=wl@xen.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.