From nobody Sat May 30 11:15:09 2026 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; arc=fail (Bad Signature); dmarc=pass(p=quarantine dis=none) header.from=epam.com Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 177971074278680.96692927388824; Mon, 25 May 2026 05:05:42 -0700 (PDT) Received: from list by lists.xenproject.org with outflank-mailman.1319204.1586905 (Exim 4.92) (envelope-from ) id 1wRU3V-00047N-6w; Mon, 25 May 2026 12:05:13 +0000 Received: by outflank-mailman (output) from mailman id 1319204.1586905; Mon, 25 May 2026 12:05:13 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1wRU3V-000478-2E; Mon, 25 May 2026 12:05:13 +0000 Received: by outflank-mailman (input) for mailman id 1319204; Mon, 25 May 2026 12:05:11 +0000 Received: from mx.expurgate.net ([195.190.135.10]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1wRU3T-00044F-Py for xen-devel@lists.xenproject.org; Mon, 25 May 2026 12:05:11 +0000 Received: from mx.expurgate.net (helo=localhost) by mx.expurgate.net with esmtp id 1wRU3T-006YWw-5z for xen-devel@lists.xenproject.org; Mon, 25 May 2026 14:05:11 +0200 Received: from [10.42.69.9] (helo=localhost) by localhost with ESMTP (eXpurgate MTA 0.9.1) (envelope-from ) id 6a143aee-5cb7-0a2a0a5109dd-0a2a45099b8c-24 for ; Mon, 25 May 2026 14:05:11 +0200 Received: from [52.101.72.134] (helo=AM0PR02CU008.outbound.protection.outlook.com) by tlsNG-bad1c0.mxtls.expurgate.net with ESMTPS (eXpurgate 4.56.1) (envelope-from ) id 6a143af6-2497-0a2a45090019-34654886b266-3 for ; Mon, 25 May 2026 14:05:11 +0200 Received: from AM9PR03MB7526.eurprd03.prod.outlook.com (2603:10a6:20b:3de::17) by AM9PR03MB7026.eurprd03.prod.outlook.com (2603:10a6:20b:280::7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.21.48.19; Mon, 25 May 2026 12:05:09 +0000 Received: from AM9PR03MB7526.eurprd03.prod.outlook.com ([fe80::904d:5820:80e1:41ba]) by AM9PR03MB7526.eurprd03.prod.outlook.com ([fe80::904d:5820:80e1:41ba%3]) with mapi id 15.21.0048.019; Mon, 25 May 2026 12:05:09 +0000 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" Authentication-Results: eu.smtp.expurgate.cloud; dkim=pass header.s=selector1 header.d=epam.com header.i="@epam.com" header.h="From:Date:Subject:Message-ID:Content-Type:MIME-Version:x-ms-exchange-senderadcheck" ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=AK6ztw1xZoN/GsyUQ0/UjhX21tqNJClwKAen+sQ1t5wwhKGR31r+X8I13vpvNtZ2ew1pN8Lb0ymG2KTF+QPLLC/fINz5Gpgr0LM5lqncp70pRMQNql6IHrRGHsSYk9EYs+8XGTJzXgCfnFRd2K8kiRSeDgvsWFsdrUlKkjZhGWcqiZRHWU3GIcusIacWxlaHodjYaI6Z3HAY47V+INMt8YMlqukWGr8UJhb8uVfFPk/VpUhCGpvQoZ9HqeKhjCs2xHawC9SvYQaI4ajnolkRiAlc5GGWoA9idrjwLYMmPcKfSdOuvY6fNLXWXXjdJz4PACLNncVIgzF/dNLsec81/A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=tfHfQaxeNdr+CpHuEaonZEFBu7gjFFMWoYmdCiLZ2tI=; b=Z+Dku5TtxQdE0DO48enxSegVvhsL2+bOIpG5uJzQ4QIVeVRTgT2Wi39op58Ii2PpWUi+l5x2J81+jFQmCUO7OPxTbpj3mpjf5d0tSJieGCn3Yvpsu2XgUXsvAXrnSxDS2VNsDbMQXfyWhvRNWapcWvTs1GzTmwcGThBFUii0rrYPAY5aE6tkfmasabVCP/3+fXbKYN+gdyUQFuNahKHHjQiYZMRNEE5CLRlBhkv/h2y4CDnPGDJn2+kFLQX3kM62ElLChOHohQBrjqPFlKKsfLuMrsAjcCQCpiUPsk0R7rGTQEzlMtl/sJtVCK78KVaSLb+2ueAc51YCyCBcM+5w6A== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=epam.com; dmarc=pass action=none header.from=epam.com; dkim=pass header.d=epam.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=epam.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=tfHfQaxeNdr+CpHuEaonZEFBu7gjFFMWoYmdCiLZ2tI=; b=sgK1u2xWSJAoiBXRVF6bljCLGuDourpiEAxK8qSn92RfwzhB3aabdiFxN+Awm4zjvkTaxkapgeikVrvl+4B0iuMVwIluFQPM4vejgs/J2RioHkuNaYSm3NRf4/QdS0C4J0gr2lMM0y6ig0PfjDFZAN6zuhED/b6Q6dpncICgtK8DU9QJ9DqZXMeo7or5nkUDpnKUihjSZS4iDcGx44fg5fP9qUZCL3CsFOR9+XD1oJAnCFg8HXr4qFPR4gaDrnes9RTjxUCJwbL3YPz7MpyMMfxpNf86rt3ezBTqTE8lSS2qShvVdNAVckQAarqmiaBRq/zOGhZWS1GlVxipHn3VzQ== From: Dmytro Prokopchuk1 To: "xen-devel@lists.xenproject.org" CC: Dmytro Prokopchuk1 , Nicola Vetrini , Doug Goldstein , Stefano Stabellini , Andrew Cooper , Anthony PERARD , Michal Orzel , Jan Beulich , Julien Grall , =?iso-8859-1?Q?Roger_Pau_Monn=E9?= Subject: [PATCH 1/3] misra: deviate MISRA C Rule 5.5 for 'hypfs_alloc_dyndata' Thread-Topic: [PATCH 1/3] misra: deviate MISRA C Rule 5.5 for 'hypfs_alloc_dyndata' Thread-Index: AQHc7D673hceQskKjEuWuHstCHXB3g== Date: Mon, 25 May 2026 12:05:09 +0000 Message-ID: References: In-Reply-To: Accept-Language: en-US, uk-UA, ru-RU Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=epam.com; x-ms-publictraffictype: Email x-ms-traffictypediagnostic: AM9PR03MB7526:EE_|AM9PR03MB7026:EE_ x-ms-office365-filtering-correlation-id: fefb799f-7b3e-40d7-8bdd-08deba55de04 x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0;ARA:13230040|42112799006|376014|7416014|366016|1800799024|18002099003|11063799006|3023799007|56012099003|6133799003|22082099003|38070700021; x-microsoft-antispam-message-info: KP8+TKpy4/oT6l1VXwcThTC9Mb54M7kbajsxwRH4qk3cY/LZ+g7WMPvO/ggzaDR+fSYPXw1Vri088qX8b8EcGlpE7mlVVloA4XzNbcYUgrIBWp3T/o+HfQWd4a3ErSBtk8xzqM8g2e0KLb0srrYP0Hfy5s9ISC+L+2pj0O+vnyxJwVRyWKjpgbYOXrTR+o4d2c8D3Uv3hA+oG5tXDiJAQyn5WV8FWHIcaXvdTFRBu60kWijbMPpta8LTEf05KG5AGNOyzjASBlel1bmF261+fWYj5YbuXDijP91BXmJFPnPCQ8P9fEAANBseF9Ad4yoY8GQpvpg1baMFkRIGliAT7wMEHuBFYogLFpqrhQTU0ilyjHoDe9KzprhW7pVc09+xfdbVcxOno+g9dwEQaGqRjBIgDa/RZ6Q00zI8TbLy8M0bQHzcXmW9uP9ZfMNgh8F3mEZeyUwy5ls+9V5yDP2ZxCQJLfBiQvBYMS1UqpMnRogq+neRL8lIvaSYhBipiKv4DNXw48omFD+06QMG0XZBI3BQsdyFThxgzgF2AhkhztYjImYrIhemJeA4jlWp+c84InNRvzaP4/ION4dr7rKaCpBP5v7ZIMikpUG8ajvtl1sS1rxtTx8PgEoTNBiQZ+LCP6e6+0h5cBLIVmyaLUGb1BUi62CAs7/z+T2fmo2mBqS6L8sEoEhdmULlr8XGY7lawtgZUQJODu9DNYl3nBZwTe5C7Gq3kJuytwyIoINdeohyFe0OzwI3WbMr+YSYbRhf x-forefront-antispam-report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:AM9PR03MB7526.eurprd03.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230040)(42112799006)(376014)(7416014)(366016)(1800799024)(18002099003)(11063799006)(3023799007)(56012099003)(6133799003)(22082099003)(38070700021);DIR:OUT;SFP:1102; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?iso-8859-1?Q?K76tgRMMJ3rLya3WKiPZEWbcMizPxOcytVaQX7+p0h3IT8rY+Ph+mQ9z1K?= =?iso-8859-1?Q?mIqrMffdqP0JFS1qoE+m4pvJE4FNCzN9RYGK8VkFs8HoAsR6o8jYncARLd?= =?iso-8859-1?Q?Jk82wU8GGHil8K4fdNlINCl8WAI0j5rWyKDPi8DakDbkYUdF31jMIH45ZP?= =?iso-8859-1?Q?ZP1oaNxY+dhGscvUZPQo6o5fcp/pfJV+AlSBR22t1O1rf7wYdMf3OaXwz1?= =?iso-8859-1?Q?8onLRi1RtPy7rifOcrlSERbwfca3ZkkVvyeGWrH2473ex9ELHA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JcsF/JtIko4JVDgi1g/eCznP033aeWv6SoTg2T8C?= =?iso-8859-1?Q?Xd3yIoo1cBchskCuSB54fzBgqIPufm6J9Apd4FoJuQf3XTwio4kSFXB8TF?= =?iso-8859-1?Q?rpt1sEoJhPeEbzm1g/NPH7w4P0c1a9HpkG0k/H9N3DSI01huTwOWAvnEbt?= =?iso-8859-1?Q?0Iw3msn/AWHG36y2SA4e83LOZdkLeCvSDn5uoQaKk+UzpiO7Bd5/VQjHww?= =?iso-8859-1?Q?G5Iz48rgQ171BLMrarh0tkMcyoHhZHhSC7E4wVdVjPIZBoyXecREOEiUqd?= =?iso-8859-1?Q?NDSpSicdgBjdR9xk1kQ80qcvGDuuWyB9YqeTP4ryfo2B62/vdpYXGSRasb?= =?iso-8859-1?Q?yVX8r5Kt2aMNI4MKl2ydoyQW5x/gzX9a4d1MOYCBjpy3QvqLbWNqbold0x?= =?iso-8859-1?Q?ZxIazreGCnp+JdFzDOczbVOZwzi4W4ZE4Q4OUr4uxLqIkxfhp/pjMh1ucR?= =?iso-8859-1?Q?1bwq8CpBsWA/VUWqX6eFzxNRhW62jhGUBgkVd1KtilKrpxpO7KnFqsNCwb?= =?iso-8859-1?Q?14Tmq4UWYKLGGWCIc1tIL318tM/pbMl37cmqbAhW96yPieQexArPTXoTVv?= =?iso-8859-1?Q?8VpKX8z1ekL79gfA38ezVUBK6I4Z7zyvpdvlU5s8E3nHNbBMz+LA6RqT67?= =?iso-8859-1?Q?Z3QV4GgmyS17yIVyGI6e+6wKCnLqvVo=3D?= Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: epam.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: AM9PR03MB7526.eurprd03.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: fefb799f-7b3e-40d7-8bdd-08deba55de04 X-MS-Exchange-CrossTenant-originalarrivaltime: 25 May 2026 12:05:09.2436 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: b41b72d0-4e9f-4c26-8a69-f949f367c91d X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: 9mymJdIHltz1JqQPsI6/DSCGGlPftjP8sJvuRkc8T/VeQiwfKXzrAgtFnsQyvD5egsXLmzVayflpv4dDc/SOSd2nti+8bLjqMkFWI6fb210= X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM9PR03MB7026 X-purgate-ID: tlsNG-bad1c0/1779710711-88F71A53-9A0FA40D/0/0 X-purgate-type: clean X-purgate-size: 3746 X-ZohoMail-DKIM: pass (identity @epam.com) X-ZM-MESSAGEID: 1779710744972154100 Content-Type: text/plain; charset="utf-8" MISRA C Rule 5.5 states: "Identifiers shall be distinct from macro names". Update ECLAIR configuration to deviate intentional identifier and macro name clashes by specifying the macros that should be ignored. This includes 'hypfs_alloc_dyndata', where the real function takes an allocation size and the same-named macro is a typed convenience wrapper that expands calls using sizeof(type). Update deviations.rst and rules.rst accordingly. Signed-off-by: Dmytro Prokopchuk --- automation/eclair_analysis/ECLAIR/deviations.ecl | 6 ++++++ docs/misra/deviations.rst | 9 +++++++++ docs/misra/rules.rst | 4 ++++ 3 files changed, 19 insertions(+) diff --git a/automation/eclair_analysis/ECLAIR/deviations.ecl b/automation/= eclair_analysis/ECLAIR/deviations.ecl index 7d4b6f2948..13a34b7703 100644 --- a/automation/eclair_analysis/ECLAIR/deviations.ecl +++ b/automation/eclair_analysis/ECLAIR/deviations.ecl @@ -132,6 +132,12 @@ These macros address differences in argument count dur= ing compile-time, effectiv -config=3DMC3A2.R5.5,ignored_macros+=3D"name(update_gnttab_par||parse_gntt= ab_limit)&&loc(file(^xen/common/grant_table\\.c$))" -doc_end =20 +-doc_begin=3D"Clash between 'hypfs_alloc_dyndata' function and macro name = in 'xen/include/xen/hypfs.h' is deliberate. +The function is the allocator taking a size in bytes, while the macro is a= typed convenience wrapper used by dynamic +hypfs nodes to allocate per-request traversal data with the correct size a= nd return type." +-config=3DMC3A2.R5.5,ignored_macros+=3D"name(hypfs_alloc_dyndata)&&loc(fil= e(^xen/include/xen/hypfs\\.h$))" +-doc_end + -doc_begin=3D"The type \"ret_t\" is deliberately defined multiple times, depending on the guest." -config=3DMC3A2.R5.6,reports+=3D{deliberate,"any_area(any_loc(text(^.*ret_= t.*$)))"} diff --git a/docs/misra/deviations.rst b/docs/misra/deviations.rst index b048309596..f5b4ce9315 100644 --- a/docs/misra/deviations.rst +++ b/docs/misra/deviations.rst @@ -176,6 +176,15 @@ Deviations related to MISRA C:2012 Rules: unused 2nd and 3rd parameters to avoid warnings or errors related t= o them. - ECLAIR has been configured to ignore these macros. =20 + * - R5.5 + - Clash between the 'hypfs_alloc_dyndata' function and macro name is + intentional. The function is the allocator taking a size in bytes, = while + the macro is a typed convenience wrapper used by dynamic hypfs node= s to + allocate per-request traversal data with the correct size and retur= n type. + The implementation explicitly undefines the macro before defining t= he real + function, so the name clash is controlled. + - ECLAIR has been configured to ignore this macro. + * - R5.6 - The type ret_t is deliberately defined multiple times depending on = the type of guest to service. diff --git a/docs/misra/rules.rst b/docs/misra/rules.rst index b3e929307d..c0237725a9 100644 --- a/docs/misra/rules.rst +++ b/docs/misra/rules.rst @@ -222,6 +222,10 @@ maintainers if you want to suggest a change. Clashes between grant table functions and macro names are allowed because they are used for discarding unused parameters. =20 + Clash between hypfs_alloc_dyndata function and macro names is allow= ed + because the macro is a typed convenience wrapper around the size-ba= sed + allocation function. + * - `Rule 5.6 `_ - Required - A typedef name shall be a unique identifier --=20 2.43.0 From nobody Sat May 30 11:15:09 2026 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; arc=fail (Bad Signature); dmarc=pass(p=quarantine dis=none) header.from=epam.com Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 1779710751779935.6700769984808; Mon, 25 May 2026 05:05:51 -0700 (PDT) Received: from list by lists.xenproject.org with outflank-mailman.1319205.1586917 (Exim 4.92) (envelope-from ) id 1wRU3X-0004UM-DJ; Mon, 25 May 2026 12:05:15 +0000 Received: by outflank-mailman (output) from mailman id 1319205.1586917; Mon, 25 May 2026 12:05:15 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1wRU3X-0004UF-AH; Mon, 25 May 2026 12:05:15 +0000 Received: by outflank-mailman (input) for mailman id 1319205; Mon, 25 May 2026 12:05:14 +0000 Received: from mx.expurgate.net ([195.190.135.10]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1wRU3W-0004Tq-Da for xen-devel@lists.xenproject.org; Mon, 25 May 2026 12:05:14 +0000 Received: from mx.expurgate.net (helo=localhost) by mx.expurgate.net with esmtp id 1wRU3V-009ZMm-Pi for xen-devel@lists.xenproject.org; Mon, 25 May 2026 14:05:13 +0200 Received: from [10.42.69.8] (helo=localhost) by localhost with ESMTP (eXpurgate MTA 0.9.1) (envelope-from ) id 6a143aef-2eae-0a2a0a5409dd-0a2a4508d8a2-16 for ; Mon, 25 May 2026 14:05:13 +0200 Received: from [52.101.83.125] (helo=GVXPR05CU001.outbound.protection.outlook.com) by tlsNG-c1860d.mxtls.expurgate.net with ESMTPS (eXpurgate 4.56.1) (envelope-from ) id 6a143af8-63b5-0a2a45080019-3465537d3e5b-3 for ; Mon, 25 May 2026 14:05:13 +0200 Received: from AM9PR03MB7526.eurprd03.prod.outlook.com (2603:10a6:20b:3de::17) by AM9PR03MB7026.eurprd03.prod.outlook.com (2603:10a6:20b:280::7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.21.48.19; Mon, 25 May 2026 12:05:10 +0000 Received: from AM9PR03MB7526.eurprd03.prod.outlook.com ([fe80::904d:5820:80e1:41ba]) by AM9PR03MB7526.eurprd03.prod.outlook.com ([fe80::904d:5820:80e1:41ba%3]) with mapi id 15.21.0048.019; Mon, 25 May 2026 12:05:10 +0000 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" Authentication-Results: eu.smtp.expurgate.cloud; dkim=pass header.s=selector1 header.d=epam.com header.i="@epam.com" header.h="From:Date:Subject:Message-ID:Content-Type:MIME-Version:x-ms-exchange-senderadcheck" ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=XSyYHwcdGkp/piFroI8HCrDIxrRMatBzGMiR1AfMB+pgs1+x8vNVdCLnQG+iW2IGSyhyP62rdMgYbj2zV8SzBH2Xmq6IyOz8h8IvAU7uu8OkoUPPgSzd8SCKWx8UpKwSKae+sc1bmR50BINjoTXCzcI4IkQTZ7YMTQE6MCf4EHhCUuvENt9OuEk4EXghva9Oivxi0/q88wnvDCd0faUZ0JgnAtlAdCAboArfXRuw6HbNQceXfg5oaT+lZnXDgWTZDPHJgUqKmMvFAjbdKRHbNz6bvp5Ekzb0icgwrgdPlQIkIYDRAV+to9TIqJKsnTbI3l3CVzzX2dOSuvJia3k/3Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=EBJqopGr6g4Rs9QOkGhc7LSDyZACBgo/wZojZWVMwSw=; b=M4XQnBbQwy4RowH7Nl0uu0xwnS8dWtuIBnLgd62TwsJb3L2n+uo/or/v85hxJ7fgKPb9Raq9UmecjRtK4eS0rbs+QyGtxV3iNcQ8aB4yN/yE4kmeclsSeT6fNt3PAtFQgCsFyW+90WDaFjjwrDY59f3g6MA+OGAcA1864eyaJuOtbvYRUvgnA6Cqa3zCYFv/29e1BtVowebhg6hL1YM/WEbRTPehSN2IE/NRAeOU18uFq5XyCPb80mNJHa6g8QT6U6LPx+oeSbsDQXvJd7X0GSazcTrKGge0EQEOFGPVz+0g2oqQFvqbjnDpPBwj4Xqj+yONdIxtUJsOkOE0ia6jnw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=epam.com; dmarc=pass action=none header.from=epam.com; dkim=pass header.d=epam.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=epam.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=EBJqopGr6g4Rs9QOkGhc7LSDyZACBgo/wZojZWVMwSw=; b=JkkVwt+PU0L25LKV3qMsP3ESbFYfc+MKimKJAGKC0pcfW9mXvgamVm5+LYKa+4Jzt5DjGZO5sL65dpWCe6HCbWJTqUOwj/nL+Up1XWmnkZbxELW62k3DNALhqOb5va3uaHtVanMTBauIBrjGv/7fyQ49oFXHTk7ZYb/Uv3jxVLrh8fHs2nlyv47y6jdNLjxJBtCqAcaCNOY0p1n9AuKqfqe74e5/o4YbUNBBkS6mphaf3XSYy/loIM1p0+1uycKr3Mbjz/uq+N0bFCZEoJAeoe70mLb7jv644kZfyNXGUktTsTQ14iMj/ya+qTCKjJ8NCVwXk5V0Ak7Yf+M7zP2qKg== From: Dmytro Prokopchuk1 To: "xen-devel@lists.xenproject.org" CC: Dmytro Prokopchuk1 , Nicola Vetrini , Doug Goldstein , Stefano Stabellini , Andrew Cooper , Anthony PERARD , Michal Orzel , Jan Beulich , Julien Grall , =?iso-8859-1?Q?Roger_Pau_Monn=E9?= Subject: [PATCH 2/3] misra: deviate MISRA C Rule 5.5 for 'request_irq' Thread-Topic: [PATCH 2/3] misra: deviate MISRA C Rule 5.5 for 'request_irq' Thread-Index: AQHc7D68tJeu+7CD8Eibunvyp3IKiQ== Date: Mon, 25 May 2026 12:05:10 +0000 Message-ID: References: In-Reply-To: Accept-Language: en-US, uk-UA, ru-RU Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=epam.com; x-ms-publictraffictype: Email x-ms-traffictypediagnostic: AM9PR03MB7526:EE_|AM9PR03MB7026:EE_ x-ms-office365-filtering-correlation-id: 4b2608c0-9a7d-43be-ecbb-08deba55deb1 x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0;ARA:13230040|42112799006|376014|7416014|366016|1800799024|18002099003|11063799006|56012099003|6133799003|22082099003|38070700021; x-microsoft-antispam-message-info: sOySvuvpO0XjwOSkuXFkCSzRmzY5eE8LlKwqonu/eAUiWzj7jHSiCJsHdhy/0mdGbsqN6w8fF5+vPdRGsUFIbg2uWp/N0YbDIIS1A91WE0o/gqZ6hYKvrAqulUru8iMgNRGHig9K1tDp3aMAufmU8ofWFYEdLrfYrToktKN+Nyo/LRH9bMg7U9NGLNeGqJJm5vvLljhU7LN6gWBqPccyBc1beQH+12lm9aiE1jYKicRe+IIR0DehrsSI8WrST3FzDPqHQtpuzvqgOXRscXr+VmcCcTu8FHPXeHLdMC9WVs0y9smxhv1gPgRFjVsTENiVVrdlk8w9VUzHR23JqKBPhfuQUdmM5UQIMUwDtpZJdtWtc0VewlCjXrFK2KSxI15fYk1o41+Y6xFWzbI3STBp9anrc4Za0p3IcI3FO7nCG0McMBNIGisYL/AtCWUZjo74cacfn17l/19M21FXTsXllzto3fH5L0acfolFdaYunYY6POUtyisn/0cAvDbbwMznimm0FyC/b0osHYnMeM5sjk31eZ3D4CmV+b14CwgUeEYjKsg+lXZN8vT+7QroktvL1ftMRw2zhFh9L7aCDxj5dCSURG3jzVCB/vvrEoLVwQl3Y1BHyDf1+Ix6UiQIWuGl2gudESyaeDWssFEQUgwLERuTZgLMdlz6tq+PVB7goBF2fmk2XzCUwfi7Iz+3jqvkPdOA/UzaGhdQ9dFGagPkIenhJrb/huvFCbgR+PW9IOTrzeVGh+FldRKxbdtS+/qM x-forefront-antispam-report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:AM9PR03MB7526.eurprd03.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230040)(42112799006)(376014)(7416014)(366016)(1800799024)(18002099003)(11063799006)(56012099003)(6133799003)(22082099003)(38070700021);DIR:OUT;SFP:1102; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?iso-8859-1?Q?/+ptrYb0rjrHiVQINeSgtmGm6R4U9U3hiL0j34j+Y6Yhx/KZ1T3IrN3BIp?= =?iso-8859-1?Q?ton/0GDncG9bACurzqKUo81LHimWAyxkgVVq5zTUKxqNEB/An0zJzDUmGz?= =?iso-8859-1?Q?YYqouCvWNL4HxoiEGXhTuFVDA+d3n4hu12DkmKlFcLz+GV6NXSRQYmyU7n?= =?iso-8859-1?Q?cPm/9KGzwqykinVZ0h5pcJoNiz2s7Q/fD7Z65lwTQWDu6IR+UJYrW+Ayn2?= =?iso-8859-1?Q?BKwLiJwUWK7wz53v2ocXrR1/kob3/TrRAoz7FXwnW9tm657RPr0PZNwHsa?= =?iso-8859-1?Q?HEi5n/ptEpfXtLxXw+sFJ4QhAd4V48XyelYv0Ihgu8XozdnFHmtF5Iy2ev?= =?iso-8859-1?Q?NWH7/ToNCSc0/uLXW05oZhYe9gIETVl3PgTojRLzzzNWVEqBZo2t0yx+Nc?= =?iso-8859-1?Q?ksSgEhCJLh413VKcDYu02fRwrZaFAdLIDC4fMoCqeWWQYVlwCcKRy878qH?=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4HgWWd1vdFRICvpr4e/VKy89RglHCxj?= =?iso-8859-1?Q?WCgbPrL+5a0q/9BxLy0gh32pChNKl5WnhBARJFDOzwzsGH0sS9b/1mJclH?= =?iso-8859-1?Q?Jd9hu+W2zu6rvmNQ5ELQ1ngNxzgZ7ICD8Y10R/iwi4pb7a5ZeeVUry519q?= =?iso-8859-1?Q?jrfkX3WWkbYXAa+4+vRIUkdjGfuNF9YF/5NeYXUs8hbAxxBEYFrIerIVq5?= =?iso-8859-1?Q?NstfFCfVRGZgOhrdLtYJrrZV1dPof1mfstrZiN2wW9wuuvhmvs4NpqsGnd?= =?iso-8859-1?Q?D8plyHdvYrumovZl8iOzWitOWbnOpojjPODG5PvA8ssJ1z7vqXIrzr6phM?= =?iso-8859-1?Q?1lwlkYXjGjmCGGnDG2ZJrOXd9OIrlyoiqons0GsErkPavpvZnOLbZf0RSj?= =?iso-8859-1?Q?pon+FPY1p/ne2EdXYClctptJhZW0JD1Rrj8nyudGQkLuSKxvALgvspGdSF?= =?iso-8859-1?Q?bN1c7kXsznZgiH9+DXtj/ttg15fM6ak=3D?= Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: epam.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: AM9PR03MB7526.eurprd03.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 4b2608c0-9a7d-43be-ecbb-08deba55deb1 X-MS-Exchange-CrossTenant-originalarrivaltime: 25 May 2026 12:05:10.4094 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: b41b72d0-4e9f-4c26-8a69-f949f367c91d X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: KDik52oSrEsEyHt6g7E6PVQQsKHQgIHCPSiMDhIMMzvJOYpU3VTs+cXWw29o7DymZHUrXHRDX2OHu7GNT3Ls6Jney7IvnaDZVrSXojLDxJE= X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM9PR03MB7026 X-purgate-ID: tlsNG-c1860d/1779710713-B6B74DB1-D5857156/0/0 X-purgate-type: clean X-purgate-size: 3492 X-ZohoMail-DKIM: pass (identity @epam.com) X-ZM-MESSAGEID: 1779710752266158500 Content-Type: text/plain; charset="utf-8" MISRA C Rule 5.5 states: "Identifiers shall be distinct from macro names". Update ECLAIR configuration to deviate intentional identifier and macro name clashes by specifying the macros that should be ignored. This includes 'request_irq', where the Xen function takes the IRQ flags before the handler argument, while the macro adapts ARM SMMU driver calls by reordering the arguments. Update deviations.rst and rules.rst accordingly. Signed-off-by: Dmytro Prokopchuk --- automation/eclair_analysis/ECLAIR/deviations.ecl | 6 ++++++ docs/misra/deviations.rst | 7 +++++++ docs/misra/rules.rst | 4 ++++ 3 files changed, 17 insertions(+) diff --git a/automation/eclair_analysis/ECLAIR/deviations.ecl b/automation/= eclair_analysis/ECLAIR/deviations.ecl index 13a34b7703..7aa64796ba 100644 --- a/automation/eclair_analysis/ECLAIR/deviations.ecl +++ b/automation/eclair_analysis/ECLAIR/deviations.ecl @@ -138,6 +138,12 @@ hypfs nodes to allocate per-request traversal data wit= h the correct size and ret -config=3DMC3A2.R5.5,ignored_macros+=3D"name(hypfs_alloc_dyndata)&&loc(fil= e(^xen/include/xen/hypfs\\.h$))" -doc_end =20 +-doc_begin=3D"Clash between 'request_irq' function and macro name in 'xen/= drivers/passthrough/arm/smmu.c' is deliberate. +The function uses the Xen 'request_irq()' argument order, while the macro = is a compatibility wrapper that adapts +ARM SMMU driver calls by reordering the handler and flags arguments." +-config=3DMC3A2.R5.5,ignored_macros+=3D"name(request_irq)&&loc(file(^xen/d= rivers/passthrough/arm/smmu\\.c$))" +-doc_end + -doc_begin=3D"The type \"ret_t\" is deliberately defined multiple times, depending on the guest." -config=3DMC3A2.R5.6,reports+=3D{deliberate,"any_area(any_loc(text(^.*ret_= t.*$)))"} diff --git a/docs/misra/deviations.rst b/docs/misra/deviations.rst index f5b4ce9315..01f141b73f 100644 --- a/docs/misra/deviations.rst +++ b/docs/misra/deviations.rst @@ -185,6 +185,13 @@ Deviations related to MISRA C:2012 Rules: function, so the name clash is controlled. - ECLAIR has been configured to ignore this macro. =20 + * - R5.5 + - Clash between the 'request_irq' function and macro name is intentio= nal. + The function uses the Xen 'request_irq()' argument order, while the= macro + is a compatibility wrapper for the ARM SMMU driver that adapts call= s by + reordering the handler and flags arguments. + - ECLAIR has been configured to ignore this macro. + * - R5.6 - The type ret_t is deliberately defined multiple times depending on = the type of guest to service. diff --git a/docs/misra/rules.rst b/docs/misra/rules.rst index c0237725a9..097c20432e 100644 --- a/docs/misra/rules.rst +++ b/docs/misra/rules.rst @@ -226,6 +226,10 @@ maintainers if you want to suggest a change. because the macro is a typed convenience wrapper around the size-ba= sed allocation function. =20 + Clash between request_irq function and macro names is allowed becau= se + the macro is a local compatibility wrapper that adapts ARM SMMU dri= ver + call to Xen's request_irq() argument order. + * - `Rule 5.6 `_ - Required - A typedef name shall be a unique identifier --=20 2.43.0 From nobody Sat May 30 11:15:09 2026 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; arc=fail (Bad Signature); dmarc=pass(p=quarantine dis=none) header.from=epam.com Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 1779710745923601.9610309210509; Mon, 25 May 2026 05:05:45 -0700 (PDT) Received: from list by lists.xenproject.org with outflank-mailman.1319206.1586927 (Exim 4.92) (envelope-from ) id 1wRU3a-0004jx-PT; Mon, 25 May 2026 12:05:18 +0000 Received: by outflank-mailman (output) from mailman id 1319206.1586927; Mon, 25 May 2026 12:05: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 1wRU3a-0004ji-MW; Mon, 25 May 2026 12:05:18 +0000 Received: by outflank-mailman (input) for mailman id 1319206; Mon, 25 May 2026 12:05:15 +0000 Received: from mx.expurgate.net ([195.190.135.10]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1wRU3X-0004UC-A3 for xen-devel@lists.xenproject.org; Mon, 25 May 2026 12:05:15 +0000 Received: from mx.expurgate.net (helo=localhost) by mx.expurgate.net with esmtp id 1wRU3W-009ZMm-MN for xen-devel@lists.xenproject.org; Mon, 25 May 2026 14:05:14 +0200 Received: from [10.42.69.8] (helo=localhost) by localhost with ESMTP (eXpurgate MTA 0.9.1) (envelope-from ) id 6a143aef-2eae-0a2a0a5409dd-0a2a4508d8a2-20 for ; Mon, 25 May 2026 14:05:14 +0200 Received: from [52.101.66.92] (helo=DUZPR83CU001.outbound.protection.outlook.com) by tlsNG-c1860d.mxtls.expurgate.net with ESMTPS (eXpurgate 4.56.1) (envelope-from ) id 6a143afa-63b5-0a2a45080019-3465425cc28e-3 for ; Mon, 25 May 2026 14:05:14 +0200 Received: from AM9PR03MB7526.eurprd03.prod.outlook.com (2603:10a6:20b:3de::17) by AM9PR03MB7026.eurprd03.prod.outlook.com (2603:10a6:20b:280::7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.21.48.19; Mon, 25 May 2026 12:05:11 +0000 Received: from AM9PR03MB7526.eurprd03.prod.outlook.com ([fe80::904d:5820:80e1:41ba]) by AM9PR03MB7526.eurprd03.prod.outlook.com ([fe80::904d:5820:80e1:41ba%3]) with mapi id 15.21.0048.019; Mon, 25 May 2026 12:05:11 +0000 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" Authentication-Results: eu.smtp.expurgate.cloud; dkim=pass header.s=selector1 header.d=epam.com header.i="@epam.com" header.h="From:Date:Subject:Message-ID:Content-Type:MIME-Version:x-ms-exchange-senderadcheck" ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=Xrds4nm7JxNrnnPdGnys41jOQxYhVNN8L6uqjc4evF4ovE7FyJDyY0M6pQdC1iCz4ZDLT4o6O6zK9ku3sX07N4g2Dfl+4bW3r9YYMDsyrUXjb0OjliAw1zApb+TQ+RTCLIHuxy6JMhxKFsYFmVnPjLktY3JO7trndbsGNnyDKB6A8osaxVxZJ6gdSZ8feOlj3G0aIoFSfs1Q/rYrPHySvrsQ8xjlvep8ytVAzg3wNhmIiCuTJt37ojvGhH3jVIPZl9EiVKFK4p46dH2n30SP41i4v1gxYxlBqxna81CFSVC1pT7loNy+HW5VO4lcLlXpW0ZmM+D4QCw8Zx0hc4sQIQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=SHEcpWwv2FcGeXR0uHdB9/GQWUnOUZtgyNumyPniiaU=; b=QqP3k5Wjh6r/ImOzwIAUPtLqPDDQSAuf9kf6eqeGb+0EjmIf5KIyW/oNr9LLAzu+uA394zoXouOF9oKiw2fTGgF3hEtuAxPyeLc0dnx1gThKBU46Ez3UlneplGNLEUA1aaEx2niOv3zKSOE+v0ii7FMq81/MBUpq7xJZyVB6Ij5zLiItufMOWSRN/qfQmOOL5BAncikKoiQonOZN+fSPIXgkuB0MPViyYJKnAKJ/Km8lQ58hKxth/eKzFZu3xhIPQ0ZdI0sXTnDFJnrk3Ec7UlgbqI4wT3mZb2F/YvOjmsokwB8VG5hfA12L5dq2wjuq0Gq0iETy2htnOcGjbGvRZA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=epam.com; dmarc=pass action=none header.from=epam.com; dkim=pass header.d=epam.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=epam.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=SHEcpWwv2FcGeXR0uHdB9/GQWUnOUZtgyNumyPniiaU=; b=PJKIv5NhHljgspuGZ7+vKAuAvUGh2mX/kAN7abZeQLW3ORSs/CBcAf27tLSGjrWVrNSS/l/KeYF44fXmxN+fiDY5kZOe2iSNwx+FgN5fLime1Nelanjh/A58x6NVhIhrRXWshSpt9FXD/nT29OLjDmjTZb/fqktq95dtwQ8Z6BD6+5o9V2i74w6pMm4Gq3IK4NsKJlYPtNN61XhhSDzr+lgsDI+gUwt7f/Px0yXs3Qa132aAMf6oqMjWcUJc98IrHxmcOhDkBQZyKtIgoPYJF35R+SKXHdphNIPjYnf0tEAJe/FPhe4XDeVHJPpMAEZfnh3JGK3yyMgUE3PHDW/2xg== From: Dmytro Prokopchuk1 To: "xen-devel@lists.xenproject.org" CC: Dmytro Prokopchuk1 , Nicola Vetrini , Doug Goldstein , Stefano Stabellini , Andrew Cooper , Anthony PERARD , Michal Orzel , Jan Beulich , Julien Grall , =?iso-8859-1?Q?Roger_Pau_Monn=E9?= Subject: [PATCH 3/3] misra: deviate MISRA C Rule 5.5 for ARM SMMU fault handlers Thread-Topic: [PATCH 3/3] misra: deviate MISRA C Rule 5.5 for ARM SMMU fault handlers Thread-Index: AQHc7D68DYz1t9d3DEat28YU/t35Lw== Date: Mon, 25 May 2026 12:05:11 +0000 Message-ID: <9a9f7757613143c1b1e9806a134df7b3afb5ca54.1779709902.git.dmytro_prokopchuk1@epam.com> References: In-Reply-To: Accept-Language: en-US, uk-UA, ru-RU Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=epam.com; x-ms-publictraffictype: Email x-ms-traffictypediagnostic: AM9PR03MB7526:EE_|AM9PR03MB7026:EE_ x-ms-office365-filtering-correlation-id: f83490c2-b103-4cd3-a7e6-08deba55df4c x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0;ARA:13230040|42112799006|376014|7416014|366016|1800799024|18002099003|11063799006|56012099003|6133799003|22082099003|38070700021; x-microsoft-antispam-message-info: X52CCRIoq2+9rnmy+epSwDjA9Wpz/oxIiMHNNAmI38XsFjG2wOF185ktnv1LO/EDIPUEOQN/kxuwxMYz1IWMGvKwj65ZEVstjL0d+tduFR7iLEk3hBnXc/hdUzIGSUoSsN2IM2xN2RlS615MOJiL6GErHXNzqZjRrpli0lB2Co8RvnnEnnaVqAvqHGUcihjkgTafL/3c9cXbWPluxEI3Vus8C9zh81RjU2sA/w0LPViM7ba+bMMhHS3Lf/EHex3wfrL6XRs2x3rfOMPyeRxQCxiL7z1Z7hf/pZoRvaBcP4JlaC7dMSSwLYA54O8mUmGgTZnX1hfv8mVdUX0yHkMFaEwxt4PazWDMPywWl6hH8iugcIYg7vw6ASVzPKkbdHmWVTj3TEkc7MRmWHjkBGua+8hlrOeLmUd9YWA++Ght7ZUZsULuP12zsLnP71hRFVBGx3vWcGTFE8yJwl+GfD106cBieBCNP2ab+xekAzuId8J/F3zV6qd/9tP4XfKe1Ly2PSwKuwhEr5Gw0zPaLmgOdHfEU9Ba6/GxzEESfvmwIDY54v9bMHZtY+Y+imIjN7meD93WweLJ7SJ65MNx1rIns52Lcb+ssx8dtmvad9NYKAeHyb6MWRY3GlGJt37KrJSjWi69exLIg1o029Mqmb+pjoYqYTK8WlW2qayFwcLDWUGO0fupijItJxZse8fXqVjl8ZwyNPR98AywqBepkbukXKrDzJZSDSkYk20lk6ssLTKmMQUhFzQQEPMd2lfB8etw x-forefront-antispam-report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:AM9PR03MB7526.eurprd03.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230040)(42112799006)(376014)(7416014)(366016)(1800799024)(18002099003)(11063799006)(56012099003)(6133799003)(22082099003)(38070700021);DIR:OUT;SFP:1102; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?iso-8859-1?Q?oqU7YxvYaJD6bB4sToKBYM9g3AtvAvEFeEvrrDz6X92u+QxgW0AeGgN2ch?= =?iso-8859-1?Q?h2tEY+Rk4Hf1bKfsMvliBxSDgBB9bAYeETbKHMeiRJHaRIAyJfJ80hLnjk?= =?iso-8859-1?Q?JnxkMx4257s++KpOqTSTTmLntTg016ftBSt7UpotyYvmq6TOswEaYlCPox?= =?iso-8859-1?Q?AfVYp42NalRlFXa4MXfp9P6OJXI80ClyUORH7SLniHb3lQrD3U26eI1zcS?= =?iso-8859-1?Q?p6t0TXxgH4srl3+VCe42uk60Q1skZHHKRnw1jIXhBOnB1uGvKtgDY7tFN6?= =?iso-8859-1?Q?NY3Q+c25eyfff5rJWGrC+LT2azW7GkGpIiYos0XWW4sdlTseoKS5+9S8Wg?= =?iso-8859-1?Q?kCrftM3PPWk8ljjj+pbsON99VLwjXEKFzI48DXcpUN8MMoh7hA+afkgwWo?= =?iso-8859-1?Q?i69EplpD/jb09OwgUQFVRlY6WSHcrP5KssOQibV1o4m+lsG0mnclef0TNs?= =?iso-8859-1?Q?+YDX9iot/6iKyF9upLlynpC3nRlZL4T9M1/Xd0i/vl5CxtWxbAWLq5VXPS?= =?iso-8859-1?Q?zmOpOUTz0utkeCgtOvvsceKMjtL2NUk6ouOcHxbfK+ZxP8GGd0l/28TS0V?= =?iso-8859-1?Q?zfRX96vuW7ovq1SqvNuEyzTfcgpScjc4jlUAKGGv3NXN3VWmrvFBaX8vks?= =?iso-8859-1?Q?ph5c1gINNrlyosiwA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?iso-8859-1?Q?qbEFqqScuScfLrLXWjwepzV1hkPqwLF4r0mmrPTjr5PiX4OKhrPCZeuiel?= =?iso-8859-1?Q?D5HE2uS+medlGVgWtkrP0P5BXXBU9N0q+8Vly3UnzumST+2g7gTRPH/uY/?= =?iso-8859-1?Q?+ewYBKnWQBVFJFDiDzt/LfaQbm4ZwbGZiBnkewmkfUZABuqy3brfIpC54C?= =?iso-8859-1?Q?h/4VY5nXUNWnXOYhOov91lAm9FTJu+PZtoQ/KtpFLWg8nur6sbJHe11pKs?= =?iso-8859-1?Q?AQrrChGKMQ7lNNPoPX6qRI9/WOkQ8V4=3D?= Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: epam.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: AM9PR03MB7526.eurprd03.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: f83490c2-b103-4cd3-a7e6-08deba55df4c X-MS-Exchange-CrossTenant-originalarrivaltime: 25 May 2026 12:05:11.4235 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: b41b72d0-4e9f-4c26-8a69-f949f367c91d X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: aWfd3doEtHVI7ZRou4zgUXnH8j4/NbHql7aNtdPdmvw/wqoDK9k8/Pb2OtWtx0ECrYB/QX7dDDe8tCduExkrCICBkGnylGLHpfveFrK+Q3s= X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM9PR03MB7026 X-purgate-ID: tlsNG-c1860d/1779710714-BCF62DB1-56AE5B67/0/0 X-purgate-type: clean X-purgate-size: 3670 X-ZohoMail-DKIM: pass (identity @epam.com) X-ZM-MESSAGEID: 1779710748821154100 Content-Type: text/plain; charset="utf-8" MISRA C Rule 5.5 states: "Identifiers shall be distinct from macro names". Update ECLAIR configuration to deviate intentional identifier and macro name clashes by specifying the macros that should be ignored. This includes 'arm_smmu_global_fault' and 'arm_smmu_context_fault', where the original ARM SMMU handler returns irqreturn_t, while the same-named macro redirects later uses to a Xen wrapper with the void interrupt-handler signature expected by Xen 'request_irq()'. Update deviations.rst and rules.rst accordingly. Signed-off-by: Dmytro Prokopchuk --- automation/eclair_analysis/ECLAIR/deviations.ecl | 6 ++++++ docs/misra/deviations.rst | 7 +++++++ docs/misra/rules.rst | 4 ++++ 3 files changed, 17 insertions(+) diff --git a/automation/eclair_analysis/ECLAIR/deviations.ecl b/automation/= eclair_analysis/ECLAIR/deviations.ecl index 7aa64796ba..419a23ce8e 100644 --- a/automation/eclair_analysis/ECLAIR/deviations.ecl +++ b/automation/eclair_analysis/ECLAIR/deviations.ecl @@ -144,6 +144,12 @@ ARM SMMU driver calls by reordering the handler and fl= ags arguments." -config=3DMC3A2.R5.5,ignored_macros+=3D"name(request_irq)&&loc(file(^xen/d= rivers/passthrough/arm/smmu\\.c$))" -doc_end =20 +-doc_begin=3D"Clashes between ARM SMMU fault handler functions and macro n= ames in 'xen/drivers/passthrough/arm/smmu.c' are deliberate. +The original ARM SMMU handler returns irqreturn_t, while the macro redirec= ts later uses to a Xen wrapper with the +void interrupt-handler signature expected by Xen 'request_irq()'." +-config=3DMC3A2.R5.5,ignored_macros+=3D"name(arm_smmu_global_fault||arm_sm= mu_context_fault)&&loc(file(^xen/drivers/passthrough/arm/smmu\\.c$))" +-doc_end + -doc_begin=3D"The type \"ret_t\" is deliberately defined multiple times, depending on the guest." -config=3DMC3A2.R5.6,reports+=3D{deliberate,"any_area(any_loc(text(^.*ret_= t.*$)))"} diff --git a/docs/misra/deviations.rst b/docs/misra/deviations.rst index 01f141b73f..15c88b82f4 100644 --- a/docs/misra/deviations.rst +++ b/docs/misra/deviations.rst @@ -192,6 +192,13 @@ Deviations related to MISRA C:2012 Rules: reordering the handler and flags arguments. - ECLAIR has been configured to ignore this macro. =20 + * - R5.5 + - Clashes between the ARM SMMU fault handler functions and macro name= s are + intentional. The original ARM SMMU handler returns irqreturn_t, whi= le + the macro redirects later uses to a Xen wrapper with the void + interrupt-handler signature expected by Xen 'request_irq()'. + - ECLAIR has been configured to ignore these macros. + * - R5.6 - The type ret_t is deliberately defined multiple times depending on = the type of guest to service. diff --git a/docs/misra/rules.rst b/docs/misra/rules.rst index 097c20432e..88d2c5fa7c 100644 --- a/docs/misra/rules.rst +++ b/docs/misra/rules.rst @@ -230,6 +230,10 @@ maintainers if you want to suggest a change. the macro is a local compatibility wrapper that adapts ARM SMMU dri= ver call to Xen's request_irq() argument order. =20 + Clashes between ARM SMMU fault handler functions and macro names are + allowed because the macros redirect ARM SMMU driver uses to a Xen i= nterrupt + wrapper with the handler signature expected by request_irq(). + * - `Rule 5.6 `_ - Required - A typedef name shall be a unique identifier --=20 2.43.0