From: Dmytro Prokopchuk1 <dmytro_prokopchuk1@epam.com>
To: Jan Beulich <jbeulich@suse.com>,
Nicola Vetrini <nicola.vetrini@bugseng.com>
Cc: "xen-devel@lists.xenproject.org" <xen-devel@lists.xenproject.org>,
"Doug Goldstein" <cardoe@cardoe.com>,
"Stefano Stabellini" <sstabellini@kernel.org>,
"Andrew Cooper" <andrew.cooper3@citrix.com>,
"Anthony PERARD" <anthony.perard@vates.tech>,
"Michal Orzel" <michal.orzel@amd.com>,
"Julien Grall" <julien@xen.org>,
"Roger Pau Monné" <roger@xenproject.org>
Subject: Re: [PATCH] automation/eclair: generalize the noreturn function-pointer deviation
Date: Tue, 13 Oct 2026 07:29:20 +0000 [thread overview]
Message-ID: <0836fc6d-e2e7-4977-a0ec-c66671b75a62@epam.com> (raw)
In-Reply-To: <96319798-7cf6-4905-9b1b-37bb6a41bdcd@suse.com>
On 10/12/26 09:52, Jan Beulich wrote:
> On 09.10.2026 17:37, Nicola Vetrini wrote:
>> On 2026-10-05 20:56, Dmytro Prokopchuk1 wrote:
>>> The R11.1 safe cast only matched void noreturn (*)(void *). Accept any
>>> noreturn function pointer converted to a compatible function pointer.
>>> canonical() covers typeof destinations, and compatible_deep_unqualified
>>> keeps the parameter and return types aligned.
>>>
>>> Signed-off-by: Dmytro Prokopchuk <dmytro_prokopchuk1@epam.com>
>>> ---
>>>
>>> This patch tries to cover both of these:
>>>
>>> 1. eclair: widen R11.1 noreturn cast deviation
>>> https://patchew.org/Xen/c6632dd805a119aca54b9d1ae2eea68ef9c1334c.1790674358.git.dmytro._5Fprokopchuk1@epam.com/
>>>
>>> 2. Eclair: relax "noreturn" function-pointer conversion deviation
>>> https://patchew.org/Xen/6d212d60-5c0b-4909-996d-5d6a4906b7e1@suse.com/4cca58b6-b555-4064-aa26-5204dc4b99cc@suse.com/
>>>
>>> Test CI pipeline:
>>> https://gitlab.com/xen-project/people/dimaprkp4k/xen/-/pipelines/2914802667
>>>
>>> The only one Rule11.1 violation remains, which is covered by this Jan's
>>> patch:
>>> x86/kexec: address Misra rule 11.1 violation in machine_kexec_load()
>>>
>>
>> The change itself is fine, but the aspect I'm concerned with is the
>> following: if you have a function marked noreturn, the compiler is
>> entitled to
>> essentially remove any code following it, so in principle this could be
>> the case also when invoking a function pointer (i.e. the compiler has no
>> obligation to retain code after a call to a function pointer that is
>> actually a noreturn function). While this in practice may not happen
>> often (e.g., the analysis done by a compiler is probably too shallow to
>> actually infer paths where the function pointer is only ever assigned to
>> noreturn functions when it is called), it is still not completely true
>> to say that the behavior is not altered by casting away noreturn.
>
> With "behavior" here you mean that of the compiler? Because Xen's behavior
> won't change if the code following such an indirect call isn't eliminated.
> It will "just" be unreachable code then.
>
> That said, ...
>
>> I have
>> given in [1] my R-by to the previous form of this deviation, but I
>> realize that this aspect should be mentioned. This is of course
>> supported by testing and code coverage evidence that the behavior is
>> indeed the same, or a suitable guarantee from the compiler vendor that
>> the behavior never diverges.
>
> ... making this explicit in the patch and/or deviation description is of
> course not going to hurt.
>
> Jan
Hi Nicola, Jan,
Thank you for the review.
In the next version I will update the deviation text. The ECLAIR's
configuration stays unchanged.
BR, Dmytro
next prev parent reply other threads:[~2026-10-13 7:29 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-05 18:56 [PATCH] automation/eclair: generalize the noreturn function-pointer deviation Dmytro Prokopchuk1
2026-10-06 6:09 ` Jan Beulich
2026-10-09 15:37 ` Nicola Vetrini
2026-10-12 6:52 ` Jan Beulich
2026-10-13 7:29 ` Dmytro Prokopchuk1 [this message]
2026-10-13 11:46 ` Nicola Vetrini
2026-10-13 12:37 ` Jan Beulich
2026-10-13 12:52 ` 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=0836fc6d-e2e7-4977-a0ec-c66671b75a62@epam.com \
--to=dmytro_prokopchuk1@epam.com \
--cc=andrew.cooper3@citrix.com \
--cc=anthony.perard@vates.tech \
--cc=cardoe@cardoe.com \
--cc=jbeulich@suse.com \
--cc=julien@xen.org \
--cc=michal.orzel@amd.com \
--cc=nicola.vetrini@bugseng.com \
--cc=roger@xenproject.org \
--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.