From nobody Thu Jul 23 21:11:49 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=pass (i=1 dmarc=pass fromdomain=epam.com); dmarc=pass(p=quarantine dis=none) header.from=epam.com ARC-Seal: i=2; a=rsa-sha256; t=1783866473; cv=pass; d=zohomail.com; s=zohoarc; b=N/oHQzcdzzHXK7NeKkFulqKWWFky9Jx9qUWov3w1W0bErMjygxQn8oCTUB160cMDuMcuGPd+b9D5LliyBNghalZCa7k0atRIYoVYdGDZ8gjhqRgOGmQ5YWjdxUC3gkyhrW1Bh11/P7sRa9Qlmvo5P13xS8GHMN6LpnXPZbDlIWo= ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1783866473; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=Aikdj9hX9Ez/J0T4upRKLp62iT8tY2+jkV0GfNhHj3w=; b=aFbXcfPPawNUa/YKA/wt/QjyDfBOTXu8/yIWIo98KsMZol74i+PmEHi48xJ2HENDVqh5W5F0QovZN3r35nKypUPIyi5oH6vdlE+/M7joW0Q9TAQ5bPJYKszfkAjGSgcDpJsqXc/aK5PZwvZhN4Nvbjnt0OJAWbvpOa4hy4eZ238= ARC-Authentication-Results: i=2; 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=pass (i=1 dmarc=pass fromdomain=epam.com); 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 1783866473811773.2070288950442; Sun, 12 Jul 2026 07:27:53 -0700 (PDT) Received: from list by lists.xenproject.org with outflank-mailman.1361068.1613563 (Exim 4.92) (envelope-from ) id 1wiunZ-00014v-MK; Sun, 12 Jul 2026 14:04:49 +0000 Received: by outflank-mailman (output) from mailman id 1361068.1613563; Sun, 12 Jul 2026 14:04:49 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1wiunZ-00014J-Ix; Sun, 12 Jul 2026 14:04:49 +0000 Received: by outflank-mailman (input) for mailman id 1361068; Sun, 12 Jul 2026 14:04:47 +0000 Received: from mx.expurgate.net ([194.145.224.20]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1wiunX-00011o-Kj for xen-devel@lists.xenproject.org; Sun, 12 Jul 2026 14:04:47 +0000 Received: from mx.expurgate.net (helo=localhost) by mx.expurgate.net with esmtp id 1wiunX-004b44-07 for xen-devel@lists.xenproject.org; Sun, 12 Jul 2026 16:04:47 +0200 Received: from [10.42.69.6] (helo=localhost) by localhost with ESMTP (eXpurgate MTA 0.9.1) (envelope-from ) id 6a539eb8-e002-0a2a0a5209dd-0a2a4506b1e8-38 for ; Sun, 12 Jul 2026 16:04:46 +0200 Received: from [52.101.83.95] (helo=GVXPR05CU001.outbound.protection.outlook.com) by tlsNG-16d1c6.mxtls.expurgate.net with ESMTPS (eXpurgate 4.57.2) (envelope-from ) id 6a539efe-0835-0a2a45060019-3465535f2cc0-4 for ; Sun, 12 Jul 2026 16:04:46 +0200 Received: from AM9PR03MB7526.eurprd03.prod.outlook.com (2603:10a6:20b:3de::17) by AS2PR03MB9540.eurprd03.prod.outlook.com (2603:10a6:20b:597::6) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.21.181.23; Sun, 12 Jul 2026 14:04:45 +0000 Received: from AM9PR03MB7526.eurprd03.prod.outlook.com ([fe80::904d:5820:80e1:41ba]) by AM9PR03MB7526.eurprd03.prod.outlook.com ([fe80::904d:5820:80e1:41ba%5]) with mapi id 15.21.0181.019; Sun, 12 Jul 2026 14:04:44 +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=wZqb2QjNkYYs8YImGebgSvADWlIoN+xi/REvKo9fwqPa0blpX6wGjq4VJ7jc91VzJraANOBrtwrrwrjAMrCb4LH4nC1R/eqyc8rNJe0X/8flUPC5T2kpEMWxCBbZ3/th0V80VAbrzFUkP1rnHe/Rna6cj2iSFy5uruTSk6605lxDjV/Sxbh7tHWTJczTFlvCV7D9fEcLfkQUF8QXukTbo5Fu1aH+06o6+7DHhHqvl/Bnn8gnT3EQYLvn1Feju2376UMXD7DlJzEkXePxBgpEs4ddz9iIz9wpaIQRWb+T74K8sSRpeMMogTNc9Um3n+YQydiXVgkYV391P2EtS4H36w== 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=Aikdj9hX9Ez/J0T4upRKLp62iT8tY2+jkV0GfNhHj3w=; b=PyPyy/DD7FaayYdCDyyjnCdItWAVNM/LCyyr2WM5VEQBbNNF6hK/D9gIyqqEpeX+7XmumtDPph9TcFC2aaUH37reVVpbgLbRESUWi24bLGgUVV4AEaGzuC/pHYrhGw1jNVS3m+BpNOClqCdSVo9UAB+j3GV+Zb9rS0fzpFbRTb0xoqYf8w5OaEu7T5AFRUW49q3OV791BKwB2naMal5b/jsYx76wbfo2ao0sJ/zaO4Dvlb4MUdEJYNkMQo1EVI4IyV4U/t/T/2jFnuUfF8DALEwJgSJQM0e07CMT14f2xcj/awFmHdtZDGp21yo0Fu/Rdf62WWNWIkZr7RR+7PvZSA== 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=Aikdj9hX9Ez/J0T4upRKLp62iT8tY2+jkV0GfNhHj3w=; b=c5eFi0IE+V5FXJsSsdkxmWqwXBKps3dUM0j+UVcl0ac1InnDP1yUE4tn/qt6V3rx/SYZl6RNzTE/p0FMZm2/vJm8cFJGvgALeaM4V2UUIL2/PDXRI/Ouf+bhbfqYA2hvpVHAXzZQM+2Q/EQ6yct4bixGDT0k6WxE8k939pQL79nNoZwx1UdgZtQtON5aYuur2w3MyV0AJ+1UBzcMAQVMuQQeEEkil9Rpo6Du4+eWmL9mecJGv+JMOBpsUho6nmc3qCZ7ZunFoZenexND+W6ZYWEn/VHAQTLXAqfuNbhnPBvcZgIBG370DBGipoe5HL+x6+PuWIhy3xxIuxwEbY46+A== 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 v2 1/3] misra: deviate MISRA C Rule 5.5 for 'hypfs_alloc_dyndata()' Thread-Topic: [PATCH v2 1/3] misra: deviate MISRA C Rule 5.5 for 'hypfs_alloc_dyndata()' Thread-Index: AQHdEgdk86c5ivEPyUWTFvlIOTPRVw== Date: Sun, 12 Jul 2026 14:04:44 +0000 Message-ID: <365f750cfbc626e763819da2604bfccab2ac80f8.1783864426.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_|AS2PR03MB9540:EE_ x-ms-office365-filtering-correlation-id: 5732a9ca-9ca0-4a2a-143a-08dee01e86df x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0;ARA:13230040|7416014|376014|366016|42112799006|23010399003|1800799024|38070700021|6133799003|56012099006|11063799006|18002099003|22082099003|3023799007; x-microsoft-antispam-message-info: XQ+Kevlc3CthY0HZqBZ15qpJ5w/9eovsMr/6KXwnZF3UnPzb8FlgMttgm1LT+SkrE9NhsTpA/iNYlsEgjezwZMy+klFmMcRZWszYyGOc9fnK1gcKxEwxzKArfUWviYEBOZGrDV8sKmeHZYWds3Y7wIhzbv4hc3dY4cQin/Rix26uKedLOnUrpGOGFDsNNYqFakPlZsgGnghw31XxalQOUGNovdykwJfP4TyD59LonHbqHJqswqgEOUyqMwIijgm0ly99Xw1Baln+mpc1//1lmiVaXJcchHUnp+wkYlptYyhCqFOXIEeD5lh+Bno3Z07ABG9L0m/06yc6zdeZ8jFKDXoxtIi6mLzLqOswb4c4QyIoeDQLSyCVrAuHs/HjvMf3yXv61hHKvvOlza6j+bv43iXuCKyQbJBClzE3WyqLxzIowIUVJuyiUy/Pgq49MmCsL7OdyRvZIoaeEatbgXEtYJ+AncfVwn7M4CbhtGE4wYDf+MQ15ciKNRK0sjaktoSfGWd4tU1TVNlGNvUdsr9O5jJTZr50i8ZjT5vhDpgWWnTgJd1OvX892BMAiEikkSubqQvHgUi8O7yTn1nzmkPVI3orXJs2IpVoCkr7p8zXmeWNYiLjf0sHHI7rsloQS5TZZ2gNoxnERdrmjVcqkWhNmN5Re9RyX447PpkTxX8wFbDjdX1z6QgBywifg0wDtpO1m70lq4Usg/jz7rl/4WU53EaEDcweIDcoWefjcN4a7M4= 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)(7416014)(376014)(366016)(42112799006)(23010399003)(1800799024)(38070700021)(6133799003)(56012099006)(11063799006)(18002099003)(22082099003)(3023799007);DIR:OUT;SFP:1102; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?iso-8859-1?Q?14q3TJ841CYSsPMCjNK51LyR7ntP3QgvEeBTXXbB95ztUIL1DTMds7zaw8?= =?iso-8859-1?Q?znYSztZn8Ek5C61xx+rJ8chkUTx8M4qMjZGTN2f+T19EEST1YywXOD9ZH1?= =?iso-8859-1?Q?kIeuUVkMTRKmmy8aSetf6i8w+xd7a5oeZBOjBG9DCf70cGSOeX/rWRyjsm?= =?iso-8859-1?Q?PKTVG9b6qXlu47m24kdyVQR6oiF1idOEpok7QXNvmoz9dVJbVKtlUo1VEH?= =?iso-8859-1?Q?lVSPxqo0+kWGEQd87rM74JyzNZm/9KaKHm4MyM6a7CgUul6t6AEBVEvkDN?= =?iso-8859-1?Q?+22WMGMw6FP0ZmbFmVLDxwDn3f7PNa90ZitAbuQPdSf5/6j9O7woEZG70S?= =?iso-8859-1?Q?56joIMo9YtTMh1VyZHYrBhVs2cQ3opwa0Q6pTZADNnc+q0k8LQI3o0O02p?= =?iso-8859-1?Q?hJpLw5u/r/v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v93TTaiqn?= =?iso-8859-1?Q?TFSiMYRp5RvLbESZeLkmLRmG97R0MmZYzmHT1vCDohbCHyzILhi3lc+fi9?= =?iso-8859-1?Q?GwKfgvGDpKZJuyUxl461XcOJ3HObefVXEQjQnfUOjWHtVFVoh/QRT9hy4g?= =?iso-8859-1?Q?7Hp69u4HEae27p2x4h/hkwA9fwJcaoRSdjWhXthY40t6+MhdzggmDA+IcM?= =?iso-8859-1?Q?HlMIiZtfbfprT81+ym+Qq+/MXDNf3j0cfh6lhht5P5B74jwqGlgodAnHkd?= =?iso-8859-1?Q?fzmNf5IT9p3PYlswTMsexBrlPdjPxm287mOvnFwMo2xCfFKpNHdZdBE2mL?= =?iso-8859-1?Q?2kNCOSLqg9th1JvCyyFBWRQaVMf1qY80Z/z6LAD2a7GrETcfj3axiU3gHO?= =?iso-8859-1?Q?hq9mRLm4fHsoLSrmOC+xCC4IAwa4jVH2lSQMASwAN5yfq1CjZ8E1w6yqBA?= =?iso-8859-1?Q?jGiBjEe05fsbMB1FaqoU0lL2NQ1mmdMvoWV+yTnIxYze1RyrxJZ1445ZwZ?= =?iso-8859-1?Q?lgF9sVZMnc1WXjrDzHv2GfkYbzyxus4=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: 5732a9ca-9ca0-4a2a-143a-08dee01e86df X-MS-Exchange-CrossTenant-originalarrivaltime: 12 Jul 2026 14:04:44.9303 (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: 117NiS7hxS6lG42AHtVm03trps662ETqKIJcXLpmSo7eIQ+g6//yTV5XES+vbvlufhLgaut4eyOI/ae8vnJLbPyDXvCl89tHAm2NDHGcDJw= X-MS-Exchange-Transport-CrossTenantHeadersStamped: AS2PR03MB9540 X-purgate-ID: tlsNG-16d1c6/1783865086-FAF55617-69B895B7/0/0 X-purgate-type: clean X-purgate-size: 3525 X-ZohoMail-DKIM: pass (identity @epam.com) X-ZM-MESSAGEID: 1783866475068158500 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 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 Acked-by: Jan Beulich --- automation/eclair_analysis/ECLAIR/deviations.ecl | 4 ++++ docs/misra/deviations.rst | 9 +++++++++ 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 7d4b6f2948..7e743f7c5e 100644 --- a/automation/eclair_analysis/ECLAIR/deviations.ecl +++ b/automation/eclair_analysis/ECLAIR/deviations.ecl @@ -132,6 +132,10 @@ 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 nam= e in 'xen/include/xen/hypfs.h' is deliberate." +-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..ab80f01195 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 + deliberate. The function is the allocator taking a size in bytes, w= hile + 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..4f7b7fc848 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 all= owed + 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 Thu Jul 23 21:11:49 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=pass (i=1 dmarc=pass fromdomain=epam.com); dmarc=pass(p=quarantine dis=none) header.from=epam.com ARC-Seal: i=2; a=rsa-sha256; t=1783866478; cv=pass; d=zohomail.com; s=zohoarc; b=kHioNRA1Q5Xd9toH1NFS7YbV9P/qi2+bFIogS0AYrszqG9+dLzNSs28vfjGtBUtNjZFaRwnYcqglLYLNOeFXIY923KFRI0k3CVUZeb96lzRpIJzRRvPJBI37sM1H/g1QnpFLmAOYauWXn9UG9Z6xk2Q5VPiS7q3W8MQa6EyOTGw= ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1783866478; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=0pZ1BxC6Bi6p0st6xJAQ+Jaqgwg9JBDmWidIIVcm3DY=; b=HGJKKAVsBc4tMDTDr1+s3h/yTxv0/8mgNw34gaV2j8mHZGTPolAwGXuB4eWW8vYk6FkhbRy5qKBhcSOnUzMxQR0wK8OEQAbxdAL0hC43GkvfABo3CoorDMwlvgBXnjlXrJiScHbgMlWySw7UfKOlp9Jza4/4hVds4X7VJLqMkDY= ARC-Authentication-Results: i=2; 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=pass (i=1 dmarc=pass fromdomain=epam.com); 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 1783866478257837.7891661596858; Sun, 12 Jul 2026 07:27:58 -0700 (PDT) Received: from list by lists.xenproject.org with outflank-mailman.1361069.1613579 (Exim 4.92) (envelope-from ) id 1wiuna-0001RX-V4; Sun, 12 Jul 2026 14:04:50 +0000 Received: by outflank-mailman (output) from mailman id 1361069.1613579; Sun, 12 Jul 2026 14:04:50 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1wiuna-0001RP-Q7; Sun, 12 Jul 2026 14:04:50 +0000 Received: by outflank-mailman (input) for mailman id 1361069; Sun, 12 Jul 2026 14:04:48 +0000 Received: from mx.expurgate.net ([195.190.135.10]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1wiunY-00011z-Lm for xen-devel@lists.xenproject.org; Sun, 12 Jul 2026 14:04:48 +0000 Received: from mx.expurgate.net (helo=localhost) by mx.expurgate.net with esmtp id 1wiunY-001wfr-2Q for xen-devel@lists.xenproject.org; Sun, 12 Jul 2026 16:04:48 +0200 Received: from [10.42.69.12] (helo=localhost) by localhost with ESMTP (eXpurgate MTA 0.9.1) (envelope-from ) id 6a539ec5-bab6-0a2a0a5309dd-0a2a450cb914-28 for ; Sun, 12 Jul 2026 16:04:48 +0200 Received: from [52.101.83.131] (helo=GVXPR05CU001.outbound.protection.outlook.com) by tlsNG-d25034.mxtls.expurgate.net with ESMTPS (eXpurgate 4.57.2) (envelope-from ) id 6a539eff-e897-0a2a450c0019-34655383bb6d-3 for ; Sun, 12 Jul 2026 16:04:47 +0200 Received: from AM9PR03MB7526.eurprd03.prod.outlook.com (2603:10a6:20b:3de::17) by AS2PR03MB9540.eurprd03.prod.outlook.com (2603:10a6:20b:597::6) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.21.181.23; Sun, 12 Jul 2026 14:04:46 +0000 Received: from AM9PR03MB7526.eurprd03.prod.outlook.com ([fe80::904d:5820:80e1:41ba]) by AM9PR03MB7526.eurprd03.prod.outlook.com ([fe80::904d:5820:80e1:41ba%5]) with mapi id 15.21.0181.019; Sun, 12 Jul 2026 14:04:46 +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=XIXYm8nLETFalaod7ahYh9tne8QIUChUnJIVG6wlGhZd4lR6+DU5esvhk01y+Zsa8Yc8DZeT2z/x7OfV8xKB9ciqZSXvd5R6Sni5ZFjt9e1Mk6ckB6fy5e0qGZnrqnvseufpgmhbhG4Uvauo4JOEQ1NCO6C+VITPBj4d/L80feH3xHKn48vXv/Ml/IjmhOIBSka3A6b3Tc8sxOYSPgL9NE2g/1XYAgu250tyKC/wGiM0sZRMCjggxy3AWEC6QkLXQ0grMEb+wz/Ewwdw9zD7ori8GuYhjGyqTil+ufS95kpoSxVB7pH7uCJg6EqJKBuz+h9NLhcCASDdM1oAHHzjAw== 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=0pZ1BxC6Bi6p0st6xJAQ+Jaqgwg9JBDmWidIIVcm3DY=; b=viqg/sZvTmdp3jX+qkR2dS0BXbIjXWfCSH2E2Ptpxfw7gZB+P4q5RhuRJoRE56MAWz8wuA8OJ8sz6UNZQ/qW4PEBbcVXCPrW6/EVNGnhyv+CKZHNXLMy+BgQvHaUmX4cX08JmIUmEv6aw2Go+jogfV/6CeV9Yj0aYTyIKwTG5ycb8PM3pKyJK3uedPeoJB6feSl3IOP+Pghm3XEudf9uM6yW53ZNmPvaucbSIMDAOPVPqPrV5ZWjOvG/vXzZsDBIgIZOpOktj3wEq00x1frAdqXrgcDz91z5N6UOts3b7iligbPIR8qg5PqHTF7ggpAqSPRj5VakFFFQzMju4rCa4A== 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=0pZ1BxC6Bi6p0st6xJAQ+Jaqgwg9JBDmWidIIVcm3DY=; b=WFn1G+gNmwzD4cqHj7A4BNPGt39adXc5p4XRY8ZJtFeEo0dukSkXrFUenqBSuOhFDDq1J6XUyUGs+0sluQd/pVyVdpbZphUUYjIPBKi2q80mFh9ue8Y/1e0PGFPLN8MybWBaVnuNhlzM7GLmWyC1Tzr55qlTydn76ihWNd2Q0ir8NUIadpdpVF+2n6zkgVCSHfP3YCkYvcUhCgZYE5BBBeSZzmwsYVEin9YmTpmvNvDGxTOKw26tyDRb8s64r8YtdVnxBn5tr/+oCnMxAIFvuy6o4gib0V31kRVzm4HDqJsVbvWTkS/AxMZyKyvI5oBdPoAoXxr0kwnhIZhwLSLYEg== 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 v2 2/3] misra: deviate MISRA C Rule 5.5 for 'request_irq()' Thread-Topic: [PATCH v2 2/3] misra: deviate MISRA C Rule 5.5 for 'request_irq()' Thread-Index: AQHdEgdlLv7TI7G6yke6ZZX0wGJbmw== Date: Sun, 12 Jul 2026 14:04:46 +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_|AS2PR03MB9540:EE_ x-ms-office365-filtering-correlation-id: 1921255b-fac5-4f2a-94be-08dee01e8798 x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0;ARA:13230040|7416014|376014|366016|42112799006|23010399003|1800799024|38070700021|6133799003|56012099006|11063799006|18002099003|22082099003; x-microsoft-antispam-message-info: b9g93jowf4YkdNINRrEtZEbCpazx+LN0AYN9BJBt43pH/0RugH0VxJg6WGDVAWqePMYfu6Ir9+S7z+xemBmwjwvU+KJ1E5ui9j4fUjEJqfL7t1Ei6KQf03IxJpXnHmOrIYOcBEIWS1h56xSSgggUqr9ODArYGiQclacboc2juD80HBRwmfYsPHdgwEb7WW6+Ovr1uz0fx8h0X5W7C1xL9TxcMR2owrtL1OdGNxktAhb6j/K5L4U/OdD/2yU9BxlgC7sLiBNQHFf2zZWacWrNdfM9NSt5zFDLQuH0k6jPWYSWZsFpKQcm84fL7KzjhlIANvVWtn7uOcy1AfZ5qGTVs6G16J+jVCDe62yfU8+Yv0SmPOjaZiwkxLR49LnlF41DiZluYRKBE9n4twW5h9L12M5nIDlFkvvH53g0VHKwXF6Sa7AdoOLwnsRIn+uZk61W4ONyzWnYFL4d0W7K2UNzthWT/0G1Y3HfBx18GoUJWN5ZTIf1fJMENYA2RhdKKaQRev73FB1ObZwUTVojULUusCc5W3Uhk6jN7psIc4fSnIl/djngaOLF3Ez36ntWP4SOOiKgyZQtFED9yfnP6/7AGoLTOgKwe6SpoE6MHrg50/WmatgkyUvfI2lvXye1Chv4it8U+AeitHQ7z/mG+FdESu9/vMSpXQ7jdbf4GAu32FGaA+DAe6otJGGxxJwASHPBSgTNZusrmsI3OauRhe48eWSdxv4YKSVKP/ejo/idrHk= 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)(7416014)(376014)(366016)(42112799006)(23010399003)(1800799024)(38070700021)(6133799003)(56012099006)(11063799006)(18002099003)(22082099003);DIR:OUT;SFP:1102; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?iso-8859-1?Q?lOVuiFzehkbcRSWNxKJL1taZNj8TVQKPGTGrmgWLGvkw1SxCmYKwZZLT/y?= =?iso-8859-1?Q?HH80FG+V5n4ogoPAv5GsBAYRAHwtbhAMTNMr2TCMANeCJqZKmDx5nZr/1q?= =?iso-8859-1?Q?ffHhdExcdxbNU+2grDy7z1D2uYrVzV5R+6Bu40jAol5oodpPRnVq+j5IDw?= =?iso-8859-1?Q?p+2gGS6FJVgK4+oGx8g4yLVeicvo+wrpNBy+XhGFpzr0d0Y8xXVOPi+Pso?= =?iso-8859-1?Q?Ex3PqBYt0neM5hCEA682NbNH93bFQUz6sgTRktKpq15gsXkNfOCQLnKTGD?= =?iso-8859-1?Q?C/9CK8b/dtBGqgs9SVNluLsIZrjataNs+BdDBl8LdcU0pljf9+EdCnxP/F?= =?iso-8859-1?Q?3mhF9NVfMkIchJvt4G3syduORSAoYsYCD/t1TEZQOd89OuhiNB+VVWfk4G?= =?iso-8859-1?Q?bKc1FAYBZJGh9dUUlXXIYFdgJg24gLry62HdOrQx1523YsrupehT/lZB9H?= =?iso-8859-1?Q?gp1BjvMpTkyWZMC/HouVrI07xVRxAO1F+xkjHDPj71zWHlnA66WHXKc4v2?= =?iso-8859-1?Q?w0gDK9TUDMyGYfXmcvL6eFlMwUuhRcOj+EIlX7ryEn57dXWXk8PzWRD+9m?= =?iso-8859-1?Q?m0Qx2o76mGTV06mQeRliokUOQqntm5Q4/LghyUE1st4S5Zp6QTqPe3+bqW?= =?iso-8859-1?Q?Szr786quKJP5E+cyBN2/PP8lmzCHUxPHu5v4LWWoi3Eg/moUWhBz1hXOi1?= =?iso-8859-1?Q?SFCgboNy7GSYkodJulZQT4ZzmWDDgGfoO0c29Jb5478rTuYwY082+8BbKz?= =?iso-8859-1?Q?duiIc1Bkq8CPNUQIcvgoPv0k9YIwBj50i/Pe/V6e4utoiLLk4bPVAES3Ui?= =?iso-8859-1?Q?Vdfgnxb6Z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2N9iY3VL3GCr0Zq9e/hh1ZfTBr?= =?iso-8859-1?Q?U16jfxJFqhEu6/PRA2poFuRYc0NpX7kKs1N/sPVV1dVnlyxthfc/9w2yl2?= =?iso-8859-1?Q?4HCB6vDRT3lBBGlbZgXhx0Q9Ol/fpEc=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: 1921255b-fac5-4f2a-94be-08dee01e8798 X-MS-Exchange-CrossTenant-originalarrivaltime: 12 Jul 2026 14:04:46.1247 (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: Qx4mbIYeN2Y27iyOqA/Y5XfGVae30gVtUPw+WGoM0gx2EYu/rPo1QBu+kiPCHQV/bGbc3AhuU5syrvkJwWOaUlrHVgtz/ZVKuZ5oPuzh3Rg= X-MS-Exchange-Transport-CrossTenantHeadersStamped: AS2PR03MB9540 X-purgate-ID: tlsNG-d25034/1783865088-57F636B2-C4CD68A7/0/0 X-purgate-type: clean X-purgate-size: 3296 X-ZohoMail-DKIM: pass (identity @epam.com) X-ZM-MESSAGEID: 1783866478801158500 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 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 | 4 ++++ docs/misra/deviations.rst | 7 +++++++ docs/misra/rules.rst | 4 ++++ 3 files changed, 15 insertions(+) diff --git a/automation/eclair_analysis/ECLAIR/deviations.ecl b/automation/= eclair_analysis/ECLAIR/deviations.ecl index 7e743f7c5e..f7ffd78a36 100644 --- a/automation/eclair_analysis/ECLAIR/deviations.ecl +++ b/automation/eclair_analysis/ECLAIR/deviations.ecl @@ -136,6 +136,10 @@ These macros address differences in argument count dur= ing compile-time, effectiv -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 'xe= n/drivers/passthrough/arm/smmu.c' is deliberate." +-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 ab80f01195..3eb9912c45 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 delibe= rate. + 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 4f7b7fc848..40aff97a07 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 bec= ause + 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 Thu Jul 23 21:11:49 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=pass (i=1 dmarc=pass fromdomain=epam.com); dmarc=pass(p=quarantine dis=none) header.from=epam.com ARC-Seal: i=2; a=rsa-sha256; t=1783866475; cv=pass; d=zohomail.com; s=zohoarc; b=maXjXLOCqNpCGPArwnsyRnzzLSwA+Jc/jhzNECKo7JIzMSj00+EJ4OHLvwBJ4OMzP3kl/CSy4NzSFnnBbdgeWjqQcaSlEgvPl3PBjknS+MA/brR1t8Iweyy/sJMSEPBWdMw9y0JzoGwhxDgvXRNTmnKEZGUsI3G5+eMY4ghgSn0= ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1783866475; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=cgnoE2/vbR0U54fdtVsbfuzS4jDVloiK5WrMbSsnuKc=; b=DJ2RhyzZk18viBE85TpmR/mrqs7y17Rh5/9P06oBJ8TxZzg3/vg//bz4QPjOOCT7gbcfcf4oBeARn0p7itAGhV5/ZMojEDZFZBmUEe43HucAw8vdrtHVCjquPt1+Z/JUSI+NEZD1iAxA6wAP2kNsoBaQZjWcvUuiHBEIs6PVp6k= ARC-Authentication-Results: i=2; 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=pass (i=1 dmarc=pass fromdomain=epam.com); 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 1783866475052570.7611152606721; Sun, 12 Jul 2026 07:27:55 -0700 (PDT) Received: from list by lists.xenproject.org with outflank-mailman.1361070.1613582 (Exim 4.92) (envelope-from ) id 1wiunb-0001X8-8b; Sun, 12 Jul 2026 14:04:51 +0000 Received: by outflank-mailman (output) from mailman id 1361070.1613582; Sun, 12 Jul 2026 14:04:51 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1wiunb-0001Ve-4q; Sun, 12 Jul 2026 14:04:51 +0000 Received: by outflank-mailman (input) for mailman id 1361070; Sun, 12 Jul 2026 14:04:50 +0000 Received: from mx.expurgate.net ([194.145.224.20]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1wiuna-0001Aj-2o for xen-devel@lists.xenproject.org; Sun, 12 Jul 2026 14:04:50 +0000 Received: from mx.expurgate.net (helo=localhost) by mx.expurgate.net with esmtp id 1wiunZ-004b44-Fg for xen-devel@lists.xenproject.org; Sun, 12 Jul 2026 16:04:49 +0200 Received: from [10.42.69.6] (helo=localhost) by localhost with ESMTP (eXpurgate MTA 0.9.1) (envelope-from ) id 6a539eb8-e002-0a2a0a5209dd-0a2a4506b1e8-40 for ; Sun, 12 Jul 2026 16:04:49 +0200 Received: from [52.101.83.87] (helo=GVXPR05CU001.outbound.protection.outlook.com) by tlsNG-16d1c6.mxtls.expurgate.net with ESMTPS (eXpurgate 4.57.2) (envelope-from ) id 6a539f01-0835-0a2a45060019-34655357a96b-3 for ; Sun, 12 Jul 2026 16:04:49 +0200 Received: from AM9PR03MB7526.eurprd03.prod.outlook.com (2603:10a6:20b:3de::17) by AS2PR03MB9540.eurprd03.prod.outlook.com (2603:10a6:20b:597::6) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.21.181.23; Sun, 12 Jul 2026 14:04:47 +0000 Received: from AM9PR03MB7526.eurprd03.prod.outlook.com ([fe80::904d:5820:80e1:41ba]) by AM9PR03MB7526.eurprd03.prod.outlook.com ([fe80::904d:5820:80e1:41ba%5]) with mapi id 15.21.0181.019; Sun, 12 Jul 2026 14:04:47 +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=Argt4KlYvFuS5Fpp9L7S9lLQSm0tlyZsXPtz47CbOvhBAvWQoqs1DEu+gJYt591WvPqPL1/0gmLyQCLDuWahDZx3A2N7NaJwkHvcJmDnMFnKIt9YEB11FtOB1/e/SYD36hZ2BTWU/cgeGkhk5iHV9oj8KZcUfH0nuo1o0roahcBk9ahnORsE7YbefcphdIw6RV9ClEVrvLudtVFAN/2HKWm6O19tAeWmSeV55y+gp23sWDSdYdVtUfb8gu4ppPFFcvfdatrq+zbIadwqnLwOrJnLPR1sauhULalSU/0OKD55g+BfsLwvKMeH3DP1d/TrUBn2qvfhV14t5VNvJ1kkyw== 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=cgnoE2/vbR0U54fdtVsbfuzS4jDVloiK5WrMbSsnuKc=; b=qWIviSGw+m495pin0I81GfY1SIqFwv/vXSdU0kUF14uzvJiZbEj0/8J6BWX8cD/ts/ov4xWvhAlB7RNKDKPHw6WF/iOPFqzVO996ygI/IJPo87Nlm78uEUJbopThJnc4KwZWpReiefBPbKzPRnYlsj+V5Qo7zmUyE4LBel1oDH3GGh6fpy83ks8ax6NgqXJnUGw2sTln/OiwS2nJWCRDEyrJ97YyuENTtTrPiUkUN0IQYX+3pzy2/p9XQ/l7WmIrBdV8nicLu9akSr4bk7A5ml3tEE6epSDzTMNV0B8jhqOkh3ilo3CYrBp745XuuAVS7nka1OWKTj7Q6OGcXvGXJQ== 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=cgnoE2/vbR0U54fdtVsbfuzS4jDVloiK5WrMbSsnuKc=; b=PSGhMnzsb0zDaAEEX7fMVkDwMCD3HESYPpD7H5hKVtTyUBU9j749K/hx/Eb1GwV7CZizfS5b9jlDV79b+5eLxrhy8GMVrVH/u7PgqriVHvpxUoa0fROHP7yd929nNRCM5wFNHhRsMc/o4LmAAPOQH5GnPKofwskuMU5Lod3c6Nfjxz/mWpMZA5JpMJsWYficOCxht7OWOcK2qcteJ/Hei0ntO6KR/vZOQ/vw2cmxoJmBrsT63LMUIVO5Y0PQBYoQnxXhVyGGl/b5c+L2gXbhIped22u6CgXTMb0wMRDJoGDO4zM7gw85XwYNfx1G/lUhpxb1xxHpBCFL/kgF7Rl8LQ== 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 v2 3/3] misra: deviate MISRA C Rule 5.5 for ARM SMMU fault handlers Thread-Topic: [PATCH v2 3/3] misra: deviate MISRA C Rule 5.5 for ARM SMMU fault handlers Thread-Index: AQHdEgdlAM1Q0XRp9UaSkflqa1nGRg== Date: Sun, 12 Jul 2026 14:04:47 +0000 Message-ID: <242bdedf03e5b0b3e9db37c4f9d2160cadfabb3e.1783864426.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_|AS2PR03MB9540:EE_ x-ms-office365-filtering-correlation-id: 079ba1cc-4fde-44ec-b3d9-08dee01e884f x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0;ARA:13230040|7416014|376014|366016|42112799006|23010399003|1800799024|38070700021|6133799003|56012099006|11063799006|18002099003|22082099003; x-microsoft-antispam-message-info: e1nff4OI7ASCkNLPENdwkT50b+7fVGjEty0y+DZT8tVEK7tT05cipSuY5dI4k/OkftxGNhWA7P+6MzNWznjClIAoIJc2VqszW191aySe03NS6yA2yEvxF8vCi4qEfzhAITf4uwNId7ZC8E5WmtfWVPeCvuQ+qHFK0W0wX++/bth+4U8RA7yotlB9+Zve/TN8Md0Ex7J5sPw994tuJONwXJvFroQGgcDYCyhbaXOHKQufKK6Zo8NjQm4vW+i34mcebS3PLDJbtGo1LZ8M5vo+gRfN+PRt7lCKn08MiYxe87kLms5ryTBT/+ZloFTZo2hqpA4tSgl7jGPdE0tmm/O5dzmqc5om+kg3FVJvAi5BXS/2nYvZRlbC+Wy0FRq4EphX5thpHvnQJMw/Mml6xZAPs64UVguv/BMoSFRBCbjRyeVgbWY33lKfWPlrk6kCJ9ZQjjhAOHNncJLbAYJ0A25UyGCDzw6+ul25axPtAX1Y6+7fUI7Q3oaFzID8N+r6cEDHPxSmhFLJOtp0FX8F3f+RyzDbSSq5In7/OztRBE3SO3BA/d+JqH2FDtIRUXACxUr3WSW0XoZE7lSIUbK4fTK9jctsg+J+xh7zZtdi88Xd76C/OedXksp1hu5+1bSoIr/R+TPeplb2nomAlBS5Iw/6HSUWWBN50Z8Rm5e31z96fNTIxjf4W8GYxakodRnDJbJlmfSqoNpfW/UgnpXZ0LuEBNzTdMAuj//dbACHtREb1U0= 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)(7416014)(376014)(366016)(42112799006)(23010399003)(1800799024)(38070700021)(6133799003)(56012099006)(11063799006)(18002099003)(22082099003);DIR:OUT;SFP:1102; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?iso-8859-1?Q?w6iWP+uSCubn1ICZuK9HzHhZouTN+UOa7Z5IigasmJiluT/+wrIiD/MK1r?= =?iso-8859-1?Q?f1ixBsSmkRFlhdc0mjxpdiDUqpbydUXR+wQ+gYdrxt5XiLRQ2vP5Q9D9Qn?= =?iso-8859-1?Q?/pUTSAfWb5WFPZczZlQqGX8XUXN07rrl12hCCMf2hgyLSpJDx9+zBy8KIj?= =?iso-8859-1?Q?zfiKrwI0s/0cn6xfp09LWGV7dNeCAlYp0uAQFZFk23/48xY9hsYMOQ2NJ5?= =?iso-8859-1?Q?QpzT+yqxPJaQZwqlcRI+3ruVQVYlw+Q7GQPnjEcO0BoQxmc9GWQrleIi9b?= =?iso-8859-1?Q?SA+W1lwcLocVEojG6je5XZevcF84I6zRsI2SxZeyi1up/lrbP16IINkPYC?= =?iso-8859-1?Q?ICJQ7AIhCAFrl1aN112Q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= =?iso-8859-1?Q?SBk3fhP+Enp4rGHrSREZrYGVYVAu6xLx1E9kOt5UU3gIyxyXoE7TTYZB8w?= =?iso-8859-1?Q?GKdDGdYG9BTim9MbQCNG0TeDqLK794VLsbt4e2WMfHdwQZVkUOJX8eDEP2?= =?iso-8859-1?Q?UgSez9mFoin0HcA6MV7rFCTWMK7TrruqgMexmdHu5RCX6/uQ7DbQpUynQ6?= =?iso-8859-1?Q?2NzyjLVb8Y+Oze442Y3CbhyZ7gVuTtQ2sS1kDXLO5Jdn3z1zf+bnJfZ4Zx?= =?iso-8859-1?Q?Nm8SM4zyR3bO26s5X1J/mOVa8moxAWy6WHbn6PeGXQa7tMWR5Ww4WPlBSl?= =?iso-8859-1?Q?Eg0B1XDNjJE5wJ3Z8EFH948IsgqniGcT6em7GWuir6lWnAgpoK5lmBdLlj?= =?iso-8859-1?Q?FhsHqxex3KTe90fT3TJ1vO1V84urYLX28zbjLdaDi6h51yFzeg+Ipw87VC?= =?iso-8859-1?Q?4rYUQnasxxQXJpXx+08eiNofk9xAktu5lbM0bkgxLfIYMuSBWGMM0nzWWV?= =?iso-8859-1?Q?G7HEKcF+YUWJ0+V2h9oc30uJ9mGWEtpXSRL3tvByHQQhezbcW+iw79lR5G?= =?iso-8859-1?Q?8uftDcGTluY/8vqp+vrCoHiBD9HaWSY=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: 079ba1cc-4fde-44ec-b3d9-08dee01e884f X-MS-Exchange-CrossTenant-originalarrivaltime: 12 Jul 2026 14:04:47.3610 (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: lDmpr+4+3Jps8VMYzQJpCfY6lnIyfLQgme67ulyhwFY4X12db6c2flf7tpwNKC+butHo316+Af+GP2gkvic47bg8M9pmThLGDa1xgbPbs9U= X-MS-Exchange-Transport-CrossTenantHeadersStamped: AS2PR03MB9540 X-purgate-ID: tlsNG-16d1c6/1783865089-F8B43617-738F6DB8/0/0 X-purgate-type: clean X-purgate-size: 3550 X-ZohoMail-DKIM: pass (identity @epam.com) X-ZM-MESSAGEID: 1783866476599158500 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 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 | 4 ++++ docs/misra/deviations.rst | 8 ++++++++ docs/misra/rules.rst | 4 ++++ 3 files changed, 16 insertions(+) diff --git a/automation/eclair_analysis/ECLAIR/deviations.ecl b/automation/= eclair_analysis/ECLAIR/deviations.ecl index f7ffd78a36..97f1a91afb 100644 --- a/automation/eclair_analysis/ECLAIR/deviations.ecl +++ b/automation/eclair_analysis/ECLAIR/deviations.ecl @@ -140,6 +140,10 @@ These macros address differences in argument count dur= ing compile-time, effectiv -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." +-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 3eb9912c45..0404e6cc7f 100644 --- a/docs/misra/deviations.rst +++ b/docs/misra/deviations.rst @@ -192,6 +192,14 @@ 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 'arm_smmu_global_fault()= ', + 'arm_smmu_context_fault()' functions and macro names are deliberate. + The original ARM SMMU handler returns irqreturn_t, while the macro + redirects later uses to a Xen wrapper with the void interrupt-handl= er + 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 40aff97a07..dcfe4d5f30 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