On 26/10/2023 10:38, Jan Beulich wrote:
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)&¯o(^INSTR_ENC$))))"}
+-config=MC3R1.R7.1,reports+={safe,
"any_area(text(^.*octal-ok.*$)&&any_loc(any_exp(file(x86_emulate_c)&¯o(^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
You have a point. I'll send a quick v5 that fully reflects the
description.
--
Nicola Vetrini, BSc
Software Engineer, BUGSENG srl (https://bugseng.com)