[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[PATCH] misra: note the plan to remove the R2.1 deviation for unreferenced functions


  • To: <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • From: Stefano Stabellini <stefano.stabellini@xxxxxxx>
  • Date: Tue, 17 Nov 2026 14:50:12 -0800
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 165.204.84.17) smtp.rcpttodomain=lists.xenproject.org smtp.mailfrom=amd.com; dmarc=pass (p=quarantine sp=quarantine pct=100) action=none header.from=amd.com; dkim=none (message not signed); arc=none (0)
  • 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=1Pb8Q0CFeGGj5xid/ea+m9eBAyi784Yf4vPGITLGw8s=; b=S7vuXn1gyBvtDEVq5g8AgtdYQpP2TNWRAlvppe4cuQUO1se7Nn5YsAm+9ZMenEhBKFp7ldIPKWBMAFZwxdn6aI8PFZ0sq8PmMfGyND9lzIE+kE0hqvCT8tXFqQt1H18L5e8fv9FGGrb4sH6+/sw4+CJXuaEnkJgrLbUAkdk92ev5GAeJmpTxQH1Zcb5hfD4vxZVQPF/XSWdl2eWwXEab2O2qxBW6Lrs673d/kyPrTpMdyRmsR1aWFZQg1t7EQ6evl5agTgvOfYn0chs4D3FJs+SzcwL3S1zRzYilCWsF3kLxt9pM7RfhKjXnLLFighbtyNkDYq2BL/iPqHQyKcSMDg==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=KFeL4uHjkumQzBefnLfHJgxSU/rlG/VqfcuaHVTo0smLbvbb8N9UAHyglVw+rnht626zKjeLC3yJVq5nmkW7Ny6/v63ahFd+7wG+N7OMseu4H2LfzP2PIgwOXYtpfvJb7G4/CbQ6HWI/puF328/0eG7FEA8vjipUBlaa8YMDnJQev5njESg3KnoD/eoEzCMvF1fsGgpBNULW0/dw8N+KoxHOIdXFwOHbqbRCry/+c0I+j6B/l+6DjT/aHoWMcYbBzx3UDGKk09GsLoa+r8RyvGkN2ckbGuqL0sWSwC7srSd2ul5uklYWWMfKb1wTdhO/gI2nBkkyu7Tg1XN5VS26yg==
  • Authentication-results: eu.smtp.expurgate.cloud; dkim=pass header.s=selector1 header.d=amd.com header.i="@amd.com" header.h="From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck"
  • Cc: <stefano.stabellini@xxxxxxx>, Nicola Vetrini <nicola.vetrini@xxxxxxxxxxx>, Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, Anthony PERARD <anthony.perard@xxxxxxxxxx>, Michal Orzel <michal.orzel@xxxxxxx>, Jan Beulich <jbeulich@xxxxxxxx>, Julien Grall <julien@xxxxxxx>, Roger Pau Monné <roger@xxxxxxxxxxxxxx>
  • Delivery-date: Tue, 17 Nov 2026 22:51:38 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

The ECLAIR deviation of MC3A2.R2.1 for functions that are never
referenced has a one-line justification and no entry in
docs/misra/deviations.rst. Note that gc-sections support in the Xen
build is to be improved, so that such functions are discarded from the
final binary and the deviation can be removed for them, and add the
matching deviations.rst entry.

Signed-off-by: Stefano Stabellini <stefano.stabellini@xxxxxxx>
---
CC: Nicola Vetrini <nicola.vetrini@xxxxxxxxxxx>,
CC: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>,
CC: Anthony PERARD <anthony.perard@xxxxxxxxxx>,
CC: Michal Orzel <michal.orzel@xxxxxxx>,
CC: Jan Beulich <jbeulich@xxxxxxxx>,
CC: Julien Grall <julien@xxxxxxx>,
CC: Roger Pau Monné <roger@xxxxxxxxxxxxxx>

 automation/eclair_analysis/ECLAIR/deviations.ecl | 5 ++++-
 docs/misra/deviations.rst                        | 7 +++++++
 2 files changed, 11 insertions(+), 1 deletion(-)

diff --git a/automation/eclair_analysis/ECLAIR/deviations.ecl 
b/automation/eclair_analysis/ECLAIR/deviations.ecl
index d49af53055..fbcc1c04cb 100644
--- a/automation/eclair_analysis/ECLAIR/deviations.ecl
+++ b/automation/eclair_analysis/ECLAIR/deviations.ecl
@@ -8,7 +8,10 @@ Constant expressions and unreachable branches of if and switch 
statements are ex
 -config=MC3A2.R2.1,+reports={safe,"first_area(^.*incompatible with labeled 
statement$)"}
 -doc_end
 
--doc_begin="Some functions are intended to be not referenced."
+-doc_begin="Some functions are intended to be not referenced.
+Support for gc-sections in the Xen build is intended to be improved, so that
+such functions are discarded from the final binary and this deviation can be
+removed for them."
 -config=MC3A2.R2.1,+reports={deliberate,"first_area(^.*is never referenced$)"}
 -doc_end
 
diff --git a/docs/misra/deviations.rst b/docs/misra/deviations.rst
index 7b983db264..3b7ccddfac 100644
--- a/docs/misra/deviations.rst
+++ b/docs/misra/deviations.rst
@@ -64,6 +64,13 @@ Deviations related to MISRA C:2012 Rules:
        statements are expected.
      - Tagged as `safe` for ECLAIR.
 
+   * - R2.1
+     - Some functions are intended to be not referenced.
+       Support for gc-sections in the Xen build is intended to be improved,
+       so that such functions are discarded from the final binary and this
+       deviation can be removed for them.
+     - Tagged as `deliberate` for ECLAIR.
+
    * - R2.1
      - Unreachability caused by calls to the following functions or macros is
        deliberate and there is no risk of code being unexpectedly left out.
-- 
2.47.3




 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.