-config=MC3A2.R11.8,reports+={safe,"any_area(any_loc(any_exp(macro(^container_of$))))"}
-doc_end
+-doc_begin="Function __hvm_copy in xen/arch/x86/hvm/hvm.c is a double-use
+function, where the parameter needs to not be const because it can be set for
+write or not"
+-config=MC3A2.R11.8,reports+={safe,"any_area(any_loc(text(^.*__hvm_copy.*HVMCOPY_to_guest doesn't modify.*$)))"}
+-doc_end
+
-doc_begin="This construct is used to check if the type is scalar, and for this purpose the use of 0 as a null pointer constant is deliberate."
-config=MC3A2.R11.9,reports+={deliberate, "any_area(any_loc(any_exp(macro(^__ACCESS_ONCE$))))"
}
Fixing this violation would require to increase code complexity and lower readability.
- Tagged as `safe` for ECLAIR.
+ * - R11.8
+ - Violations caused by function __hvm_copy occur when a const void
+ argument is passed, as the const qualifier is stripped. However, in such
+ cases, the function ensures that it does not modify the buffer
+ referenced by the argument, therefore, this use is deemed safe. Fixing
+ this violation would require to increase code complexity and lower
+ readability.
+ - Tagged as `safe` for ECLAIR.
+
* - R11.9
- __ACCESS_ONCE uses an integer, which happens to be zero, as a
compile time check. The typecheck uses a cast. The usage of zero or other