From: Nicola Vetrini <nicola.vetrini@bugseng.com>
To: Jan Beulich <jbeulich@suse.com>
Cc: "Dmytro Prokopchuk1" <dmytro_prokopchuk1@epam.com>,
"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.pau@citrix.com>,
xen-devel@lists.xenproject.org
Subject: Re: [PATCH v4] misra: allow discarding 'noreturn' during conversions
Date: Fri, 01 Aug 2025 12:58:38 +0200 [thread overview]
Message-ID: <ab80c9d2e8840a6e84d58596064816cb@bugseng.com> (raw)
In-Reply-To: <4475f575-91df-4f9d-ad05-41a4864baa11@suse.com>
On 2025-08-01 12:53, Jan Beulich wrote:
> On 01.08.2025 12:48, Dmytro Prokopchuk1 wrote:
>> The conversion from a function pointer with the 'noreturn' attribute
>> ('void noreturn (*)(...)') to a function pointer type ('void (*)(...)'
>> causes type incompatibility according to MISRA C Rule 11.1, which
>> forbids conversions between incompatible function pointer types.
>
> This wider deviation ...
>
>> The violation occurs at the call site:
>> smp_call_function(halt_this_cpu, NULL, 0);
>> where 'halt_this_cpu' with type 'void noreturn (*)(void *)' is passed
>> to
>> 'smp_call_function' expecting function pointer of type 'void (*)(void
>> *)'.
>>
>> The 'noreturn' attribute does not change the function calling
>> convention
>> or parameter handling at runtime, making the conversion safe.
>>
>> Configure ECLAIR to treat implicit conversions that lose the
>> "noreturn"
>> attribute on a function 'void (*)(void*)' as safe.
>
> ... wants connecting to this more narrow Eclair configuration. That's
> what
> I meant when I said "description also suitably adjusted". For example,
> the
> last sentence above could start "For now, configure Eclair to just
> treat
> ...". Can adjust when committing, assuming an ack for the .ecl change
> appears.
>
>> Signed-off-by: Dmytro Prokopchuk <dmytro_prokopchuk1@epam.com>
>
> Acked-by: Jan Beulich <jbeulich@suse.com> # docs
Feels weird to review my own ecl honestly, but for the sake of the patch
I verified that it is indeed what I wrote, so
Reviewed-by: Nicola Vetrini <nicola.vetrini@bugseng.com> # ECLAIR
--
Nicola Vetrini, B.Sc.
Software Engineer
BUGSENG (https://bugseng.com)
LinkedIn: https://www.linkedin.com/in/nicola-vetrini-a42471253
next prev parent reply other threads:[~2025-08-01 10:58 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-08-01 10:48 [PATCH v4] misra: allow discarding 'noreturn' during conversions Dmytro Prokopchuk1
2025-08-01 10:53 ` Jan Beulich
2025-08-01 10:58 ` Nicola Vetrini [this message]
2025-08-01 11:22 ` Dmytro Prokopchuk1
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=ab80c9d2e8840a6e84d58596064816cb@bugseng.com \
--to=nicola.vetrini@bugseng.com \
--cc=andrew.cooper3@citrix.com \
--cc=anthony.perard@vates.tech \
--cc=cardoe@cardoe.com \
--cc=dmytro_prokopchuk1@epam.com \
--cc=jbeulich@suse.com \
--cc=julien@xen.org \
--cc=michal.orzel@amd.com \
--cc=roger.pau@citrix.com \
--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.