From patchwork Tue Jul 30 23:30:14 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stefano Stabellini X-Patchwork-Id: 13747971 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 92E32C52D1D for ; Tue, 30 Jul 2024 23:30:47 +0000 (UTC) Received: from list by lists.xenproject.org with outflank-mailman.768119.1178865 (Exim 4.92) (envelope-from ) id 1sYwIP-0003z5-DT; Tue, 30 Jul 2024 23:30:21 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 768119.1178865; Tue, 30 Jul 2024 23:30:21 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sYwIP-0003yy-AP; Tue, 30 Jul 2024 23:30:21 +0000 Received: by outflank-mailman (input) for mailman id 768119; Tue, 30 Jul 2024 23:30:19 +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 1sYwIN-0003ys-Kz for xen-devel@lists.xenproject.org; Tue, 30 Jul 2024 23:30:19 +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 ad7bd759-4ecb-11ef-bc01-fd08da9f4363; Wed, 31 Jul 2024 01:30:17 +0200 (CEST) Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by dfw.source.kernel.org (Postfix) with ESMTP id 58E246212D; Tue, 30 Jul 2024 23:30:16 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 2DC28C32782; Tue, 30 Jul 2024 23:30:15 +0000 (UTC) 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: ad7bd759-4ecb-11ef-bc01-fd08da9f4363 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1722382216; bh=G/NerJrxdmHr6YCYnARbwwuhXFGRVodoUT5YVoxt9zU=; h=Date:From:To:cc:Subject:From; b=dJuFl8/UZ74yJAjck0tL/AU6WgzC5aD5dAEb62p/rq/FsfoYJy3Yqk+c4Tn3k9kzI 46/AQK90zpma4IfzOC6ea9ifS8NbksB9zHiUryZsQgOObqokroGmxGEhREENrHQJ2v 4E4aMCIbf7leEJknKhU88unB3DVeBFFoCDLhOsUTEfNJ5RmrmKMERz1FTxjG0qNRmI y5OrMT/BC1laX2AP/2wliBkiPteNy7aPLWYUDnwQFkTtcmX87ifyCibbTYGFatNChZ Uh+GsqT8BzF8JiUVzZDjaFdivaAW02IlEayFGAznk2gFjofD8/cfKgE6yPu/aJteXp wYCylZ7WprreQ== Date: Tue, 30 Jul 2024 16:30:14 -0700 (PDT) From: Stefano Stabellini X-X-Sender: sstabellini@ubuntu-linux-20-04-desktop To: xen-devel@lists.xenproject.org cc: sstabellini@kernel.org, Jan Beulich , Andrew Cooper , =?utf-8?q?Roger_Pau_Monn=C3=A9?= , Bertrand Marquis , Julien Grall Subject: [PATCH] docs/misra: add R13.2 and R18.2 to rules.rst Message-ID: User-Agent: Alpine 2.22 (DEB 394 2020-01-19) MIME-Version: 1.0 Add MISRA C rules 13.2 and 18.2 to rules.rst. Both rules have zero violations reported by Eclair but they have some cautions. We accept both rules and for now we'll enable scanning for them in Eclair but only violations will cause the Gitlab CI job to fail (cautions will not.) Signed-off-by: Stefano Stabellini diff --git a/docs/misra/rules.rst b/docs/misra/rules.rst index 7b366edb07..ef60e9a455 100644 --- a/docs/misra/rules.rst +++ b/docs/misra/rules.rst @@ -462,6 +462,15 @@ maintainers if you want to suggest a change. - Initializer lists shall not contain persistent side effects - + * - `Rule 13.2 `_ + - Required + - The value of an expression and its persistent side-effects shall + be the same under all permitted evaluation orders + - Be aware that the static analysis tool Eclair might report + several findings for Rule 13.2 of type "caution". These are + instances where Eclair is unable to verify that the code is valid + in regard to Rule 13.2. Caution reports are not violations. + * - `Rule 13.6 `_ - Required - The operand of the sizeof operator shall not contain any @@ -583,6 +592,15 @@ maintainers if you want to suggest a change. submitting new patches please try to decrease the number of violations when possible. + * - `Rule 18.2 `_ + - Required + - Subtraction between pointers shall only be applied to pointers + that address elements of the same array + - Be aware that the static analysis tool Eclair might report + several findings for Rule 18.2 of type "caution". These are + instances where Eclair is unable to verify that the code is valid + in regard to Rule 18.2. Caution reports are not violations. + * - `Rule 18.3 `_ - Required - The relational operators > >= < and <= shall not be applied to objects of pointer type except where they point into the same object