From nobody Tue May 21 12:57:12 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) client-ip=192.237.175.120; envelope-from=xen-devel-bounces@lists.xenproject.org; helo=lists.xenproject.org; Authentication-Results: mx.zohomail.com; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 1712240510385550.3843434294016; Thu, 4 Apr 2024 07:21:50 -0700 (PDT) Received: from list by lists.xenproject.org with outflank-mailman.700921.1094740 (Exim 4.92) (envelope-from ) id 1rsNy4-00051Y-UU; Thu, 04 Apr 2024 14:21:28 +0000 Received: by outflank-mailman (output) from mailman id 700921.1094740; Thu, 04 Apr 2024 14:21:28 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1rsNy4-00051R-S0; Thu, 04 Apr 2024 14:21:28 +0000 Received: by outflank-mailman (input) for mailman id 700921; Thu, 04 Apr 2024 14:21:27 +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 1rsNy3-00051I-E4 for xen-devel@lists.xenproject.org; Thu, 04 Apr 2024 14:21:27 +0000 Received: from support.bugseng.com (mail.bugseng.com [162.55.131.47]) by se1-gles-sth1.inumbo.com (Halon) with ESMTPS id 9e8cd25d-f28e-11ee-afe5-a90da7624cb6; Thu, 04 Apr 2024 16:21:25 +0200 (CEST) Received: from truciolo.homenet.telecomitalia.it (host-82-59-164-46.retail.telecomitalia.it [82.59.164.46]) by support.bugseng.com (Postfix) with ESMTPSA id B447A4EE073C; Thu, 4 Apr 2024 16:21:24 +0200 (CEST) X-Outflank-Mailman: Message body and most headers restored to incoming version 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: 9e8cd25d-f28e-11ee-afe5-a90da7624cb6 From: Federico Serafini To: xen-devel@lists.xenproject.org Cc: consulting@bugseng.com, Federico Serafini , Simone Ballarin , Doug Goldstein , Stefano Stabellini , Andrew Cooper , George Dunlap , Jan Beulich , Julien Grall Subject: [XEN PATCH] automaton/eclair: add deviations for MISRA C:2012 Rule 13.6 Date: Thu, 4 Apr 2024 16:21:10 +0200 Message-Id: X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-ZM-MESSAGEID: 1712240511318100001 Content-Type: text/plain; charset="utf-8" Update ECLAIR configuration to deviate uses of chk_fld and alternative_vcall[0-9] macros. Suggested-by: Stefano Stabellini Signed-off-by: Federico Serafini --- automation/eclair_analysis/ECLAIR/deviations.ecl | 8 ++++++++ docs/misra/deviations.rst | 12 ++++++++++++ 2 files changed, 20 insertions(+) diff --git a/automation/eclair_analysis/ECLAIR/deviations.ecl b/automation/= eclair_analysis/ECLAIR/deviations.ecl index de9ba723fb..eebe779000 100644 --- a/automation/eclair_analysis/ECLAIR/deviations.ecl +++ b/automation/eclair_analysis/ECLAIR/deviations.ecl @@ -333,6 +333,14 @@ of the short-circuit evaluation strategy of such logic= al operators." -config=3DMC3R1.R13.5,reports+=3D{disapplied,"any()"} -doc_end =20 +-doc_begin=3D"Macros alternative_vcall[0-9] use sizeof to type-check \"fun= c\" and the func parameters without evaluating them." +-config=3DMC3R1.R13.6,reports+=3D{deliberate,"any_area(any_loc(any_exp(mac= ro(^alternative_vcall[0-9]$))))"} +-doc_end + +-doc_begin=3D"Macro chk_fld is only used to introduce BUILD_BUG_ON checks = in very specific cases where by code inspection you can see that its usage = is correct. The BUILD_BUG_ON checks check that EFI_TIME and struct xenpf_ef= i_time fields match." +-config=3DMC3R1.R13.6,reports+=3D{deliberate,"any_area(any_loc(any_exp(mac= ro(^chk_fld$))))"} +-doc_end + # # Series 14 # diff --git a/docs/misra/deviations.rst b/docs/misra/deviations.rst index eb5ef2bd9d..a97c31d18f 100644 --- a/docs/misra/deviations.rst +++ b/docs/misra/deviations.rst @@ -279,6 +279,18 @@ Deviations related to MISRA C:2012 Rules: the short-circuit evaluation strategy for logical operators. - Project-wide deviation; tagged as `disapplied` for ECLAIR. =20 + * - R13.6 + - Macros alternative_vcall[0-9] use sizeof to type-check \"func\" and= the + func parameters without evaluating them. + - Tagged as `deliberate` for ECLAIR. + + * - R13.6 + - Macro chk_fld is only used to introduce BUILD_BUG_ON checks in very + specific cases where by code inspection you can see that its usage = is + correct. The BUILD_BUG_ON checks check that EFI_TIME and + struct xenpf_efi_time fields match. + - Tagged as `deliberate` for ECLAIR. + * - R14.2 - The severe restrictions imposed by this rule on the use of 'for' statements are not counterbalanced by the presumed facilitation of = the --=20 2.34.1