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

Re: [XEN PATCH 2/2] xen: address violations of MISRA C Rule 17.1



On 21/03/24 02:47, Stefano Stabellini wrote:
On Wed, 20 Mar 2024, Jan Beulich wrote:
On 20.03.2024 09:51, Simone Ballarin wrote:
MISRA C Rule 20.7 states: "The features of `<stdarg.h>' shall not be used"

The Xen community wants to avoid using variadic functions except for
specific circumstances where it feels appropriate by strict code review.

Functions hypercall_create_continuation and hypercall_xlat_continuation
are special hypercalls made to break long running hypercalls into multiple
calls.

Here and below: These aren't "special hypercalls". They're internal helper
functions.

+1


They take a variable number of arguments depending on the original
hypercall they are trying to continue.

Am I misremembering or did Andrew outline a plan to eliminate the variadic-
ness from these? From certifiability perspective avoiding the need for a
deviation would likely be preferable?

For sure, it would be preferable. In the meantime we can have the SAF
comment?

I agree in using the SAF comments as a temporary measure.
I'll propose a new patch with the fix requested by Jan.

--
Simone Ballarin, M.Sc.

Field Application Engineer, BUGSENG (https://bugseng.com)




 


Rackspace

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