All of lore.kernel.org
 help / color / mirror / Atom feed
From: Nicola Vetrini <nicola.vetrini@bugseng.com>
To: Jan Beulich <jbeulich@suse.com>
Cc: Stefano Stabellini <stefano.stabellini@amd.com>,
	sstabellini@kernel.org, michal.orzel@amd.com,
	xenia.ragiadakou@amd.com, ayan.kumar.halder@amd.com,
	consulting@bugseng.com, xen-devel@lists.xenproject.org
Subject: Re: [XEN PATCH v2] automation/eclair_analysis: deviate linker symbols for Rule 18.2
Date: Tue, 10 Sep 2024 10:18:58 +0200	[thread overview]
Message-ID: <4423feb68c0d94bef0fdf79e0cb8feab@bugseng.com> (raw)
In-Reply-To: <c10ce0ba-dd51-4d3e-8ab9-62ee1b39cd31@suse.com>

On 2024-09-10 08:26, Jan Beulich wrote:
> On 10.09.2024 06:46, Stefano Stabellini wrote:
>> On Mon, 9 Sep 2024, Jan Beulich wrote:
>>> On 07.09.2024 15:03, Nicola Vetrini wrote:
>>>> +   * - R18.2
>>>> +     - Subtraction between pointers encapsulated by macro 
>>>> page_to_mfn
>>>> +       are safe.
>>>> +     - Tagged as `safe` for ECLAIR.
>>> 
>>> This one is a result of using frame_table[], aiui. Alternative 
>>> approaches
>>> were discussed before. Did that not lead anywhere, requiring a purely
>>> textual / configurational deviation?
>> 
>> During the last MISRA discussion we agree that this was an acceptable
>> approach. What else did you have in mind?
> 
> One was to have the linker scripts provide the symbol. I think there 
> were
> one or two more, yet I - perhaps wrongly - haven't been taking notes 
> ...
> 

One thing I'm fairly sure has been suggested for symbols that were not 
linker-defined is the following mitigation:

gcc -fsanitize=address,pointer-subtract
ASAN_OPTIONS=detect_invalid_pointer_pairs=2 ./a.out

See GCC manual Section "3.12 Program Instrumentation Options"
https://gcc.gnu.org/onlinedocs/gcc-12.1.0/gcc.pdf


>> In any case, keep in mind that
>> exploring options is a task in itself and we could use our efforts on
>> reducing the numbers of violations instead which I think is more 
>> useful.
> 
> Sure. Otoh quickest is not always best.
> 


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


  reply	other threads:[~2024-09-10  8:19 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-09-07 13:03 [XEN PATCH v2] automation/eclair_analysis: deviate linker symbols for Rule 18.2 Nicola Vetrini
2024-09-07 13:06 ` Nicola Vetrini
2024-09-09  9:59 ` Jan Beulich
2024-09-10  4:46   ` Stefano Stabellini
2024-09-10  6:26     ` Jan Beulich
2024-09-10  8:18       ` Nicola Vetrini [this message]
2024-09-10  8:20         ` Jan Beulich
2024-09-11  5:28           ` Stefano Stabellini

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=4423feb68c0d94bef0fdf79e0cb8feab@bugseng.com \
    --to=nicola.vetrini@bugseng.com \
    --cc=ayan.kumar.halder@amd.com \
    --cc=consulting@bugseng.com \
    --cc=jbeulich@suse.com \
    --cc=michal.orzel@amd.com \
    --cc=sstabellini@kernel.org \
    --cc=stefano.stabellini@amd.com \
    --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.