From nobody Sun May 12 16:28:50 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 1691568572177217.511978777276; Wed, 9 Aug 2023 01:09:32 -0700 (PDT) Received: from list by lists.xenproject.org with outflank-mailman.580760.909168 (Exim 4.92) (envelope-from ) id 1qTeFo-0003SF-KF; Wed, 09 Aug 2023 08:09:16 +0000 Received: by outflank-mailman (output) from mailman id 580760.909168; Wed, 09 Aug 2023 08:09:16 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1qTeFo-0003S8-GJ; Wed, 09 Aug 2023 08:09:16 +0000 Received: by outflank-mailman (input) for mailman id 580760; Wed, 09 Aug 2023 08:09:15 +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 1qTeFn-0003RD-07 for xen-devel@lists.xenproject.org; Wed, 09 Aug 2023 08:09:15 +0000 Received: from support.bugseng.com (mail.bugseng.com [162.55.131.47]) by se1-gles-sth1.inumbo.com (Halon) with ESMTPS id 071effee-368c-11ee-b280-6b7b168915f2; Wed, 09 Aug 2023 10:09:13 +0200 (CEST) Received: from beta.station (net-188-218-251-179.cust.vodafonedsl.it [188.218.251.179]) by support.bugseng.com (Postfix) with ESMTPSA id 65B284EE073F; Wed, 9 Aug 2023 10:09:13 +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: 071effee-368c-11ee-b280-6b7b168915f2 From: Simone Ballarin To: xen-devel@lists.xenproject.org Cc: consulting@bugseng.com, Simone Ballarin , Doug Goldstein , Stefano Stabellini Subject: [XEN PATCH 1/3] automation/eclair: update clean guidelines Date: Wed, 9 Aug 2023 10:07:59 +0200 Message-Id: <89e4ad4c56c083391b24b9da55212e888c5f3beb.1691568344.git.simone.ballarin@bugseng.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-ZM-MESSAGEID: 1691568572997100001 Content-Type: text/plain; charset="utf-8" This patch splits the former list in two separate selectors clean_guidelines_common and additional_clean_guidelines. clean_guidelines_common contains the guidelines that are clean in both the analyzed builds, instead additional_clean_guidelines is popolated depending on the current one. The following clean guidelines have been added: - MC3R1.R1.1; - MC3R1.R1.3; - MC3R1.R3.1; - MC3R1.R4.1; - MC3R1.R17.4; - MC3R1.R22.6; - MC3R1.D4.3 (just x86_64); - MC3R1.R5.3 (just arm64); - MC3R1.R7.2 (just arm64); - MC3R1.R8.6 (just arm64); - MC3R1.R9.3 (just arm64). Signed-off-by: Simone Ballarin Acked-by: Stefano Stabellini --- automation/eclair_analysis/ECLAIR/tagging.ecl | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/automation/eclair_analysis/ECLAIR/tagging.ecl b/automation/ecl= air_analysis/ECLAIR/tagging.ecl index ef2e56e186..3f589fd716 100644 --- a/automation/eclair_analysis/ECLAIR/tagging.ecl +++ b/automation/eclair_analysis/ECLAIR/tagging.ecl @@ -28,7 +28,20 @@ #################### =20 -doc_begin=3D"Clean guidelines: new violations for these guidelines are no= t accepted." --service_selector=3D{clean_guidelines,"^(MC3R1\\.D1\\.1|MC3R1\\.D2\\.1|MC3= R1\\.D4\\.11|M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+=3D{clean:added,"service(clean_guidelines)"} + +-setq=3Dtarget,getenv("XEN_TARGET_ARCH") + +if(string_equal(target,"x86_64"), + service_selector({"additional_clean_guidelines","^(MC3R1\\.D4\\.3)$"}) +) + +if(string_equal(target,"arm64"), + service_selector({"additional_clean_guidelines","^(MC3R1\\.R5\\.3|MC3R= 1\\.R7\\.2|MC3R1\\.R8\\.6|MC3R1\\.R9\\.3)$"}) +) + +-reports+=3D{clean:added,"service(clean_guidelines_common||additional_clea= n_guidelines)"} + -doc_end --=20 2.34.1 From nobody Sun May 12 16:28:50 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 1691568577404508.81381176096977; Wed, 9 Aug 2023 01:09:37 -0700 (PDT) Received: from list by lists.xenproject.org with outflank-mailman.580761.909178 (Exim 4.92) (envelope-from ) id 1qTeFu-0003mC-SN; Wed, 09 Aug 2023 08:09:22 +0000 Received: by outflank-mailman (output) from mailman id 580761.909178; Wed, 09 Aug 2023 08:09:22 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1qTeFu-0003m1-Oc; Wed, 09 Aug 2023 08:09:22 +0000 Received: by outflank-mailman (input) for mailman id 580761; Wed, 09 Aug 2023 08:09:21 +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 1qTeFt-0003RD-GB for xen-devel@lists.xenproject.org; Wed, 09 Aug 2023 08:09:21 +0000 Received: from support.bugseng.com (mail.bugseng.com [162.55.131.47]) by se1-gles-sth1.inumbo.com (Halon) with ESMTPS id 0b469882-368c-11ee-b280-6b7b168915f2; Wed, 09 Aug 2023 10:09:20 +0200 (CEST) Received: from beta.station (net-188-218-251-179.cust.vodafonedsl.it [188.218.251.179]) by support.bugseng.com (Postfix) with ESMTPSA id 5E77B4EE073F; Wed, 9 Aug 2023 10:09:20 +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: 0b469882-368c-11ee-b280-6b7b168915f2 From: Simone Ballarin To: xen-devel@lists.xenproject.org Cc: consulting@bugseng.com, Simone Ballarin , Doug Goldstein , Stefano Stabellini Subject: [XEN PATCH 2/3] automation/eclair: add ECL deviations Date: Wed, 9 Aug 2023 10:08:00 +0200 Message-Id: X-Mailer: git-send-email 2.34.1 In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-ZM-MESSAGEID: 1691568578650100001 Content-Type: text/plain; charset="utf-8" This patch adds some deviations for the following guidelines: Rule 2.1, Rule 5.3 and Rule 8.2. Signed-off-by: Simone Ballarin Acked-by: Stefano Stabellini --- .../eclair_analysis/ECLAIR/deviations.ecl | 34 ++++++++----------- 1 file changed, 15 insertions(+), 19 deletions(-) diff --git a/automation/eclair_analysis/ECLAIR/deviations.ecl b/automation/= eclair_analysis/ECLAIR/deviations.ecl index e1a06daf2f..696618b59e 100644 --- a/automation/eclair_analysis/ECLAIR/deviations.ecl +++ b/automation/eclair_analysis/ECLAIR/deviations.ecl @@ -14,8 +14,13 @@ Constant expressions and unreachable branches of if and = switch statements are ex -config=3DMC3R1.R2.1,+reports=3D{deliberate,"first_area(^.*is never refere= nced$)"} -doc_end =20 --doc_begin=3D"Unreachability in the following macros are expected and safe= ." --config=3DMC3R1.R2.1,statements+=3D{safe,"macro(name(BUG||assert_failed||E= RROR_EXIT||ERROR_EXIT_DOM||PIN_FAIL))"} +-doc_begin=3D"Unreachability caused by calls to the following functions or= macros is deliberate and there is no risk of code being unexpectedly left = out." +-config=3DMC3R1.R2.1,statements+=3D{deliberate,"macro(name(BUG||assert_fai= led||ERROR_EXIT||ERROR_EXIT_DOM||PIN_FAIL))"} +-config=3DMC3R1.R2.1,statements+=3D{deliberate, "call(decl(name(__builtin_= unreachable||panic||do_unexpected_trap||machine_halt||machine_restart||mayb= e_reboot)))"} +-doc_end + +-doc_begin=3D"Unreachability of an ASSERT_UNREACHABLE() and analogous macr= o calls is deliberate and safe." +-config=3DMC3R1.R2.1,reports+=3D{deliberate, "any_area(any_loc(any_exp(mac= ro(name(ASSERT_UNREACHABLE||PARSE_ERR_RET||PARSE_ERR||FAIL_MSR||FAIL_CPUID)= ))))"} -doc_end =20 -doc_begin=3D"Proving compliance with respect to Rule 2.2 is generally imp= ossible: @@ -93,25 +98,11 @@ conform to the directive." -doc_begin=3D"The project adopted the rule with an exception listed in 'docs/misra/rules.rst'" -config=3DMC3R1.R5.3,reports+=3D{safe, "any_area(any_loc(any_exp(macro(^RE= AD_SYSREG$))&&any_exp(macro(^WRITE_SYSREG$))))"} --config=3DMC3R1.R5.3,reports+=3D{safe, "any_area(any_loc(any_exp(macro(^ma= x_t$))&&any_exp(macro(^min_t$))))"} +-config=3DMC3R1.R5.3,reports+=3D{safe, "any_area(any_loc(any_exp(macro(^ma= x(_t)?$))&&any_exp(macro(^min(_t)?$))))"} -config=3DMC3R1.R5.3,reports+=3D{safe, "any_area(any_loc(any_exp(macro(^re= ad[bwlq]$))&&any_exp(macro(^read[bwlq]_relaxed$))))"} -config=3DMC3R1.R5.3,reports+=3D{safe, "any_area(any_loc(any_exp(macro(^pe= r_cpu$))&&any_exp(macro(^this_cpu$))))"} --doc_end - --doc_begin=3D"The identifier 'fdt' is a widely-used name, for which no sui= table -substitute can be found. It is understood in 'xen/arch/arm/efi-boot.h' tha= t the -static variable 'fdt' cannot be confused with parameter names of the funct= ion -declarations that are present in the file." --file_tag+=3D{efi_boot_h, "^xen/arch/arm/efi/efi-boot\\.h$"} --config=3DMC3R1.R5.3,reports+=3D{deliberate, "any_area(decl(kind(var)&&sta= tic_storage()&&^fdt$)&&any_loc(file(efi_boot_h)))"} --doc_end - --doc_begin=3D"The identifier 'start' is a widely-used name, for which no s= uitable -substitute can be found. It is understood in 'xen/include/xen/kernel.h' th= at the -extern variable 'start' cannot be confused with omonymous parameter names = of the -function declarations where that variable is visible." --file_tag+=3D{kernel_h, "^xen/include/xen/kernel\\.h$"} --config=3DMC3R1.R5.3,reports+=3D{deliberate, "any_area(decl(kind(var)&&lin= kage(external)&&^start$)&&any_loc(file(kernel_h)))"} +-config=3DMC3R1.R5.3,reports+=3D{safe, "any_area(any_loc(any_exp(macro(^__= emulate_2op$))&&any_exp(macro(^__emulate_2op_nobyte$))))"} +-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"Function-like macros cannot be confused with identifiers tha= t are @@ -179,6 +170,11 @@ const-qualified." # Series 8. # =20 +-doc_begin=3D"The following file is imported from Linux: ignore for now." +-file_tag+=3D{adopted_r8_2,"^xen/common/inflate\\.c$"} +-config=3DMC3R1.R8.2,reports+=3D{deliberate,"any_area(any_loc(file(adopted= _r8_2)))"} +-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)"} --=20 2.34.1 From nobody Sun May 12 16:28:50 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 1691568580096157.64802362427258; Wed, 9 Aug 2023 01:09:40 -0700 (PDT) Received: from list by lists.xenproject.org with outflank-mailman.580763.909188 (Exim 4.92) (envelope-from ) id 1qTeFw-00042x-8q; Wed, 09 Aug 2023 08:09:24 +0000 Received: by outflank-mailman (output) from mailman id 580763.909188; Wed, 09 Aug 2023 08:09:24 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1qTeFw-00042n-5C; Wed, 09 Aug 2023 08:09:24 +0000 Received: by outflank-mailman (input) for mailman id 580763; Wed, 09 Aug 2023 08:09:23 +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 1qTeFv-0003RD-QH for xen-devel@lists.xenproject.org; Wed, 09 Aug 2023 08:09:23 +0000 Received: from support.bugseng.com (mail.bugseng.com [162.55.131.47]) by se1-gles-sth1.inumbo.com (Halon) with ESMTPS id 0cb5bcc8-368c-11ee-b280-6b7b168915f2; Wed, 09 Aug 2023 10:09:23 +0200 (CEST) Received: from beta.station (net-188-218-251-179.cust.vodafonedsl.it [188.218.251.179]) by support.bugseng.com (Postfix) with ESMTPSA id C02244EE0740; Wed, 9 Aug 2023 10:09:22 +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: 0cb5bcc8-368c-11ee-b280-6b7b168915f2 From: Simone Ballarin To: xen-devel@lists.xenproject.org Cc: consulting@bugseng.com, Simone Ballarin , Doug Goldstein , Stefano Stabellini Subject: [XEN PATCH 3/3] automation/eclair: update analyzed builds Date: Wed, 9 Aug 2023 10:08:01 +0200 Message-Id: X-Mailer: git-send-email 2.34.1 In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-ZM-MESSAGEID: 1691568581967100001 Content-Type: text/plain; charset="utf-8" The xen build for ARM64 now has new configuration options which require to be defined: this patch defines them. In both configuration files some no longer true comments have been removed. Signed-off-by: Simone Ballarin Acked-by: Stefano Stabellini --- automation/eclair_analysis/xen_arm_config | 14 ++++---------- automation/eclair_analysis/xen_x86_config | 9 --------- 2 files changed, 4 insertions(+), 19 deletions(-) diff --git a/automation/eclair_analysis/xen_arm_config b/automation/eclair_= analysis/xen_arm_config index 26f5fcca41..ef140ceb73 100644 --- a/automation/eclair_analysis/xen_arm_config +++ b/automation/eclair_analysis/xen_arm_config @@ -1,12 +1,3 @@ -# File provided in -# Re: Xen MISRA C: Source files in scope and out of scope -# from: Stefano Stabellini -# date: 6 giu 2023, 02:53 - -# -# Automatically generated file; DO NOT EDIT. -# Xen/arm 4.18-unstable Configuration -# CONFIG_CC_IS_GCC=3Dy CONFIG_GCC_VERSION=3D90400 CONFIG_CLANG_VERSION=3D0 @@ -34,7 +25,9 @@ CONFIG_HVM=3Dy CONFIG_SBSA_VUART_CONSOLE=3Dy CONFIG_ARM_SSBD=3Dy CONFIG_HARDEN_BRANCH_PREDICTOR=3Dy -# CONFIG_TEE is not set +CONFIG_TEE=3Dn +CONFIG_OPTEE=3Dn +CONFIG_FFA=3Dn # CONFIG_STATIC_SHM is not set # end of Architecture Features =20 @@ -47,6 +40,7 @@ CONFIG_ARM64_ERRATUM_819472=3Dy CONFIG_ARM64_ERRATUM_843419=3Dy CONFIG_ARM64_ERRATUM_832075=3Dy CONFIG_ARM64_ERRATUM_834220=3Dy +CONFIG_ARM64_ERRATUM_1508412=3Dy CONFIG_ARM_ERRATUM_858921=3Dy CONFIG_ARM64_WORKAROUND_REPEAT_TLBI=3Dy CONFIG_ARM64_ERRATUM_1286807=3Dy diff --git a/automation/eclair_analysis/xen_x86_config b/automation/eclair_= analysis/xen_x86_config index d497814e01..abc44d43e1 100644 --- a/automation/eclair_analysis/xen_x86_config +++ b/automation/eclair_analysis/xen_x86_config @@ -1,12 +1,3 @@ -# File provided in -# Re: Xen MISRA C: Source files in scope and out of scope -# from: Stefano Stabellini =20 -# date: 6 giu 2023, 02:53 - -# -# Automatically generated file; DO NOT EDIT. -# Xen/x86 4.18-unstable Configuration -# CONFIG_CC_IS_GCC=3Dy CONFIG_GCC_VERSION=3D90400 CONFIG_CLANG_VERSION=3D0 --=20 2.34.1