From: Nicola Vetrini <nicola.vetrini@bugseng.com>
To: Stefano Stabellini <sstabellini@kernel.org>
Cc: xen-devel@lists.xenproject.org, michal.orzel@amd.com,
xenia.ragiadakou@amd.com, ayan.kumar.halder@amd.com,
consulting@bugseng.com, jbeulich@suse.com,
andrew.cooper3@citrix.com, roger.pau@citrix.com,
George Dunlap <george.dunlap@citrix.com>,
Julien Grall <julien@xen.org>, Wei Liu <wl@xen.org>,
Henry.Wang@arm.com
Subject: Re: [XEN PATCH][for-4.19 v2 2/2] docs/misra: add deviations.rst to document additional deviations.
Date: Tue, 10 Oct 2023 10:23:09 +0200 [thread overview]
Message-ID: <a5635fc5e51518c205d776ac8a9600ba@bugseng.com> (raw)
In-Reply-To: <alpine.DEB.2.22.394.2310091811190.3431292@ubuntu-linux-20-04-desktop>
On 10/10/2023 03:19, Stefano Stabellini wrote:
> +Henry
>
> On Mon, 9 Oct 2023, Nicola Vetrini wrote:
>> This file contains the deviation that are not marked by
>> a deviation comment, as specified in
>> docs/misra/documenting-violations.rst.
>>
>> Suggested-by: Stefano Stabellini <sstabellini@kernel.org>
>> Signed-off-by: Nicola Vetrini <nicola.vetrini@bugseng.com>
>
> This is great! Thank you so much!
>
> I have a few questions below but even as-is it is way better than
> nothing. I think we should add this for 4.18
>
>
>> ---
>> docs/index.rst | 1 +
>> docs/misra/deviations.rst | 240
>> ++++++++++++++++++++++++++++++++++++++
>> docs/misra/rules.rst | 2 +-
>> 3 files changed, 242 insertions(+), 1 deletion(-)
>> create mode 100644 docs/misra/deviations.rst
>>
>> diff --git a/docs/index.rst b/docs/index.rst
>> index 2c47cfa999f2..f3f779f89ce5 100644
>> --- a/docs/index.rst
>> +++ b/docs/index.rst
>> @@ -63,6 +63,7 @@ Xen hypervisor code.
>> :maxdepth: 2
>>
>> misra/rules
>> + misra/deviations
>>
>>
>> Miscellanea
>> diff --git a/docs/misra/deviations.rst b/docs/misra/deviations.rst
>> new file mode 100644
>> index 000000000000..19743e34ce03
>> --- /dev/null
>> +++ b/docs/misra/deviations.rst
>> @@ -0,0 +1,240 @@
>> +.. SPDX-License-Identifier: CC-BY-4.0
>> +
>> +MISRA C deviations for Xen
>> +==========================
>> +
>> +The following is the list of MISRA C:2012 deviations for the Xen
>> codebase that
>> +are not covered by a `SAF-x-safe` or `SAF-x-false-positive-<tool>`
>> comment, as
>> +specified in docs/misra/documenting-violations.rst; the lack of
>> +such comments is usually due to the excessive clutter they would
>> bring to the
>> +codebase or the impossibility to express such a deviation (e.g., if
>> it's
>> +composed of several conditions).
>> +
>> +Deviations related to MISRA C:2012 Directives:
>> +----------------------------------------------
>> +
>> +.. list-table::
>> + :header-rows: 1
>> +
>> + * - Directive identifier
>> + - Justification
>> + - Notes
>> +
>> + * - D4.3
>> + - Accepted for the ARM64 codebase
>> + - Tagged as `disapplied` for ECLAIR on any other violation
>> report.
>
> This mean it has been applied for ARM64 but not x86, right?
>
>
Yes.
>> + * - D4.3
>> + - The inline asm in 'xen/arch/arm/arm64/lib/bitops.c' is tightly
>> coupled
>> + with the surronding C code that acts as a wrapper, so it has
>> been decided
>> + not to add an additional encapsulation layer.
>> + - Tagged as `deliberate` for ECLAIR.
>> +
>> +Deviations related to MISRA C:2012 Rules:
>> +-----------------------------------------
>> +
>> +.. list-table::
>> + :header-rows: 1
>> +
>> + * - Rule identifier
>> + - Justification
>> + - Notes
>> +
>> + * - R2.1
>> + - The compiler implementation guarantees that the unreachable
>> code is
>> + removed. Constant expressions and unreachable branches of if
>> and switch
>> + statements are expected.
>> + - Tagged as `safe` for ECLAIR.
>> +
>> + * - R2.1
>> + - Some functions are intended not to be referenced.
>> + - Tagged as `deliberate` for ECLAIR.
>
> What does it mean "some functions" in this case? Should we list which
> functions?
>
Well, there are a lot, typically resulting from build configurations
that do not
use them, or because they are used only in asm code. I can mention these
reasons in the
document, to make it easier to understand.
> Other than this, I checked and everything else looks great
--
Nicola Vetrini, BSc
Software Engineer, BUGSENG srl (https://bugseng.com)
next prev parent reply other threads:[~2023-10-10 8:23 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-10-09 15:44 [XEN PATCH][for-4.19 v2 0/2] update ecl configurations and deviations Nicola Vetrini
2023-10-09 15:44 ` [XEN PATCH][for-4.19 v2 1/2] automation/eclair: update deviations and accepted guidelines Nicola Vetrini
2023-10-10 1:20 ` Stefano Stabellini
2023-10-09 15:44 ` [XEN PATCH][for-4.19 v2 2/2] docs/misra: add deviations.rst to document additional deviations Nicola Vetrini
2023-10-10 1:19 ` Stefano Stabellini
2023-10-10 1:21 ` Henry Wang
2023-10-10 8:23 ` Nicola Vetrini [this message]
2023-10-10 22:27 ` Stefano Stabellini
2023-10-11 13:04 ` Julien Grall
2023-10-11 15:00 ` Nicola Vetrini
2023-10-11 15:04 ` Nicola Vetrini
2023-10-11 16:04 ` Nicola Vetrini
2023-10-12 23:14 ` Stefano Stabellini
2023-10-13 8:26 ` 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=a5635fc5e51518c205d776ac8a9600ba@bugseng.com \
--to=nicola.vetrini@bugseng.com \
--cc=Henry.Wang@arm.com \
--cc=andrew.cooper3@citrix.com \
--cc=ayan.kumar.halder@amd.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=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.