From nobody Mon Sep 16 19:11: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=1720824380; cv=none; d=zohomail.com; s=zohoarc; b=bMBUoTwo4Bx5MCVtyhSji82POEazpsax3oUt0+N3rL+nSl+NhEGDqZQtSPYcDFdC+NdU8NCfs6GbAm6d55mwSxzqfP1OgSssOE8OLLCMWLGlgp3rBq1xllTBtVr2TA4ZDovrg/SeAc2y5OvR/kfOrgQqmTYTShA6+oHRVP7Hp+c= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1720824380; h=Content-Type:Cc:Cc:Date:Date:From:From:List-Subscribe:List-Post:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=5EbBHyPO6EMs4zqud3D1+A1Nv3DKxvHHeKpmEYpE2Rc=; b=QZ9c0CktblyzHXQqsxpgmnyQ+SygtQqsSz1p441Nrs5fkznEOsmcxRc7I80gs+/hytZv5QLiPOaE5EYiniN0F6Uco0EMxou136TA2zvBs4xgsO4rQSxROsy/45yqKyt/FN/MXY6G3uAcJOwizo02+rXxKa78AbSm5mRuLgChLpM= 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 17208243802599.175920902701478; Fri, 12 Jul 2024 15:46:20 -0700 (PDT) Received: from list by lists.xenproject.org with outflank-mailman.758357.1167817 (Exim 4.92) (envelope-from ) id 1sSP1c-0004aO-H6; Fri, 12 Jul 2024 22:46:00 +0000 Received: by outflank-mailman (output) from mailman id 758357.1167817; Fri, 12 Jul 2024 22:46:00 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sSP1c-0004aH-E2; Fri, 12 Jul 2024 22:46:00 +0000 Received: by outflank-mailman (input) for mailman id 758357; Fri, 12 Jul 2024 22:45:59 +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 1sSP1b-0004aA-4R for xen-devel@lists.xenproject.org; Fri, 12 Jul 2024 22:45:59 +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 80c5121e-40a0-11ef-bbfb-fd08da9f4363; Sat, 13 Jul 2024 00:45:58 +0200 (CEST) Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by dfw.source.kernel.org (Postfix) with ESMTP id 6262A619B0; Fri, 12 Jul 2024 22:45:56 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 1BBD8C32782; Fri, 12 Jul 2024 22:45:55 +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: 80c5121e-40a0-11ef-bbfb-fd08da9f4363 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1720824356; bh=tNvDrLIwB9v6RbLpfTEFhpue7YBQWeeNEzOHwRcw4zQ=; h=Date:From:To:cc:Subject:From; b=r4P6fIxJu7GI4Xbm4/4qHp8v4YCPAsOhT74VNjRHrqQOV6cKcDyKYf60nTfLfcHTm q/PQSDJSg69htnwcAyGTFYCwlAPG2RMeWgercdj0nLjMibRp8DlWCrvkwhSDhzX1G3 PDgjyJc1CzkrNT/xrchGs7Vr8xnlNKh8Pk9eEg/Zc0znwhJi/oEGQLxlNNVH1rUs6f YzpuvgzenSQVSlBv9GtSzmgsjQdgys9w4+M5ukTx22FPTUIRniAJQvGTTfx7O0QcMf fP81pcQTlU3Cipj4qKbXiSPPlQSc6b2vDpKtxK26dAqmbWjq6fJFPKbixtmxnbIfp7 fJRaPfZnRghfQ== Date: Fri, 12 Jul 2024 15:45:54 -0700 (PDT) From: Stefano Stabellini X-X-Sender: sstabellini@ubuntu-linux-20-04-desktop To: xen-devel@lists.xenproject.org cc: jbeulich@suse.com, sstabellini@kernel.org, andrew.cooper3@citrix.com, julien@xen.org, michal.orzel@amd.com, bertrand.marquis@arm.com, roger.pau@citrix.com Subject: [PATCH] docs/misra: add rule 12.2 Message-ID: User-Agent: Alpine 2.22 (DEB 394 2020-01-19) MIME-Version: 1.0 X-ZohoMail-DKIM: pass (identity @kernel.org) X-ZM-MESSAGEID: 1720824380443116600 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" As discussed during the last MISRA C meeting, add Rule 12.2 to the list of MISRA C rules we accept, together with an explanation that we use gcc -fsanitize=3Dundefined alone to check for violations. Signed-off-by: Stefano Stabellini diff --git a/docs/misra/rules.rst b/docs/misra/rules.rst index 2e11566e20..a7e2b646de 100644 Acked-by: Jan Beulich --- a/docs/misra/rules.rst +++ b/docs/misra/rules.rst @@ -443,6 +443,14 @@ maintainers if you want to suggest a change. - The macro NULL shall be the only permitted form of null pointer con= stant - =20 + * - `Rule 12.2 `_ + - Required + - The right hand operand of a shift operator shall lie in the range + zero to one less than the width in bits of the essential type of + the left hand operand + - We rely exclusively on gcc -fsanitize=3Dundefined to check for + dangerious violations to this rule and to ensure compliance + * - `Rule 12.5 `_ - Mandatory - The sizeof operator shall not have an operand which is a function