From patchwork Thu Oct 26 10:04:37 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Federico Serafini X-Patchwork-Id: 13437427 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 0244EC25B48 for ; Thu, 26 Oct 2023 10:05:02 +0000 (UTC) Received: from list by lists.xenproject.org with outflank-mailman.623655.971700 (Exim 4.92) (envelope-from ) id 1qvxEM-0006Nq-6u; Thu, 26 Oct 2023 10:04:46 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 623655.971700; Thu, 26 Oct 2023 10:04:46 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1qvxEM-0006Nj-49; Thu, 26 Oct 2023 10:04:46 +0000 Received: by outflank-mailman (input) for mailman id 623655; Thu, 26 Oct 2023 10:04:45 +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 1qvxEL-0006Nd-8N for xen-devel@lists.xenproject.org; Thu, 26 Oct 2023 10:04:45 +0000 Received: from support.bugseng.com (mail.bugseng.com [162.55.131.47]) by se1-gles-sth1.inumbo.com (Halon) with ESMTPS id 15d411b5-73e7-11ee-98d5-6d05b1d4d9a1; Thu, 26 Oct 2023 12:04:43 +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 E39354EE0742; Thu, 26 Oct 2023 12:04:42 +0200 (CEST) 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: 15d411b5-73e7-11ee-98d5-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 8.3 Date: Thu, 26 Oct 2023 12:04:37 +0200 Message-Id: <1c146f28cb19607ddd6741de4f7de051894a3381.1698314415.git.federico.serafini@bugseng.com> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 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: guest_walk_tables_[0-9]+_levels(). Update file docs/misra/deviations.rst accordingly. No functional change. Signed-off-by: Federico Serafini --- Changes in v2: - removed set_px_pminfo() from the scope of the deviation; - fixed tag of the commit. --- automation/eclair_analysis/ECLAIR/deviations.ecl | 4 ++++ docs/misra/deviations.rst | 6 ++++++ 2 files changed, 10 insertions(+) diff --git a/automation/eclair_analysis/ECLAIR/deviations.ecl b/automation/eclair_analysis/ECLAIR/deviations.ecl index d8170106b4..b99dfdafd6 100644 --- a/automation/eclair_analysis/ECLAIR/deviations.ecl +++ b/automation/eclair_analysis/ECLAIR/deviations.ecl @@ -204,6 +204,10 @@ const-qualified." -config=MC3R1.R8.3,reports+={deliberate,"any_area(any_loc(file(adopted_mpparse_r8_3)))&&any_area(any_loc(file(^xen/arch/x86/include/asm/mpspec\\.h$)))"} -doc_end +-doc_begin="For functions guest_walk_tables_[0-9]+_levels(), parameter names of definitions deliberately differ from the ones used in the corresponding declarations." +-config=MC3R1.R8.3,declarations={deliberate,"^guest_walk_tables_[0-9]+_levels\\(const struct vcpu\\*, struct p2m_domain\\*, unsigned long, walk_t\\*, uint32_t, gfn_t, mfn_t, void\\*\\)$"} +-doc_end + -doc_begin="The following variables are compiled in multiple translation units belonging to different executables and therefore are safe." -config=MC3R1.R8.6,declarations+={safe, "name(current_stack_pointer||bsearch||sort)"} diff --git a/docs/misra/deviations.rst b/docs/misra/deviations.rst index 8511a18925..9423b5cd6b 100644 --- a/docs/misra/deviations.rst +++ b/docs/misra/deviations.rst @@ -121,6 +121,12 @@ Deviations related to MISRA C:2012 Rules: - xen/common/unxz.c - xen/common/unzstd.c + * - R8.3 + - In some cases, parameter names used in the function definition + deliberately differ from the ones used in the corresponding declaration. + - Tagged as `deliberate` for ECLAIR. Such functions are: + - guest_walk_tables_[0-9]+_levels() + * - R8.4 - The definitions present in the files 'asm-offsets.c' for any architecture are used to generate definitions for asm modules, and are not called by