From nobody Sat May 18 05:04:57 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 170124693455164.63211654560496; Wed, 29 Nov 2023 00:35:34 -0800 (PST) Received: from list by lists.xenproject.org with outflank-mailman.643738.1004198 (Exim 4.92) (envelope-from ) id 1r8G2R-0005lP-6Q; Wed, 29 Nov 2023 08:35:19 +0000 Received: by outflank-mailman (output) from mailman id 643738.1004198; Wed, 29 Nov 2023 08:35:19 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1r8G2R-0005lI-3r; Wed, 29 Nov 2023 08:35:19 +0000 Received: by outflank-mailman (input) for mailman id 643738; Wed, 29 Nov 2023 08:35:17 +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 1r8G2P-0005lC-Pt for xen-devel@lists.xenproject.org; Wed, 29 Nov 2023 08:35:17 +0000 Received: from support.bugseng.com (mail.bugseng.com [162.55.131.47]) by se1-gles-sth1.inumbo.com (Halon) with ESMTPS id 38fb495e-8e92-11ee-98e3-6d05b1d4d9a1; Wed, 29 Nov 2023 09:35:16 +0100 (CET) Received: from Dell.homenet.telecomitalia.it (host-82-59-158-146.retail.telecomitalia.it [82.59.158.146]) by support.bugseng.com (Postfix) with ESMTPSA id 03DCE4EE0737; Wed, 29 Nov 2023 09:35:15 +0100 (CET) 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: 38fb495e-8e92-11ee-98e3-6d05b1d4d9a1 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 , Wei Liu Subject: [XEN PATCH v2] automation/eclair: add deviations for MISRA C:2012 Rule 5.6 Date: Wed, 29 Nov 2023 09:35:05 +0100 Message-Id: <4a3bad7cb0a652207b9f86ded3ce3897a7c37f3d.1701246412.git.federico.serafini@bugseng.com> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-ZM-MESSAGEID: 1701246935974000001 Content-Type: text/plain; charset="utf-8" Update ECLAIR configuration to take into account the adopted files and type "ret_t". Update docs/misra/deviations.rst accordingly. Signed-off-by: Federico Serafini Acked-by: Stefano Stabellini --- Changes in v2: - generalized excluded files. --- automation/eclair_analysis/ECLAIR/deviations.ecl | 11 +++++++++++ docs/misra/deviations.rst | 15 +++++++++++++++ 2 files changed, 26 insertions(+) diff --git a/automation/eclair_analysis/ECLAIR/deviations.ecl b/automation/= eclair_analysis/ECLAIR/deviations.ecl index c9e3a90801..4ef8762d95 100644 --- a/automation/eclair_analysis/ECLAIR/deviations.ecl +++ b/automation/eclair_analysis/ECLAIR/deviations.ecl @@ -81,6 +81,17 @@ conform to the directive." -config=3DMC3R1.R5.3,reports+=3D{safe, "any_area(any_loc(any_exp(macro(^re= ad_debugreg$))&&any_exp(macro(^write_debugreg$))))"} -doc_end =20 +-doc_begin=3D"The type \"ret_t\" is deliberately defined multiple times, +depending on the guest." +-config=3DMC3R1.R5.6,reports+=3D{deliberate,"any_area(any_loc(text(^.*ret_= t.*$)))"} +-doc_end + +-doc_begin=3D"The following files are imported from the gnu-efi package." +-file_tag+=3D{adopted_r5_6,"^xen/include/efi/.*$"} +-file_tag+=3D{adopted_r5_6,"^xen/arch/.*/include/asm/.*/efibind\\.h$"} +-config=3DMC3R1.R5.6,reports+=3D{deliberate,"any_area(any_loc(file(adopted= _r5_6)))"} +-doc_end + # # Series 7. # diff --git a/docs/misra/deviations.rst b/docs/misra/deviations.rst index 160513b997..96ed29db86 100644 --- a/docs/misra/deviations.rst +++ b/docs/misra/deviations.rst @@ -90,6 +90,21 @@ Deviations related to MISRA C:2012 Rules: - __emulate_2op and __emulate_2op_nobyte - read_debugreg and write_debugreg =20 + * - R5.6 + - The type ret_t is deliberately defined multiple times depending on = the + type of guest to service. + - Tagged as `deliberate` for ECLAIR. + + * - R5.6 + - Some files are not subject to respect MISRA rules at + the moment, but, among these out-of-scope files, there are definiti= ons + of typedef names that are already defined within in-scope files and + therefore, ECLAIR does report a violation since not all the files + involved in the violation are excluded from the analysis. + - Tagged as `deliberate` for ECLAIR. Such excluded files are: + - xen/include/efi/* + - xen/arch/*/include/asm/*/efibind.h + * - R7.1 - It is safe to use certain octal constants the way they are defined in specifications, manuals, and algorithm descriptions. Such places --=20 2.34.1