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

SAF-* comment at the end of the line


  • To: "xen-devel@xxxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • From: Luca Fancellu <Luca.Fancellu@xxxxxxx>
  • Date: Tue, 5 Dec 2023 13:22:29 +0000
  • Accept-language: en-GB, en-US
  • Arc-authentication-results: i=2; mx.microsoft.com 1; spf=pass (sender ip is 63.35.35.123) smtp.rcpttodomain=lists.xenproject.org smtp.mailfrom=arm.com; dmarc=pass (p=none sp=none pct=100) action=none header.from=arm.com; dkim=pass (signature was verified) header.d=armh.onmicrosoft.com; arc=pass (0 oda=1 ltdi=1 spf=[1,1,smtp.mailfrom=arm.com] dkim=[1,1,header.d=arm.com] dmarc=[1,1,header.from=arm.com])
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=arm.com; dmarc=pass action=none header.from=arm.com; dkim=pass header.d=arm.com; arc=none
  • Arc-message-signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; 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=Ze7xFQ4WK5xmWyHHKeDjnMk0qaKjBqmLHcOq3uIH0L0=; b=jgD8YNvxNLUBQAUsW6fHcj84gpeVCRxKJyJoo8TmpZKBXi5kLkAJqgk28qOKAYo2EL/KL12JSPuB6DU2vRsY38JgrLcT3RVN65IeEvGrDu7jU7jbJO71cUBcRcHCNzsmQy60vpQa+OU9wBbShJezHLUzvB80mMRDxDLtRhHqZm+BYMSbQuHE/kJNfglbEPc70ZnaU9pz4NJjJF8rk5nAs1J9E4UXan7wdap/iYClKvWU2MGOEae7mU2Ej8x8Xwu8lLhoEmYN/C4Vh/yVo80SYcljxDSKsUXROz1pdcIwrmFy4BHrJBAIS+c74q8YtHGvpxHK/Uh9NaPM6DHAF/CIEg==
  • Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; 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=Ze7xFQ4WK5xmWyHHKeDjnMk0qaKjBqmLHcOq3uIH0L0=; b=Hvf0yRNt/ZyPezPjU9n9oD8Jhjb2TJAT1a0sYI60GadrUF3OQzyXiVeyR7/KL6kwesMBhb4CqKICmiHzvp224GTPPZGhCYmRXwA7+xFUYs9QNUWJjWIWh2WR/io+KKPZMfOFqOdIRNmEl16RoJUCOY80iTV7UYuMiqCwUcIxyc5bdCtOO23qeDrFjXjvlivURde4MWEVhA3fxBn1clc5lI2+6HAk0nCQnVr8s3WB6gxv2uxjZwdKUqw9FW7CGNwdxLONq8yn/ViMxsyB+/T9rsWHxJ/L5YERT4gYkZUXTeLLpWb0PLJUtg3N/lh35dDTpybFX4wtyksvuo1WNKtGlA==
  • Arc-seal: i=2; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=pass; b=O9lG0zyAo13dDoYVUCfdgc2peGnk68UNx7edcFd+AlbL1RasDFXw4/52NNp3n1B3ektYhWyTCICY1pMxjYuWaEPpdxRGs1Zo9vjO0RKGbzd/MAVF5g7ej/qJXFEqDd8JnRtUyJjCkOlxCm96WH7D+fU6J5zcoh1T9ZWJEJzL0yZa0m9/GeDuuPbMcolosR4qsqgY8jNGzgnoTkaz/Wa8kpj86SELcDJ6Uggenye7qyHq8vhdiB4NWXZ4/pRRSJO/dexp9K0YzovNL+TImmquTM0X3P8yXvbvDIqVOB0DdYGBxd+CnvUVTfH/HbiMm1AXnXO2P35IZYUVZKf6ZEg3Ag==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=SRbIi/lP2SYIvWdBXcGGw1w2eYP0GjLEtnHnpMePlfxV9tXpi2jnjneLXbffDkPh7l30XpZYbjxHDZm3YMo4aUyqSET4DDzYWZWCAClBnzBF60BTLdKiyWThWhQWVR8t8hpWJmM4qDOc8KJP958HJ1ONtBMSHe8q6ZZsEK18ReSk+fvE6A0NW5JObUhgiREavsDl2HmBrpuweHqaJAzOpSy+1ir8lL1zFjTzmBEuqrzhnPSJKO0ZRD45TjvZovBghCBZpNJyyYFyMJzBYHMd4UXCgBLlJxaDjSZz8MIu98gzdTciLy0HQR9eopiLFrxjtCBceIp5X71Yd8Pc3saeBg==
  • Authentication-results-original: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=arm.com;
  • Cc: Jan Beulich <jbeulich@xxxxxxxx>, Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, Roger Pau Monné <roger.pau@xxxxxxxxxx>, Julien Grall <julien@xxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>, Bertrand Marquis <Bertrand.Marquis@xxxxxxx>, Michal Orzel <Michal.Orzel@xxxxxxx>, George Dunlap <george.dunlap@xxxxxxxxxx>, Wei Liu <wl@xxxxxxx>
  • Delivery-date: Tue, 05 Dec 2023 13:23:03 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
  • Nodisclaimer: true
  • Original-authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=arm.com;
  • Thread-index: AQHaJ34YkUD/Uc9X1UGSJ1pz/QdYhw==
  • Thread-topic: SAF-* comment at the end of the line

Hi all,

I’m writing this mail to collect thoughts about the need to improve the SAF-* 
comments.

I think we reached a point where we need to use deviations for some violation 
that we want
to keep in the code with a proper justification and an issue was raised when 
the comment
cannot be put on a line on its own.

e.g.

If ( condition-1 &&
     condition-2 &&
      [...] )
{
    ...
}

For example in the code above, if the violation is in the second condition, 
breaking the conditions
to have an empty line between them for the SAF-* comment is not ideal, so we 
could maybe
improve the in-code comment to be used at the end of the line:

e.g.

If ( condition-1 &&
     condition-2 && /* SAF-*-safe [...] */
      [...] )
{
    ...
}

This might require also a deviation on the coding style to allow the comment to 
overcome the line length.

Bertrand, from his experience with safety certifications, feels that adding 
this feature could be enough
to cover the majority of the cases where we need to deviate a violation in the 
code.

Using it consistently in the code base as the only way to deviate a violation 
can also help the adoption
of the project to people who might want to fix them instead of deviating them, 
the only thing they would need
to do is to grep for SAF-* to have a rough idea of how many justified violation 
are in the code.

Please let me know your thoughts before I start to implement the feature.

Cheers,
Luca



 


Rackspace

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