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

Re: [PATCH v3] docs/misra: add rule 2.1 exceptions


  • To: Bertrand Marquis <Bertrand.Marquis@xxxxxxx>
  • From: Luca Fancellu <Luca.Fancellu@xxxxxxx>
  • Date: Wed, 27 Sep 2023 11:08:19 +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=Qo82qcgFDD0QuxFm2go0rK0O3yo7G49KduV5dYacupE=; b=A9D8ZvPgC4xLzAqdp4I2p/1DVCYlI1iEDMMktN4pof28MDGjxj7//guNZQ8Vanl6dzRr2Bc6DsQDKTKBvPVQFKW1LDfw8R2TUf2nBz4o6ab/fEhK9YQLgPVyxmNkcxC2cZuF4wKKR7AvBqf4kONF4Gam6GN7u//nDWb3/8b31oEzSbXoreL6iglNtzUpDa5mVZXIN0CMCiD9aKLi4XgrO4FwsUH0ZYGGlKvS+7LTs799n5f1IzJANuhnxaxreMxA2Y7ErWDppVfL2Z+S0k0zO6z4vcp/Fk6KAJx8mAzO9bYw+91iuONQ18fTvRRG3LfjBQ53qHtAwpdBKyaQ7etD+Q==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=TVGjtV2UrqE3VGWa0WNippoGP3U2YuxIQZQv5rfvjdTFHZ4DPyG2PiKgqQhCpznkWH6Gq+Nk2PhHthH7eeL9/yY7NsQ8QDOqK2cKINWH46oiNegY64/3oqOdcofSANMcjvALRIDEfK8UCjspNGEK3reN4f9a7TR5Ln/xmru+ziUwi+4kPVskuwyztxn5AKnoLDV5nNed2FlbIOtVCHVHv0WjwYDWXGwaGtAIgVWygrt4TVqE5tV55kc5H+VbKkG6TEyv3VXh6IaG66295X6G0C1z0+KxA4vaIPGhr1/Enose8M62y9hB6uCu2NX6dShqqAJ0XT0Q5FoZVTcLFnUmzA==
  • Authentication-results-original: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=arm.com;
  • Cc: Jan Beulich <jbeulich@xxxxxxxx>, Nicola Vetrini <nicola.vetrini@xxxxxxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>, Xen-devel <xen-devel@xxxxxxxxxxxxxxxxxxxx>, "andrew.cooper3@xxxxxxxxxx" <andrew.cooper3@xxxxxxxxxx>, "roger.pau@xxxxxxxxxx" <roger.pau@xxxxxxxxxx>, "george.dunlap@xxxxxxxxxx" <george.dunlap@xxxxxxxxxx>, "roberto.bagnara@xxxxxxxxxxx" <roberto.bagnara@xxxxxxxxxxx>, "julien@xxxxxxx" <julien@xxxxxxx>, Stefano Stabellini <stefano.stabellini@xxxxxxx>
  • Delivery-date: Wed, 27 Sep 2023 11:09:21 +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: AQHZ8RfN02/rDlrXwEmUei6wT31DmLAuUyoAgAACh4CAAANEAIAAKqUA
  • Thread-topic: [PATCH v3] docs/misra: add rule 2.1 exceptions


> On 27 Sep 2023, at 09:35, Bertrand Marquis <Bertrand.Marquis@xxxxxxx> wrote:
> 
> Hi Jan,
> 
>> On 27 Sep 2023, at 10:23, Jan Beulich <jbeulich@xxxxxxxx> wrote:
>> 
>> On 27.09.2023 10:14, Bertrand Marquis wrote:
>>>> On 27 Sep 2023, at 09:53, Nicola Vetrini <nicola.vetrini@xxxxxxxxxxx> 
>>>> wrote:
>>>> My opinion is that it's far easier for this to be an eclair configuration 
>>>> (which has the
>>>> advantage not to depend on the exact definition of unreachable) and then 
>>>> perhaps a comment
>>>> above it explaining the situation.
>>> 
>>> I agree here and it is easier to make an overall exception where we list 
>>> the cases
>>> where this is acceptable (ie all flavors of unreacheable) and document that 
>>> eclair
>>> was configured using "xxxx" to handle this.
>> 
>> What about cppcheck then, for example?
> 
> Good point we should check if cppcheck or coverity can do such things.
> @Luca: any idea ?

So, for cppcheck I don’t think we have such granularity, the only thing we can 
do are suppress all violations
for a file, suppress some violations for a file or suppress globally all 
violations regarding certain rules.

For coverity, I’ve found the way to remove files (translation units) from the 
report, but I didn’t find anything
about how to specify some patterns to be excluded. For now I can only exclude 
entire files or I can exclude
rules globally.
I will try to get some support from Synopsys to see if there is any way to 
specify some exclusion pattern for
specific rules.

Anyway I’ve run Coverity and for the 2.1 it is finding 14 violations but none 
of them are about __builtin_unreachable().

I’ve also run Cppcheck and it is not complaining, not that I was looking for it 
to be a benchmark in any case!

So I guess Eclair is more strict on the checks and needs to have a proper 
configuration that can’t be generalised
for all the tools.

Cheers,
Luca



 


Rackspace

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