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

Re: [XEN PATCH] xen: Add SAF deviations for MISRA C:2012 Rule 7.1


  • To: Julien Grall <julien@xxxxxxx>
  • From: Luca Fancellu <Luca.Fancellu@xxxxxxx>
  • Date: Wed, 11 Oct 2023 10:53:56 +0000
  • Accept-language: en-GB, en-US
  • 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=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=7B05IP0LF1YtdMjYZHGPJXUvFghrLe7+cpYr/c1UcDc=; b=Z8B+tnmWVXD5WBDxiICDe3Li2WvMZCwd9g+LpObRgtpPLAMNkHmUhhPTx8akP/4CanR0Rqehs8RO7T3UyokhwqNk/hXxwbaUQE4vXmybbWJQ/xaZfiQpkThzzZfW05uJFZbGhMlLoTsfyTGfx4pQT/gqiR1KPyik9GD/qrOsDdXFyfnfCd71XZ2AbwmuD5peehW7pFo3+crL4cAYSa8ezS/cd3hv7GJeGcDFtYbVUD6vz8K9QC0rjy6mpJpTk/kW7caV2eldWAfKbXmTeBbv+HYxiCk9WibpYoBUSpfPMfA5uJEn6ojanHg0eJtYtZv/zSezVPtSZpPfD4Qk6pwclA==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=WFZ6JRkUR2VLWTt/cKwL0L1jGXF8o7KA8JkYhYoJYpanXBPVwmIMsqkRQvpz/0HnCo1xgRpIrWkFODqBYFy/1cSKZaY5XZ/hPM81IIwRa5IAdWF7XDL1tRarePpX/M32mVFbkyAwCpUxPUf9IeIPX7jIC9lbE5pm9iNxaaNuNoKvsq5K7nEUWdQMdDi1Jt70/pcwII2yD49t/1Fx8OhICIWH2d8UNGOo2jBqyqMW9zAvvmiDJc/cjIVZ+i7lvonWOClvduNg42+AiIpHYCgQXRg9y4QwNiw4bB7tqPAHk5UwWsziT/9fG+RbosXjuzj640/tGiCXdAmc+VaWWWUWWQ==
  • Authentication-results-original: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=arm.com;
  • Cc: Stefano Stabellini <sstabellini@xxxxxxxxxx>, Nicola Vetrini <nicola.vetrini@xxxxxxxxxxx>, Xen-devel <xen-devel@xxxxxxxxxxxxxxxxxxxx>, "michal.orzel@xxxxxxx" <michal.orzel@xxxxxxx>, "xenia.ragiadakou@xxxxxxx" <xenia.ragiadakou@xxxxxxx>, Ayan Kumar Halder <ayan.kumar.halder@xxxxxxx>, "consulting@xxxxxxxxxxx" <consulting@xxxxxxxxxxx>, Jan Beulich <jbeulich@xxxxxxxx>, Roger Pau Monné <roger.pau@xxxxxxxxxx>, Henry Wang <Henry.Wang@xxxxxxx>, Simone Ballarin <simone.ballarin@xxxxxxxxxxx>, Doug Goldstein <cardoe@xxxxxxxxxx>, George Dunlap <george.dunlap@xxxxxxxxxx>, Wei Liu <wl@xxxxxxx>, Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
  • Delivery-date: Wed, 11 Oct 2023 10:55:18 +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: AQHZ9qj87vFsnMRst0ybMa+ffKOLU7A5Z4mAgAAGhgCAAAYzgIAA1KIAgACGqQCAASTEgIAAdASAgAEY6ICAA60ogIAA4ZaAgADQ0QCAANf6gIAAqUEAgAABkwCAABF9gA==
  • Thread-topic: [XEN PATCH] xen: Add SAF deviations for MISRA C:2012 Rule 7.1

>>> 
>>> Luca answered to a similar, more generic, question a few days ago about
>>> Coverity: https://marc.info/?l=xen-devel&m=169657904027210
>> Interesting.
>>> 
>>> So even if we get cppcheck to work like that, we would lose Coverity
>>> support.
>> I think my suggestion was probably misunderstood. So let me clarify it. To 
>> cover multi-line, we could write the following in Xen:
>> /* cppcheck tag next-3-lines */
>> line 1
>> line 2
>> line 3
>> AFAIU Eclair supports multi-line, so the tag would be transformed to there 
>> internal solution. For CPPCheck, this could be transformed to:
>> /* cppcheck tag next-3 lines */
>> line 1 /* generated cppcheck tag */
>> line 2 /* generated cppcheck tag */
>> line 3 /* generated cppcheck tag */
>> Now, I understand that coverity doesn't support any of the two format. So 
>> the only solution would be to add the comment before each line which would 
>> impact the line numbers. This is not great, but I think this is acceptable 
>> as the context would likely help to find where this is coming from.
> 
> Just to clarify, here I meant that for coverity, a script before the scan 
> could convert to the multi-line version. So the line change only impact 
> Coverity.

Hi Julien,

We’ve tried to avoid that because when the tool insert lines, the resultant 
report would give wrong lines numbers if any violation is reported after the
insertion points. So there will be a mismatch between the codebase and the 
report findings from some point on in the file.

I’ve contacted Synopsys about the in-code comments, to discover if they have 
different syntax (only the one we know is proposed in the documentation),
I will let you know if something comes up.

Cheers,
Luca


 


Rackspace

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