|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [XEN PATCH 2/4] automation/eclair: add deviations and call properties.
On 19/10/23 10:26, Julien Grall wrote: Hi Simone, On 19/10/2023 08:44, Simone Ballarin wrote:On 19/10/23 02:57, Stefano Stabellini wrote:On Wed, 18 Oct 2023, Simone Ballarin wrote:Deviate violations of MISRA C:2012 Rule 13.1 caused by functions vcpu_runnable and __bad_atomic_size. These functions contain side-effects such as debugging logs, assertions and failures that cannot cause unexpected behaviors. Add "noeffect" call property to functions read_u.*_atomic and get_cycles. Signed-off-by: Simone Ballarin <simone.ballarin@xxxxxxxxxxx>Acked-by: Stefano Stabellini <sstabellini@xxxxxxxxxx> However one comment below--- .../eclair_analysis/ECLAIR/call_properties.ecl | 10 ++++++++++automation/eclair_analysis/ECLAIR/deviations.ecl | 13 +++++++++++++docs/misra/deviations.rst | 11 +++++++++++ 3 files changed, 34 insertions(+)diff --git a/automation/eclair_analysis/ECLAIR/call_properties.ecl b/automation/eclair_analysis/ECLAIR/call_properties.eclindex 3f7794bf8b..f410a6aa58 100644 --- a/automation/eclair_analysis/ECLAIR/call_properties.ecl +++ b/automation/eclair_analysis/ECLAIR/call_properties.ecl@@ -104,3 +104,13 @@ Furthermore, their uses do initialize the involved variables as needed by futher There are 13 invocations in the preprocessed code: some of them are contained in macro expansions. Adding a SAF in a macro means to add useless comments if the macro is not expanded in an initializer list. The correct thing would be adding 13 SAFs. If this is ok, I can do it. For vcpu_runnable(), I don't quite understand the argument. I can't find any pragma around the function and I can't find any side-effects in it. Can you clarify? vcpu_runnable calls atomic_read. In ARM, atomic_read uses a volatile pointer (that's a side-effect). In X86 it contains a MACRO (read_atomic) that contains the pragmas and also __bad_atomic_size. Maybe the text should discriminate the two cases. Cheers, -- Simone Ballarin, M.Sc. Field Application Engineer, BUGSENG (https://bugseng.com)
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |