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

Re: [PATCH v2] docs/misra: add rule 2.1 exceptions


  • To: Stefano Stabellini <sstabellini@xxxxxxxxxx>
  • From: Bertrand Marquis <Bertrand.Marquis@xxxxxxx>
  • Date: Thu, 28 Sep 2023 09:10:43 +0000
  • Accept-language: en-GB, en-US
  • 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=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=E8OEIFLGNbEbr8ewFOPuLQ03fLbfQCDHcDnJZWqWZC0=; b=nGJswWWhsP4AI6c3OuYyjti4JLm2g68hx9ybWzo5JymM9uL10Kgd9ll95Mr6+GCAYY0iAtrjncE2944YnJmjQJujcBHbySEyg5gEdRm1dOJT/7wD3oq76jCO2LBOZdYRIblwKtiMy/2B59tykj8D7X7JELq8j093O3/tmNeibV+OyHpoBqHTKLzEfZcfgJ9kEiPdTH/ebP5jxVVwdsjGsr5305qFTC6a6FY4WsuGpRVjMSCFJHZ105yCJ/S5eEVH2Owd+TXHZ0qwq1P3pgoVwp7lFfyMqt0AhqBkHzXh9FoJwLUR5QBn148jGcwrN18XnzI/15ZoOQD0JnRqe+iXfA==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=UFiGpHvoJeFtDaiWXOuFZ1+wR8Uiu/dud9HHECB6+ZahULMimpaZvNbbuxC0gEM8yAKO9OQ6saRQKvLLtGd9EroBGK+p4NMfI7RrlgsxHVmEyUfXIPrSL4wTMEEjOngpTkwp1QXwd4kYVJa3EcPXPLt2LYhOKNVIzublitQFOlm8vjx78G5dRyEXYvz3Y4yEepQ4XOhKvDbGwhjP6CO4Z3SDvI+kMCHjLL2HQdDuzGd8RYzy4EiSjlAKxX3PGkrrxzNf2aC6isOIHyxms+u2TER2nq9r7oYftrc4jlk58ckrsEL7qmhm+AkxUY314/3mys25GceB5EKH9FXolnI9nQ==
  • Authentication-results-original: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=arm.com;
  • Cc: Xen-devel <xen-devel@xxxxxxxxxxxxxxxxxxxx>, Jan Beulich <jbeulich@xxxxxxxx>, Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, "roger.pau@xxxxxxxxxx" <roger.pau@xxxxxxxxxx>, "julien@xxxxxxx" <julien@xxxxxxx>, "george.dunlap@xxxxxxxxxx" <george.dunlap@xxxxxxxxxx>, "nicola.vetrini@xxxxxxxxxxx" <nicola.vetrini@xxxxxxxxxxx>, Stefano Stabellini <stefano.stabellini@xxxxxxx>
  • Delivery-date: Thu, 28 Sep 2023 09:11:10 +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: AQHZ1hLASNqKg0R4JUWaB9eFf7S+WLAwKx4A
  • Thread-topic: [PATCH v2] docs/misra: add rule 2.1 exceptions

Hi Stefano,

> On 24 Aug 2023, at 00:39, Stefano Stabellini <sstabellini@xxxxxxxxxx> wrote:
> 
> From: Stefano Stabellini <stefano.stabellini@xxxxxxx>
> 
> During the discussions that led to the acceptance of Rule 2.1, we
> decided on a few exceptions that were not properly recorded in
> rules.rst. Add them now.
> 
> Signed-off-by: Stefano Stabellini <stefano.stabellini@xxxxxxx>
> Acked-by: Jan Beulich <jbeulich@xxxxxxxx>
> ---
> Note that safe.json and the codebase are not yet updated with an
> appropriate tag for BUG, panic and friends.
> 
> v2:
> - fix typo in commit message
> - use "only referenced from assembly"
> - use "Deliberate unreachability caused by"
> - add "See safe.json"
> - add acked-by (although I also added "See safe.json")
> ---
> docs/misra/rules.rst | 13 ++++++++++++-
> 1 file changed, 12 insertions(+), 1 deletion(-)
> 
> diff --git a/docs/misra/rules.rst b/docs/misra/rules.rst
> index 8f0e4d3f25..4f33ed4ba6 100644
> --- a/docs/misra/rules.rst
> +++ b/docs/misra/rules.rst
> @@ -106,7 +106,18 @@ maintainers if you want to suggest a change.
>    * - `Rule 2.1 
> <https://gitlab.com/MISRA/MISRA-C/MISRA-C-2012/Example-Suite/-/blob/master/R_02_01_1.c>`_
>      - Required
>      - A project shall not contain unreachable code
> -     -
> +     - The following are allowed:
> +         - Invariantly constant conditions, e.g. if(IS_ENABLED(CONFIG_HVM)) 
> { S; }
> +         - Switch with a controlling value statically determined not to
> +           match one or more case statements
> +         - Functions that are intended to be referenced only from
> +           assembly code (e.g. 'do_trap_fiq')
> +         - Deliberate unreachability caused by certain macros/functions,
> +           e.g. BUG, assert_failed, panic, etc. See safe.json.

As Julien requested, you should remove this.

With that handled:

Acked-by: Bertrand Marquis <bertrand.marquis@xxxxxxx>

Cheers
Bertrand

> +         - asm-offsets.c, as they are not linked deliberately, because
> +           they are used to generate definitions for asm modules
> +         - Declarations without initializer are safe, as they are not
> +           executed
> 
>    * - `Rule 2.6 
> <https://gitlab.com/MISRA/MISRA-C/MISRA-C-2012/Example-Suite/-/blob/master/R_02_06.c>`_
>      - Advisory
> -- 
> 2.25.1
> 




 


Rackspace

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