From nobody Fri May 17 01:43:36 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 1698153811439344.1077749310525; Tue, 24 Oct 2023 06:23:31 -0700 (PDT) Received: from list by lists.xenproject.org with outflank-mailman.621953.968938 (Exim 4.92) (envelope-from ) id 1qvHNE-0000iP-AF; Tue, 24 Oct 2023 13:23:08 +0000 Received: by outflank-mailman (output) from mailman id 621953.968938; Tue, 24 Oct 2023 13:23:08 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1qvHNE-0000iI-6E; Tue, 24 Oct 2023 13:23:08 +0000 Received: by outflank-mailman (input) for mailman id 621953; Tue, 24 Oct 2023 13:23:06 +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 1qvHNC-0000iB-Ck for xen-devel@lists.xenproject.org; Tue, 24 Oct 2023 13:23:06 +0000 Received: from support.bugseng.com (mail.bugseng.com [162.55.131.47]) by se1-gles-flk1.inumbo.com (Halon) with ESMTPS id 76286e3a-7270-11ee-9b0e-b553b5be7939; Tue, 24 Oct 2023 15:23:04 +0200 (CEST) Received: from Dell.homenet.telecomitalia.it (host-95-247-204-25.retail.telecomitalia.it [95.247.204.25]) by support.bugseng.com (Postfix) with ESMTPSA id 358704EE0739; Tue, 24 Oct 2023 15:23:03 +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: 76286e3a-7270-11ee-9b0e-b553b5be7939 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 RFC] xen/automation: add deviations for MISRA C:2012 Rule 8.3 Date: Tue, 24 Oct 2023 15:22:31 +0200 Message-Id: <565552f9e7cfff56fb1d1037cfa9662a1818c5d3.1698153310.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: 1698153813133100001 Content-Type: text/plain; charset="utf-8" Update ECLAIR configuration to deviate Rule 8.3 ("All declarations of an object or function shall use the same names and type qualifiers") for the following functions: - set_px_pminfo(); - guest_walk_tables_[0-9]+_levels(). Update file docs/misra/deviations.rst accordingly. No functional change. Signed-off-by: Federico Serafini --- I had a discussion with Jan about the reasons behind the choice of parameter name 'walk' for the definitions of functions guest_walk_tables_[0-9]+_level= s() and the parameter name 'pfec' for the corresponding declarations. Also for the function set_px_pminfo(), it seems that the parameter names are different on purpose. Can I submit a patch with these deviations? Do you have any comments? --- automation/eclair_analysis/ECLAIR/deviations.ecl | 4 ++++ docs/misra/deviations.rst | 7 +++++++ 2 files changed, 11 insertions(+) diff --git a/automation/eclair_analysis/ECLAIR/deviations.ecl b/automation/= eclair_analysis/ECLAIR/deviations.ecl index d8170106b4..9485d66928 100644 --- a/automation/eclair_analysis/ECLAIR/deviations.ecl +++ b/automation/eclair_analysis/ECLAIR/deviations.ecl @@ -204,6 +204,10 @@ const-qualified." -config=3DMC3R1.R8.3,reports+=3D{deliberate,"any_area(any_loc(file(adopted= _mpparse_r8_3)))&&any_area(any_loc(file(^xen/arch/x86/include/asm/mpspec\\.= h$)))"} -doc_end =20 +-doc_begin=3D"For functions set_px_pminfo() and guest_walk_tables_[0-9]+_l= evels(), parameter names of definitions deliberately differ from the ones u= sed in the corresponding declarations." +-config=3DMC3R1.R8.3,declarations=3D{deliberate,"^set_px_pminfo\\(uint32_t= , struct xen_processor_performance\\*\\)|guest_walk_tables_[0-9]+_levels\\(= const struct vcpu\\*, struct p2m_domain\\*, unsigned long, walk_t\\*, uint3= 2_t, gfn_t, mfn_t, void\\*\\)$"} +-doc_end + -doc_begin=3D"The following variables are compiled in multiple translation= units belonging to different executables and therefore are safe." -config=3DMC3R1.R8.6,declarations+=3D{safe, "name(current_stack_pointer||b= search||sort)"} diff --git a/docs/misra/deviations.rst b/docs/misra/deviations.rst index 8511a18925..b5016412f6 100644 --- a/docs/misra/deviations.rst +++ b/docs/misra/deviations.rst @@ -121,6 +121,13 @@ Deviations related to MISRA C:2012 Rules: - xen/common/unxz.c - xen/common/unzstd.c =20 + * - R8.3 + - In some cases, parameter names used in the function definition + deliberately differ from the ones used in the corresponding declara= tion. + - Tagged as `deliberate` for ECLAIR. Such functions are: + - set_px_pminfo() + - guest_walk_tables_[0-9]+_levels() + * - R8.4 - The definitions present in the files 'asm-offsets.c' for any archit= ecture are used to generate definitions for asm modules, and are not calle= d by --=20 2.34.1