[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] automation/eclair: generalize the noreturn function-pointer deviation


  • To: Jan Beulich <jbeulich@xxxxxxxx>, Nicola Vetrini <nicola.vetrini@xxxxxxxxxxx>
  • From: Dmytro Prokopchuk1 <dmytro_prokopchuk1@xxxxxxxx>
  • Date: Tue, 13 Oct 2026 07:29:20 +0000
  • Accept-language: en-US, uk-UA, ru-RU
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=epam.com; dmarc=pass action=none header.from=epam.com; dkim=pass header.d=epam.com; arc=none
  • Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=ICvgrGM4OVsuwr7WIa2lr6J+OXZco05iJnrNESNsDjk=; b=iMntE/QcnlUjjz1HLGQ1nZsxMa2QaLpi2loHTVXPwNyFd9tHDbuSoQJelSTwBJmOD0qAXycNjYigXs7eYDoRq+m8TBkkAL/OfSaPKvr9s/oU4JP2yO7sLCrUYNisZY4hqE3XyUjtTD+ovWY/zJMufVUcABN9D5TaiGcrbdPju13faGuu6A5OrJCuyUjYq8R/sMumhIaL/VT8cJAiUUf3NxfWKKpf61zMC5VbVSl3bcrs3VHmAhKpU0FM8hVgm16mRUMzG3mP/2j7bYGgBeUNzc1ohgIA00LWOZOSU1jCktVJqDQT89RO/JYREByav4Vb2s2IrRzi7sH1eByANY0Jfg==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=PauyRwQhF8JveXxIhaORRZnJMBMjoc+Gw5d5PBuXRyZJN3czVRptxOLLaxiHHpxcohj2dpVkJ9YIl4E7pgKVJdiw+vyWvIN92fjo6/MBc4TH7d6/qR/0OqGacVutF2oaJ16Wyh/C2oT+vJWgNJT3MQPghnyY5lMimsH9tR9akFLlIC/rcXm57Rkt23w8YOx1DoTPUBsGDiKjSPKd4Mj3Z616e1wIgESONA70oqvi1oG9rR2+yH3/kLTVEUfdA1jhmGddGO4cByMvuatZ2pdQ+1RfuK+kUn6p+2juX+I5EzVUKhQ0bmkeLBAt7zmAW8KyukMySI46MnZm9fI2bhUwLg==
  • Authentication-results: eu.smtp.expurgate.cloud; dkim=pass header.s=selector1 header.d=epam.com header.i="@epam.com" header.h="From:Date:Subject:Message-ID:Content-Type:MIME-Version:x-ms-exchange-senderadcheck"
  • Authentication-results: mx.microsoft.com 1; dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=epam.com;
  • Cc: "xen-devel@xxxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxxx>, Doug Goldstein <cardoe@xxxxxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>, Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, Anthony PERARD <anthony.perard@xxxxxxxxxx>, Michal Orzel <michal.orzel@xxxxxxx>, Julien Grall <julien@xxxxxxx>, Roger Pau Monné <roger@xxxxxxxxxxxxxx>
  • Delivery-date: Tue, 13 Oct 2026 07:29:45 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
  • Thread-index: AQHdVPs3la7Yb/mPXkSleujSDB++zbb1XiyAgAQkOoCAAZzAAA==
  • Thread-topic: [PATCH] automation/eclair: generalize the noreturn function-pointer deviation


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@xxxxxxxx>
>>> ---
>>>
>>> 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@xxxxxxxx/
>>>
>>> 2. Eclair: relax "noreturn" function-pointer conversion deviation
>>> https://patchew.org/Xen/6d212d60-5c0b-4909-996d-5d6a4906b7e1@xxxxxxxx/4cca58b6-b555-4064-aa26-5204dc4b99cc@xxxxxxxx/
>>>
>>> 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

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.