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

Re: [XEN PATCH][for-4.19 v4] xen: Add deviations for MISRA C:2012 Rule 7.1


  • To: Nicola Vetrini <nicola.vetrini@xxxxxxxxxxx>
  • From: Jan Beulich <jbeulich@xxxxxxxx>
  • Date: Thu, 26 Oct 2023 10:38:17 +0200
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=suse.com; dmarc=pass action=none header.from=suse.com; dkim=pass header.d=suse.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=Y8rWSpsWnL1e2D1xcChTAv4edpUqiqVpJ+qqOYWwqiU=; b=JjGuHd+znlKe9qGJuRjUSsfKZnhMQlX9GY78ClMRP2HDvqlHCA+5LmVo011A16FlKICIoSw4UQFWdUtHTcengTPpr6MJ9ztavgFDSdAK8f/Q2e5Fg4Li1Zfvvo0FgT8kwGzLfQx8beoEg1cSMYfCYKVRm+mbq9wdbYCH6+rQmio9W43X2W0C/Fs46nqDw1yN7Vh0gwbpLLuWuBdmYG0pswYszht2lRRuOWkMjGbxFz+x2Vs6kS9yfYQDuq0BgUgtrXY4+BisNQrZwDZbXL2oKP9tuKpAvY9Lb3Se5kXBiTBuMcWV87sBQ04NzlMs+fXWnUlyPZia+eimoJQS57P2jg==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=j3nX03QNmMoNMrUF4625vOpo4DObIYnjzjUG3X151jc2EV92S7F2tM7dzypjKeDIeJoI+kn3vCW8VlQFrDvOIrSondLQhczCpRhGu/yp+dhHO0OMMh38niPfMJcWNSNa3aPtGqXI1XsmXZD5TdvLztSFMYy9YDm2sdvGU/nJuTFII+G6syLzuLEglAxQWXQhNpt5bsiIlN1kuIJloVOahtiUOJqf4MNCgTYrFcWyZ1ZiNbP2eZoxupKq+4a7ID8ZOuWxrTaguUOg2laovVkCiz2qYMoV6yhCUl6jCG/y8VfJogSZqk8KP1QrTXhbGeCYGujhCI7kJeAADfcfWSSoSQ==
  • Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=suse.com;
  • Cc: sstabellini@xxxxxxxxxx, michal.orzel@xxxxxxx, xenia.ragiadakou@xxxxxxx, ayan.kumar.halder@xxxxxxx, consulting@xxxxxxxxxxx, andrew.cooper3@xxxxxxxxxx, roger.pau@xxxxxxxxxx, Simone Ballarin <simone.ballarin@xxxxxxxxxxx>, Doug Goldstein <cardoe@xxxxxxxxxx>, George Dunlap <george.dunlap@xxxxxxxxxx>, Julien Grall <julien@xxxxxxx>, Wei Liu <wl@xxxxxxx>, xen-devel@xxxxxxxxxxxxxxxxxxxx
  • Delivery-date: Thu, 26 Oct 2023 08:38:30 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On 26.10.2023 10:18, Nicola Vetrini wrote:
> --- a/automation/eclair_analysis/ECLAIR/deviations.ecl
> +++ b/automation/eclair_analysis/ECLAIR/deviations.ecl
> @@ -85,10 +85,12 @@ conform to the directive."
>  # Series 7.
>  #
>  
> --doc_begin="Usage of the following constants is safe, since they are given 
> as-is
> -in the inflate algorithm specification and there is therefore no risk of them
> -being interpreted as decimal constants."
> --config=MC3R1.R7.1,literals={safe, 
> "^0(007|37|070|213|236|300|321|330|331|332|333|334|335|337|371)$"}
> +-doc_begin="It is safe to use certain octal constants the way they are 
> defined in
> +specifications, manuals, and algorithm descriptions."
> +-file_tag+={x86_svm_h, "^xen/arch/x86/hvm/svm/svm\\.h$"}
> +-file_tag+={x86_emulate_c, "^xen/arch/x86/hvm/svm/emulate\\.c$"}
> +-config=MC3R1.R7.1,reports+={safe, 
> "any_area(any_loc(any_exp(file(x86_svm_h)&&macro(^INSTR_ENC$))))"}
> +-config=MC3R1.R7.1,reports+={safe, 
> "any_area(text(^.*octal-ok.*$)&&any_loc(any_exp(file(x86_emulate_c)&&macro(^MASK_EXTR$))))"}

Is the matching of file name and MASK_EXTR() still appropriate with ...

> --- a/docs/misra/deviations.rst
> +++ b/docs/misra/deviations.rst
> @@ -90,6 +90,13 @@ Deviations related to MISRA C:2012 Rules:
>           - __emulate_2op and __emulate_2op_nobyte
>           - read_debugreg and write_debugreg
>  
> +   * - R7.1
> +     - It is safe to use certain octal constants the way they are defined
> +       in specifications, manuals, and algorithm descriptions. Such places
> +       are marked safe with a /\* octal-ok \*/ in-code comment, or with a SAF
> +       comment (see safe.json).
> +     - Tagged as `safe` for ECLAIR.

... this description? I would have expected the key now solely is an
"octal-ok" comment?

Jan



 


Rackspace

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