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

Re: [PATCH] docs/misra: add R13.2 and R18.2 to rules.rst


  • To: Stefano Stabellini <sstabellini@xxxxxxxxxx>
  • From: Bertrand Marquis <Bertrand.Marquis@xxxxxxx>
  • Date: Thu, 1 Aug 2024 06:42:28 +0000
  • Accept-language: en-GB, en-US
  • Arc-authentication-results: i=2; mx.microsoft.com 1; spf=pass (sender ip is 63.35.35.123) smtp.rcpttodomain=lists.xenproject.org smtp.mailfrom=arm.com; dmarc=pass (p=none sp=none pct=100) action=none header.from=arm.com; dkim=pass (signature was verified) header.d=arm.com; arc=pass (0 oda=1 ltdi=1 spf=[1,1,smtp.mailfrom=arm.com] dkim=[1,1,header.d=arm.com] dmarc=[1,1,header.from=arm.com])
  • 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=2; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; 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=sQoN8Ud7rJqiPdNkMiI1l2tpuMfqJQQm+TnR3AAqSgE=; b=hMujSMkP/PifH/FY6WBM7/HmBDyP8BCIMNfrm+4I/lYJgor8h+xYU5J7t2/jjsIHJtMZfJkhJO7GQZW5tSQuXdGKOEo+dWYITOoaqk+Hqy5U2zzhtKLSQ1M6aOHJWZXezMH+q2NQBHvagplslvzIs2+hAxZzldagE11Khhd60BCLZ6Rp2av0fB/m/5tXx9312NrgWoSeZYkaWc6NEsZVuIVp9MqiEZ5bblhshyHasX8lLnhN7QyYSjjYWcwK35+cNzwKEvgHNHDri/kcF4Gz7ORT8NBvzJYUT6hd85mwCTtRA0Oy7La9QJ35wS4q7RjLPmle8UjGJxdBgu/OgdXvrg==
  • Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; 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=sQoN8Ud7rJqiPdNkMiI1l2tpuMfqJQQm+TnR3AAqSgE=; b=Y09+GMLu6f1EUzUSKuNEn+JJK19W+u0FDNID2t+60DEV7aQXuVlnjipd8cnBwRgc9ggEdbSOekzo9S/UlR/K0ku9qqb8Yt65V1D9+UwXCqawSZGmcU4hF/oK/HD+OXq1CCzkSDIgLuK4BtYxb7BAXBc2qqSb7t9jcCNn+PbpN5F4z5IwndqrS45J8sF48p3puEfdm1+d5yFQd/1ORbtbuAd/oTmBWvr4brj8/n6mJCB1T16LNMkqRAnaT5xW6XpB8OmVm3omqy+tRz1LCn2SQ2c9wmxTERymtKJY7mKSZBRWmpcWbCsCtHHS7nxCzH5fmQC6kvq0uC+QrzvkyhE1Ew==
  • Arc-seal: i=2; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=pass; b=TVwYjaxZma7qwIK0Uu21uE460uop13NKeRbAOEtSFeeOf20Nov19Qvmh4Pxet02+xrWb78ldzGUjplChU7GCsDyng2dh9Q/qgijdSWxW3sX4UONKr5rU7XZ7mMCg/WTzV4SM51dhUdbrWfTREFpSaDeckz4rGDxLCdWeuXhDST44JC3KAEMpOuIogQ8MmT6Epp1chDVQdCIZX5FjGtTIXK/jtXJgXic+xs6hazogXt1w1Tm0YpSR5AQbekDIvKSx5S2XnQvCBassHJEh/Er4iXbTcQe+2F+NCiQEpJx4BCcckDB6ymFNvC3gWnj3ChS9e+YlZTAJaG8v6qklTr+WNA==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=PJm742jzN0393MwFPA//2yqBuhPRj+t3iqQlb00foGVGJ/sX20XSDtWIaNRA+S1h44LZHmyA0HYY1g5g38RMx9lWOfraqTng8y4lwKyHGGu4LTo3me1a4ov8nzdFsDmoAwG+mPIMG1h6VcgI6OOCNk2xmXRTWUgS119y7IHi2Fs8EsS0s4VmFWYQa8M3VSNbSgS0rlA5lypTQK/KZWpqrup11uM/aoMoaJ5HIPXN8ILCy414RHBm9HC3TLsOJo13htAEfN3Ou7IHxO2VYIhTKpetGa7auxnW8fW/7ryC/Z4KIgBTYlAF2lyLv6irZYX5GWT1PEQ7m9WrRDMZQauYkw==
  • Authentication-results-original: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=arm.com;
  • Cc: Jan Beulich <jbeulich@xxxxxxxx>, Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, Roger Pau Monné <roger.pau@xxxxxxxxxx>, Julien Grall <julien@xxxxxxx>, Xen-devel <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • Delivery-date: Thu, 01 Aug 2024 06:42:50 +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: AQHa4th7a04MjZhS7kqv2Ue56V1pDLIQXpSAgAEkjwCAAHMTAA==
  • Thread-topic: [PATCH] docs/misra: add R13.2 and R18.2 to rules.rst

Hi Stefano,

> On 1 Aug 2024, at 01:50, Stefano Stabellini <sstabellini@xxxxxxxxxx> wrote:
> 
> On Wed, 31 Jul 2024, Jan Beulich wrote:
>> On 31.07.2024 01:30, Stefano Stabellini wrote:
>>> --- a/docs/misra/rules.rst
>>> +++ b/docs/misra/rules.rst
>>> @@ -462,6 +462,15 @@ maintainers if you want to suggest a change.
>>>      - Initializer lists shall not contain persistent side effects
>>>      -
>>> 
>>> +   * - `Rule 13.2 
>>> <https://gitlab.com/MISRA/MISRA-C/MISRA-C-2012/Example-Suite/-/blob/master/R_13_02.c>`_
>>> +     - Required
>>> +     - The value of an expression and its persistent side-effects shall
>>> +       be the same under all permitted evaluation orders
>>> +     - Be aware that the static analysis tool Eclair might report
>>> +       several findings for Rule 13.2 of type "caution". These are
>>> +       instances where Eclair is unable to verify that the code is valid
>>> +       in regard to Rule 13.2. Caution reports are not violations.
>> 
>> Which doesn't make clear what our take is towards new code people may
>> submit.
> 
> Good point, see my comment below
> 
> 
>>> @@ -583,6 +592,15 @@ maintainers if you want to suggest a change.
>>>        submitting new patches please try to decrease the number of
>>>        violations when possible.
>>> 
>>> +   * - `Rule 18.2 
>>> <https://gitlab.com/MISRA/MISRA-C/MISRA-C-2012/Example-Suite/-/blob/master/R_18_02.c>`_
>>> +     - Required
>>> +     - Subtraction between pointers shall only be applied to pointers
>>> +       that address elements of the same array
>>> +     - Be aware that the static analysis tool Eclair might report
>>> +       several findings for Rule 18.2 of type "caution". These are
>>> +       instances where Eclair is unable to verify that the code is valid
>>> +       in regard to Rule 18.2. Caution reports are not violations.
>> 
>> And while the same wording is used here, I think it is pretty clear for
>> this that we'd reject changes where bad subtractions are used. IOW even
>> more so important to clarify the (possibly different) positions on what
>> is going to be added into the code base.
> 
> In both of these cases, we would reject code that doesn't follow R13.2
> and R18.2. I'll change it to the following:
> 
> 
> Be aware that the static analysis tool Eclair might report several
> findings for Rule 18.2 of type "caution". These are instances where
> Eclair is unable to verify that the code is valid in regard to Rule
> 18.2. Caution reports are not violations. Regardless, new code is
> expected to follow this rule.

I think that in both cases it is wrong to state that "cautions reported are
not violations" where those are cases where the tool is not sure so they
might be or not violations.
So I would change the sentence to "cautions might not be violations. The
rule should be followed in any case in new code submitted".

Cheers
Bertrand





 


Rackspace

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