[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: Nicola Vetrini <nicola.vetrini@xxxxxxxxxxx>
- Date: Fri, 01 Aug 2025 12:58:38 +0200
- Arc-authentication-results: i=1; bugseng.com; arc=none smtp.remote-ip=162.55.131.47
- Arc-message-signature: i=1; d=bugseng.com; s=openarc; a=rsa-sha256; c=relaxed/relaxed; t=1754045919; h=DKIM-Signature:MIME-Version:Date:From:To:Cc:Subject:In-Reply-To: References:Message-ID:X-Sender:Organization:Content-Type: Content-Transfer-Encoding; bh=l9zcpOkubj5IU7vpaTeU1fz2oeyMx4q6+I0OukzjbtU=; b=boU6akOiD27uUM/26UfM7GQbjcJFhX5swxNrxiAbp/8zeqCBcdvuz7ig0Blpt/jTVQes 6EUi+Kx0wOkGUPrV/rjQQuOnwqo2zhOCDUyH1kvcewoBqekjiZhNWzslFvL532JNG4VaQ fvtnO4w8WHUpjW+pjGs8YHYXY2xDukPtEk8L0oXqIXPqLjEF5bKc9jwDNW2up1wBKhpzw d9Gfor5s4zOWwgs0Fw/93uYZxk/1LVtVhkzrHO673aDWZt8H9gZ/tUnDpbVIjpHOlZ4GE iST+GCOGHhHaa8zwrUzWuAutLFt0AUb4Ma7Tm5Lvd3h5CZpTLWy72VTaKRzkKG/ssnT/I DC0h2X5lnzI/yd53F8EszRY6Ehb5qU5KoOOupFoQgAnUfrxoyTh57rQZTtKyNJZhowv13 gJIzLLfXfXSCzjZrXFJuJDvEGIJsmN8iDE/7XAxsbM3B3NjwvKq8pabyTEbP4n3+FeWcG ls4SESQ55zbJgSlEWznHKghqQQMJvisH380mhJTYTIMSVVLi03qOHZsImRNfqLA2K9M4X votkvruasNVDIaYLyt7ZNNSvrPc9by4Kw6oel1sIksM5KyhfzVnOiv0zxuO7F0AbZyI1Q r2rWedQtzZsYADbTDlQ2+30+uzsghOaju6qchi+jHYdf8mHa7PyCLXL28AGQmQA=
- Arc-seal: i=1; d=bugseng.com; s=openarc; a=rsa-sha256; cv=none; t=1754045919; b=ll4kwhdjSNCe6bybhotPTKvFBtb/tcyaQiSfiSuE6dWU3WsgIpI4gimSJGUYngaNi4dD grgOIZnR968aaUQGTSt5/7PbhPpJEh9rojoTmSiEp9880Hk+OVx56YVecgtEZEQmZXy23 W1gxxNX4qhWDVV1l0hfUlUnLxKZjF1o5hjG9aiDc4NMMopcBXv0ctmZT7ZZNpfLK3J/7t /nQILbm4+RMJdoDZ5tNyFSxjJD/JDronqsjK2Tg7mPuMdSumpamAR+DlIzpWgQVzPwMpy L2fKMQ8JgbiZJXmC4G6eU3bdGAGeDdufORJ9LDPfj3ucx2y1j6kt8oXW+mtunYoP7n4n9 3sW+gwT+RuHTk2Sv8wMZ1KiytSYt+sUjaYcr5D1lQmpMYL+0/jt8X3nyUB9cXWcptahcL 6ZHNxZCbPAlW6u4WCqwXaRHYUmh6RkgE55qfSOX2KU3Wj4G2PjwEECRFOY+MnBaTm5Yit ii0lBSMJjbCFPlH1E/bnRfiicCJF170zM8KLd2GFeOOqoKiL4wfP5dyU1eJbTbVLCPssk S/DG8cDmJr7rhh3fn83VxUnYujE0xcHIkjayqKr6pqSZzf6afjU483o5mR4NkppnIKnDm advmIgsNVXTfq7KVnDQqY0ME6ShM2sIOG13zaffPmatB5tbQuA0TpNKl3gyFVo8=
- Authentication-results: bugseng.com; arc=none smtp.remote-ip=162.55.131.47
- Cc: Dmytro Prokopchuk1 <dmytro_prokopchuk1@xxxxxxxx>, 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
- Delivery-date: Fri, 01 Aug 2025 10:58:48 +0000
- List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
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@xxxxxxxx>
Acked-by: Jan Beulich <jbeulich@xxxxxxxx> # 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@xxxxxxxxxxx> # ECLAIR
--
Nicola Vetrini, B.Sc.
Software Engineer
BUGSENG (https://bugseng.com)
LinkedIn: https://www.linkedin.com/in/nicola-vetrini-a42471253
|