From nobody Sun May 5 21:04:52 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; dkim=pass; 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; dmarc=pass(p=none dis=none) header.from=kernel.org ARC-Seal: i=1; a=rsa-sha256; t=1669681163; cv=none; d=zohomail.com; s=zohoarc; b=V8XYVsVF7QC3A4bAEd9olpIWVphmepStBd5VImqE4phUZSammFGAxX4OBNEALbhYdrjeGNcB7es/wYoqxsCUAzgVW/KebR5qhNWKGp4owz98qEq+/TUSFmzgAYEZLCGSWHauAd70i8b+PCwctp9ZXXCidlDMCNlUYOfKUZuCqZM= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1669681163; h=Content-Transfer-Encoding:Cc:Date:From:List-Subscribe:List-Post:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Sender:Subject:To; bh=p9IgR4Okl9EJnN20oohEzyeRcW0csiIeBIcy8B4fCg0=; b=FmeRgJcYxpEVojOp/nyKIvlByBD92dVdst3/YhdqOyl0VsSF/utTvycxKnbq6k63sozYueHH2g3ZqOgO1W//O5GKrk+3QXWkWWWcvzYF2RuFxp10AZ74aGGV/mdustLYe/m0S4E8SEpFeEmrUkk5werVvyz2Emv/oFFLX5E/Cqc= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; 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; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 1669681163094286.44875886933005; Mon, 28 Nov 2022 16:19:23 -0800 (PST) Received: from list by lists.xenproject.org with outflank-mailman.449169.705784 (Exim 4.92) (envelope-from ) id 1ozoKZ-0006dX-F0; Tue, 29 Nov 2022 00:18:35 +0000 Received: by outflank-mailman (output) from mailman id 449169.705784; Tue, 29 Nov 2022 00:18:35 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1ozoKZ-0006dQ-CE; Tue, 29 Nov 2022 00:18:35 +0000 Received: by outflank-mailman (input) for mailman id 449169; Tue, 29 Nov 2022 00:18:33 +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 1ozoKX-0006dK-GR for xen-devel@lists.xenproject.org; Tue, 29 Nov 2022 00:18:33 +0000 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by se1-gles-sth1.inumbo.com (Halon) with ESMTPS id 5a082d06-6f7b-11ed-91b6-6bf2151ebd3b; Tue, 29 Nov 2022 01:18:31 +0100 (CET) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id A2DE761511; Tue, 29 Nov 2022 00:18:29 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id DC50BC433C1; Tue, 29 Nov 2022 00:18:27 +0000 (UTC) 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: 5a082d06-6f7b-11ed-91b6-6bf2151ebd3b DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1669681109; bh=YixsR12PJDn9xlCuW5VEiZORmlQGw6gVE3t4ZgP7BPw=; h=From:To:Cc:Subject:Date:From; b=m7P1FCjAmQWLPrrIwa0XOJqpHSGV/1K6/CiCAsgIoWJDIDAclPtr1DZ3dZtOsBjD6 OFwGgJDhYpjcRUAJEpPuimix8klC6pDieC0KzKPdzzYikuGZbPiF078n8bhyvZfE3F gaYAhPFnOMa0h9xNlBDPPUgtFz2sjWBqv1WekG8mTOr7kwXeIpCFjmX13THxfk3hGQ XYzYpPgzA3r1w0r9Bk3Klbff7ogLgXVr8WCTacXQatnH7cq1+diVQt03Vq7c6FTiy0 5wep67/VfVq0ZIS3GcwsT9vbfJa0i3T1Yq61nIQW18CVZbtrDIu/AKYLLui5jmh3Z4 /20Ri6KEoVhWA== From: Stefano Stabellini To: sstabellini@kernel.org Cc: xen-devel@lists.xenproject.org, george.dunlap@citrix.com, andrew.cooper3@citrix.com, jbeulich@suse.com, roger.pau@citrix.com, Bertrand.Marquis@arm.com, julien@xen.org, Stefano Stabellini Subject: [PATCH] Introduce more MISRA C rules to docs/misra/rules.rst Date: Mon, 28 Nov 2022 16:18:24 -0800 Message-Id: <20221129001824.2344912-1-sstabellini@kernel.org> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @kernel.org) X-ZM-MESSAGEID: 1669681164037100001 Content-Type: text/plain; charset="utf-8" From: Stefano Stabellini Add the new MISRA C rules agreed by the MISRA C working group to docs/misra/rules.rst. Add a comment for Rule 19.1 to explain that Eclair's findings are "caution" reports, not violations. Signed-off-by: Stefano Stabellini Acked-by: Jan Beulich Reviewed-by: Bertrand Marquis --- docs/misra/rules.rst | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) diff --git a/docs/misra/rules.rst b/docs/misra/rules.rst index 8a659d8d47..dcceab9388 100644 --- a/docs/misra/rules.rst +++ b/docs/misra/rules.rst @@ -77,11 +77,32 @@ existing codebase are work-in-progress. behaviour - =20 + * - `Rule 2.6 `_ + - Advisory + - A function should not contain unused label declarations + - + + * - `Rule 3.1 `_ + - Required + - The character sequences /* and // shall not be used within a + comment + - + * - `Rule 3.2 `_ - Required - Line-splicing shall not be used in // comments - =20 + * - `Rule 4.1 `_ + - Required + - Octal and hexadecimal escape sequences shall be terminated + - + + * - `Rule 4.2 `_ + - Advisory + - Trigraphs should not be used + - + * - `Rule 5.1 `_ - Required - External identifiers shall be distinct @@ -200,6 +221,21 @@ existing codebase are work-in-progress. have an explicit return statement with an expression - =20 + * - `Rule 17.6 `_ + - Mandatory + - The declaration of an array parameter shall not contain the + static keyword between the [ ] + - + + * - `Rule 19.1 `_ + - Mandatory + - An object shall not be assigned or copied to an overlapping + object + - Be aware that the static analysis tool Eclair might report + several findings for Rule 19.1 of type "caution". These are + instances where Eclair is unable to verify that the code is valid + in regard to Rule 19.1. Caution reports are not violations. + * - `Rule 20.7 `_ - Required - Expressions resulting from the expansion of macro parameters --=20 2.25.1