From nobody Mon Feb 9 08:42:11 2026 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 1714655524244279.5354950212835; Thu, 2 May 2024 06:12:04 -0700 (PDT) Received: from list by lists.xenproject.org with outflank-mailman.715815.1117731 (Exim 4.92) (envelope-from ) id 1s2WDp-000302-Mf; Thu, 02 May 2024 13:11:37 +0000 Received: by outflank-mailman (output) from mailman id 715815.1117731; Thu, 02 May 2024 13:11:37 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1s2WDp-0002zv-IJ; Thu, 02 May 2024 13:11:37 +0000 Received: by outflank-mailman (input) for mailman id 715815; Thu, 02 May 2024 13:11:36 +0000 Received: from se1-gles-flk1-in.inumbo.com ([94.247.172.50] helo=se1-gles-flk1.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1s2WDo-0002zp-Hw for xen-devel@lists.xenproject.org; Thu, 02 May 2024 13:11:36 +0000 Received: from support.bugseng.com (mail.bugseng.com [162.55.131.47]) by se1-gles-flk1.inumbo.com (Halon) with ESMTPS id 7fbbcf6f-0885-11ef-b4bb-af5377834399; Thu, 02 May 2024 15:11:34 +0200 (CEST) Received: from truciolo.homenet.telecomitalia.it (host-79-36-52-167.retail.telecomitalia.it [79.36.52.167]) by support.bugseng.com (Postfix) with ESMTPSA id 362954EE0738; Thu, 2 May 2024 15:11: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: 7fbbcf6f-0885-11ef-b4bb-af5377834399 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 v2] automation/eclair: add deviation of MISRA C:2012 Rule 14.4 Date: Thu, 2 May 2024 15:11:15 +0200 Message-Id: X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-ZM-MESSAGEID: 1714655526478100001 Content-Type: text/plain; charset="utf-8" Update ECLAIR configuration to take into account the deviations agreed during MISRA meetings. Amend an existing entry of Rule 14.4 in deviations-rst: it is not a project-wide deviation. Tag Rule 14.4 as clean for arm. Signed-off-by: Federico Serafini Reviewed-by: Stefano Stabellini --- Changes in v2: - reordered deviations to have the more general one as first; - tagged the rule as clean for arm. --- automation/eclair_analysis/ECLAIR/deviations.ecl | 4 ++++ automation/eclair_analysis/ECLAIR/tagging.ecl | 2 +- docs/misra/deviations.rst | 8 +++++++- 3 files changed, 12 insertions(+), 2 deletions(-) diff --git a/automation/eclair_analysis/ECLAIR/deviations.ecl b/automation/= eclair_analysis/ECLAIR/deviations.ecl index d21f112a9b..db1fae3aa2 100644 --- a/automation/eclair_analysis/ECLAIR/deviations.ecl +++ b/automation/eclair_analysis/ECLAIR/deviations.ecl @@ -343,6 +343,10 @@ statements are deliberate" -config=3DMC3R1.R14.3,statements=3D{deliberate , "wrapped(any(),node(if_st= mt))" } -doc_end =20 +-doc_begin=3D"A controlling expression of 'if' and iteration statements ha= ving integer, character or pointer type has a semantics that is well-known = to all Xen developers." +-config=3DMC3R1.R14.4,etypes+=3D{deliberate, "any()", "src_type(integer||c= haracter)||src_expr(type(desugar(pointer(any()))))"} +-doc_end + -doc_begin=3D"The XEN team relies on the fact that the enum is_dying has t= he constant with assigned value 0 act as false and the other ones as true, therefore have the same behavior of a boolean" diff --git a/automation/eclair_analysis/ECLAIR/tagging.ecl b/automation/ecl= air_analysis/ECLAIR/tagging.ecl index bdf94ed996..f573b32da4 100644 --- a/automation/eclair_analysis/ECLAIR/tagging.ecl +++ b/automation/eclair_analysis/ECLAIR/tagging.ecl @@ -29,7 +29,7 @@ if(string_equal(target,"x86_64"), ) =20 if(string_equal(target,"arm64"), - service_selector({"additional_clean_guidelines","MC3R1.R16.6||MC3R1.R2= 0.12||MC3R1.R2.1||MC3R1.R5.3||MC3R1.R7.2||MC3R1.R7.3||MC3R1.R8.6||MC3R1.R9.= 3"}) + service_selector({"additional_clean_guidelines","MC3R1.R14.4||MC3R1.R1= 6.6||MC3R1.R20.12||MC3R1.R2.1||MC3R1.R5.3||MC3R1.R7.2||MC3R1.R7.3||MC3R1.R8= .6||MC3R1.R9.3"}) ) =20 -reports+=3D{clean:added,"service(clean_guidelines_common||additional_clea= n_guidelines)"} diff --git a/docs/misra/deviations.rst b/docs/misra/deviations.rst index ed0c1e8ed0..c4e304fc44 100644 --- a/docs/misra/deviations.rst +++ b/docs/misra/deviations.rst @@ -290,11 +290,17 @@ Deviations related to MISRA C:2012 Rules: statements are deliberate. - Project-wide deviation; tagged as `disapplied` for ECLAIR. =20 + * - R14.4 + - A controlling expression of 'if' and iteration statements having + integer, character or pointer type has a semantics that is well-kno= wn to + all Xen developers. + - Tagged as `deliberate` for ECLAIR. + * - R14.4 - The XEN team relies on the fact that the enum is_dying has the constant with assigned value 0 act as false and the other ones as t= rue, therefore have the same behavior of a boolean. - - Project-wide deviation; tagged as `deliberate` for ECLAIR. + - Tagged as `deliberate` for ECLAIR. =20 * - R16.2 - Complying with the Rule would entail a lot of code duplication in t= he --=20 2.34.1