Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 81C4AC47DD9 for ; Fri, 22 Mar 2024 08:30:29 +0000 (UTC) Received: from list by lists.xenproject.org with outflank-mailman.696710.1087838 (Exim 4.92) (envelope-from ) id 1rnaHv-0005vn-6r; Fri, 22 Mar 2024 08:30:07 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 696710.1087838; Fri, 22 Mar 2024 08:30:07 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1rnaHv-0005v4-21; Fri, 22 Mar 2024 08:30:07 +0000 Received: by outflank-mailman (input) for mailman id 696710; Fri, 22 Mar 2024 08:30:05 +0000 Received: from se1-gles-sth1-in.inumbo.com ([159.253.27.254] helo=se1-gles-sth1.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1rnaHt-0005o0-Rs for xen-devel@lists.xenproject.org; Fri, 22 Mar 2024 08:30:05 +0000 Received: from support.bugseng.com (mail.bugseng.com [162.55.131.47]) by se1-gles-sth1.inumbo.com (Halon) with ESMTPS id 61ed1463-e826-11ee-afe0-a90da7624cb6; Fri, 22 Mar 2024 09:30:04 +0100 (CET) Received: from [192.168.1.9] (net-93-144-106-196.cust.vodafonedsl.it [93.144.106.196]) by support.bugseng.com (Postfix) with ESMTPSA id 6B3434EE0742; Fri, 22 Mar 2024 09:30:03 +0100 (CET) X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" X-Inumbo-ID: 61ed1463-e826-11ee-afe0-a90da7624cb6 Message-ID: Date: Fri, 22 Mar 2024 09:30:02 +0100 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [XEN PATCH 2/2] xen: address violations of MISRA C Rule 17.1 Content-Language: en-US To: Stefano Stabellini , Jan Beulich Cc: consulting@bugseng.com, Andrew Cooper , George Dunlap , Julien Grall , Wei Liu , Bertrand Marquis , Michal Orzel , Volodymyr Babchuk , =?UTF-8?Q?Roger_Pau_Monn=C3=A9?= , xen-devel@lists.xenproject.org References: <4ce30a38-5b5c-4d4c-a0c4-8c1a63759203@suse.com> From: Simone Ballarin Organization: BUGSENG In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit 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 `' 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)