From mboxrd@z Thu Jan 1 00:00:00 1970 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 AC5E9C4345F for ; Mon, 29 Apr 2024 12:49:32 +0000 (UTC) Received: from list by lists.xenproject.org with outflank-mailman.714047.1115018 (Exim 4.92) (envelope-from ) id 1s1QRe-0004Ta-Sg; Mon, 29 Apr 2024 12:49:22 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 714047.1115018; Mon, 29 Apr 2024 12:49: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 1s1QRe-0004TT-Ob; Mon, 29 Apr 2024 12:49:22 +0000 Received: by outflank-mailman (input) for mailman id 714047; Mon, 29 Apr 2024 12:49:21 +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 1s1QRd-0004TH-DC for xen-devel@lists.xenproject.org; Mon, 29 Apr 2024 12:49:21 +0000 Received: from support.bugseng.com (mail.bugseng.com [162.55.131.47]) by se1-gles-flk1.inumbo.com (Halon) with ESMTPS id e50f0b68-0626-11ef-b4bb-af5377834399; Mon, 29 Apr 2024 14:49:19 +0200 (CEST) Received: from support.bugseng.com (support.bugseng.com [162.55.131.47]) by support.bugseng.com (Postfix) with ESMTPA id 314704EE0738; Mon, 29 Apr 2024 14:49:19 +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: e50f0b68-0626-11ef-b4bb-af5377834399 MIME-Version: 1.0 Date: Mon, 29 Apr 2024 14:49:19 +0200 From: Alessandro Zucchelli To: xen-devel@lists.xenproject.org Cc: consulting@bugseng.com, Simone Ballarin , Doug Goldstein , Stefano Stabellini Subject: Re: [XEN PATCH] automation/eclair_enalysis: amend configuration for some MISRA rules Reply-To: alessandro.zucchelli@bugseng.com Mail-Reply-To: alessandro.zucchelli@bugseng.com In-Reply-To: <7e8f6f4e0e007656d8809c4d521e73e642747d7f.1714394212.git.alessandro.zucchelli@bugseng.com> References: <7e8f6f4e0e007656d8809c4d521e73e642747d7f.1714394212.git.alessandro.zucchelli@bugseng.com> Message-ID: X-Sender: alessandro.zucchelli@bugseng.com Organization: BUGSENG Srl Content-Type: text/plain; charset=US-ASCII; format=flowed Content-Transfer-Encoding: 7bit On 2024-04-29 14:44, Alessandro Zucchelli wrote: > Adjust ECLAIR configuration for rules: R21.14, R21.15, R21.16 by taking > into account mem* macros defined in the Xen sources as if they were > equivalent to the ones in Standard Library. > > Signed-off-by: Alessandro Zucchelli > --- > automation/eclair_analysis/ECLAIR/analysis.ecl | 17 +++++++++++++++++ > 1 file changed, 17 insertions(+) > > diff --git a/automation/eclair_analysis/ECLAIR/analysis.ecl > b/automation/eclair_analysis/ECLAIR/analysis.ecl > index a604582da3..f3b634baba 100644 > --- a/automation/eclair_analysis/ECLAIR/analysis.ecl > +++ b/automation/eclair_analysis/ECLAIR/analysis.ecl > @@ -19,6 +19,23 @@ map_strings("scheduled-analysis",analysis_kind) > > -enable=B.EXPLAIN > > +-doc_begin="These configurations serve the purpose of recognizing the > 'mem*' macros as > +their Standard Library equivalents." > + > +-config=MC3R1.R21.14,call_select+= > +{"macro(^memcmp$)&&any_arg(1..2, > skip(__non_syntactic_paren_cast_stmts, node(string_literal)))", > + "any()", violation, "%{__callslct_any_base_fmt()}", {{arg, > "%{__callslct_arg_fmt()}"}}} > + > +-config=MC3R1.R21.15,call_args+= > +{"macro(^mem(cmp|move|cpy)$)", {1, 2}, "unqual_pointee_compatible", > + "%{__argscmpr_culprit_fmt()}", "%{__argscmpr_evidence_fmt()}"} > + > +-config=MC3R1.R21.16,call_select+= > +{"macro(^memcmp$)&&any_arg(1..2, skip(__non_syntactic_paren_stmts, > type(canonical(__memcmp_pte_types))))", > + "any()", violation, "%{__callslct_any_base_fmt()}", > {{arg,"%{__callslct_arg_type_fmt()}"}}} > + > +-doc_end > + > -eval_file=toolchain.ecl > -eval_file=public_APIs.ecl > if(not(scheduled_analysis), Typo in the title: should be automation/eclair_analysis. Sorry. -- Alessandro Zucchelli, B.Sc. Software Engineer, BUGSENG (https://bugseng.com)