All of lore.kernel.org
 help / color / mirror / Atom feed
From: Nicola Vetrini <nicola.vetrini@bugseng.com>
To: Stefano Stabellini <sstabellini@kernel.org>
Cc: Julien Grall <julien@xen.org>,
	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,
	Simone Ballarin <simone.ballarin@bugseng.com>,
	Doug Goldstein <cardoe@cardoe.com>,
	George Dunlap <george.dunlap@citrix.com>, Wei Liu <wl@xen.org>
Subject: Re: [XEN PATCH][for-4.19 1/2] xen: introduce a deviation for Rule 11.9
Date: Tue, 10 Oct 2023 11:54:24 +0200	[thread overview]
Message-ID: <7168dfb8bcfae953c0d65fe05699ca9b@bugseng.com> (raw)
In-Reply-To: <alpine.DEB.2.22.394.2310061730460.3431292@ubuntu-linux-20-04-desktop>

On 07/10/2023 02:33, Stefano Stabellini wrote:
> On Fri, 6 Oct 2023, Julien Grall wrote:
>> On 06/10/2023 10:58, Nicola Vetrini wrote:
>> > On 06/10/2023 11:27, Julien Grall wrote:
>> > > Hi,
>> > >
>> > > On 05/10/2023 09:45, Nicola Vetrini wrote:
>> > > > The constant 0 is used instead of NULL in '__ACCESS_ONCE' as a
>> > > > compile-time check to detect non-scalar types; its usage for this
>> > > > purpose is documented in rules.rst as an exception.
>> > > Documenting ACCESS_ONCE() in rules.rst seems a bit odd. I am guessing
>> > > that other analysis tool may point out the same error and therefore it
>> > > would seem more appropriate to use a deviation.
>> > >
>> > > This would also avoid having a specific rule in the Eclair
>> > > configuration for __ACCESS_ONCE().
>> > >
>> >
>> > I figured a single accepted use would benefit from an explicit exclusion.
>> > I can rework it to use an in-code comment to deviate, in whatever form that
>> > comment may be
>> > (still with some bits of ECLAIR-specific configuration anyway, as discussed
>> > for R2.1).
>> 
>> I think it would be preferrable to have a deviation in the code. This 
>> would be
>> helpful for other analysis tools.
> 
> Yes exactly, see my reply:
> https://marc.info/?l=xen-devel&m=169663696228889
> 
> I know I acked the patch but I agree with Julien. A deviation as an
> in-code comment (SAF-x-safe) is always the best option. If that doesn't
> work, we cannot keep adding stuff in the notes section of rules.rst. It
> doesn't scale. We should create a new document, like deviations.rst, or
> add a new section at the bottom of documenting-violations.rst or
> possibly safe.json.

I'll rebase this patch with an entry in deviations.rst, so that this 
applies to staging
cleanly.

-- 
Nicola Vetrini, BSc
Software Engineer, BUGSENG srl (https://bugseng.com)


  reply	other threads:[~2023-10-10  9:54 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-10-05  8:45 [XEN PATCH][for-4.19 0/2] address violations of MISRA C:2012 Rule 11.9 Nicola Vetrini
2023-10-05  8:45 ` [XEN PATCH][for-4.19 1/2] xen: introduce a deviation for " Nicola Vetrini
2023-10-06  1:06   ` Stefano Stabellini
2023-10-06  9:27   ` Julien Grall
2023-10-06  9:58     ` Nicola Vetrini
2023-10-06 12:33       ` Julien Grall
2023-10-07  0:33         ` Stefano Stabellini
2023-10-10  9:54           ` Nicola Vetrini [this message]
2023-10-05  8:45 ` [XEN PATCH][for-4.19 2/2] xen/spinlock: fix use of 0 as a null pointer constant Nicola Vetrini
2023-10-06  1:07   ` Stefano Stabellini
2023-10-06 19:16     ` andrew.cooper3

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=7168dfb8bcfae953c0d65fe05699ca9b@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.