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

Re: [PATCH v4] misra: allow discarding 'noreturn' during conversions


  • To: Jan Beulich <jbeulich@xxxxxxxx>
  • From: Dmytro Prokopchuk1 <dmytro_prokopchuk1@xxxxxxxx>
  • Date: Fri, 1 Aug 2025 11:22:30 +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=dsTFf/tfByx5PqbHucxZxW7daYfm0tCQX/MW+M8PHH4=; b=nBNzJpXMwGzwPl2S0WzTQNTnjBU8PzM2b6dRnm+Cta0NQ1njAa12zYVw+MOYUBRKxOgEnsEVUx8x1E6H109vCmiMyyehmuMcLtq+AwY5EAndeLmWDr8s4y4tIkQaEHRdEOLWlRULL7SREAB+iEbT7YWpgg0GP12Vd34kBgyalhAjqB1jFiwt11X2jY4Cb2qCZDycnfZBjIIESB2iOHKzaxWS0mPvvUakL6EKn12TZ/GxKg06QXmFF/aHd1DOJ09Ck/eUM+KsSBWZyM5i9IlCLJ+s/QmzXoL5szJTpvECmXOIfdjvSXczuM0ctvvlGrNJ7+IwAdrItzdpq77FuYCufA==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=NVOOshQy1rmE+lXk7paxvK0C7ZzWb3Q2Q+xxkhFD1Obl9sWr6HjPAm0syVDv0S8KGkrkkSmdCX9TEyyeqbewy1R7jFke0N6yrRYYkMIT959E4njNl2G1oR7btaLG0ps8skPjVAgyN+j51s+GNRRwimGp2zpCCegHykOUJaIdWroQ5OFYS3ZhNq9bEl2MfOw+4vAaCB7RjPvEK4uIr7xRMLvADTRjbtm+BieBGENSV76ypifQ6ee4OzYD6pZwn3Fyg9wR+mvARkB9QOVEAg5N6ct111nlFGYLO0cY9b4jP64JpJpN5MLSuFMivyMtnlO/FkygnNvBjE73WKi434WiSA==
  • Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=epam.com;
  • Cc: Nicola Vetrini <nicola.vetrini@xxxxxxxxxxx>, 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.pau@xxxxxxxxxx>, "xen-devel@xxxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • Delivery-date: Fri, 01 Aug 2025 11:22:45 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
  • Thread-index: AQHcAtHLnxwOVXCUr02VFN3cMhRppLRNn3SAgAAICoA=
  • Thread-topic: [PATCH v4] misra: allow discarding 'noreturn' during conversions


On 8/1/25 13: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@xxxxxxxx>
> 
> Acked-by: Jan Beulich <jbeulich@xxxxxxxx> # docs

Sorry, I misunderstood.

Feel free to update the commit message.
Thank you!

 


Rackspace

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