From nobody Fri Oct 31 03:54:05 2025 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=quarantine dis=none) header.from=kernel.org ARC-Seal: i=1; a=rsa-sha256; t=1750722402; cv=none; d=zohomail.com; s=zohoarc; b=S4y8t0jqt19bRs+c8nY2tNE6d3FN43OIizcTDb0yLGYt4nXeJn55QhK87aiLu2qcHTTwN7xjwMlZ42nm5UTyos2C5Qi3U/dV0VAztJ5T8ywhh3cmpEumE3dKzYqDlTG+dvKNxYeaB/uthVXxvc92hucomF8Ro5Eb7C/eycdrnu8= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1750722402; 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=anPVr/0iOlgK120I5Ytu0eCIEw8rFv8bRJmOaZLDUX0=; b=d6qriyerbnaRKj+gHcTibLolq0UvYTk5t6ZgQ+8GJdbOYnrEmTpLHDQpobzz0iFwoBsoSBgT4dHHN2LjNhK9Sp+Fx69ZAJ+weWid/bfaccPeYSARdu+oNlHi9Vde5wzYTO3sdXF/7TJEopZt72UuTBJvweiEqsRWdqQUtYNnj88= 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=quarantine dis=none) Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 1750722402234507.1707995730875; Mon, 23 Jun 2025 16:46:42 -0700 (PDT) Received: from list by lists.xenproject.org with outflank-mailman.1022858.1398714 (Exim 4.92) (envelope-from ) id 1uTqri-0000lX-7b; Mon, 23 Jun 2025 23:46:18 +0000 Received: by outflank-mailman (output) from mailman id 1022858.1398714; Mon, 23 Jun 2025 23:46:18 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1uTqri-0000lQ-4s; Mon, 23 Jun 2025 23:46:18 +0000 Received: by outflank-mailman (input) for mailman id 1022858; Mon, 23 Jun 2025 23:46:16 +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 1uTqrg-0000lK-FZ for xen-devel@lists.xenproject.org; Mon, 23 Jun 2025 23:46:16 +0000 Received: from dfw.source.kernel.org (dfw.source.kernel.org [2604:1380:4641:c500::1]) by se1-gles-flk1.inumbo.com (Halon) with ESMTPS id 37d401bc-508c-11f0-b894-0df219b8e170; Tue, 24 Jun 2025 01:46:02 +0200 (CEST) Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by dfw.source.kernel.org (Postfix) with ESMTP id 926265C5D54; Mon, 23 Jun 2025 23:43:43 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id AB553C4CEEA; Mon, 23 Jun 2025 23:45:58 +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: 37d401bc-508c-11f0-b894-0df219b8e170 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1750722359; bh=3BTFfLfGn5OuY5t/PSSuT86s2TgeHkTuuV4slV83vyY=; h=Date:From:To:cc:Subject:From; b=l7B4N3fC+ibv8i3i9b3PudMM7ok7YOSv8xLQYG6WKUWjZiEEy+jIJnHYveKHKslkv 4cgwwIuptjvcDaI1spoFYxhEtP68/w8/xPQrpj1S4qu4cZbhG2erkYDRhkjzZXd+ns voc/eHXpGNRSuAdyMF+3r44cHuAjQYbrNMgExJJGjVly1q95Cv63KSgbvANHxOVny2 jm8Nu/T3nhDYLdRKREyYwtkXaheqlZKUWLBzmltyvulghM8/cbakwfXo+eNVa3QR/3 y0mDa3NUtCLxJY37U+/w97Rx2KIm+df25CgHZuCZqdQsDQK2gOmb8L4HTRu+t+QdoX zuRIla2ZAYYyA== Date: Mon, 23 Jun 2025 16:45:57 -0700 (PDT) From: Stefano Stabellini X-X-Sender: sstabellini@ubuntu-linux-20-04-desktop To: xen-devel@lists.xenproject.org cc: sstabellini@kernel.org, andrew.cooper3@citrix.com, michal.orzel@amd.com, jbeulich@suse.com, julien@xen.org, roger.pau@citrix.com, Bertrand Marquis Subject: [PATCH] docs/misra/rules.rst: allow string literals with memcmp 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: 1750722403665116600 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Rule 21.16 is about the types of arguments allowed for memcpy. Add string literals to the allow-list under specific conditions. Suggested-by: Jan Beulich Signed-off-by: Stefano Stabellini diff --git a/docs/misra/rules.rst b/docs/misra/rules.rst index e1c26030e8..3e014a6298 100644 Acked-by: Jan Beulich --- a/docs/misra/rules.rst +++ b/docs/misra/rules.rst @@ -813,7 +813,9 @@ maintainers if you want to suggest a change. shall point to either a pointer type, an essentially signed type, an essentially unsigned type, an essentially Boolean type or an essentially enum type - - void* arguments are allowed + - void* arguments are allowed. string literal arguments are allowed + when the last argument passed for the comparison is less or equal + to the size of the string. =20 * - `Rule 21.17 `_ - Mandatory